【发布时间】:2017-11-27 14:46:17
【问题描述】:
我正在尝试使用 Troposphere 设置 Aurora,但在网上找不到任何好的示例。谁能提供一个极光对流层设置的好例子?
【问题讨论】:
标签: python amazon-web-services amazon-aurora troposphere
我正在尝试使用 Troposphere 设置 Aurora,但在网上找不到任何好的示例。谁能提供一个极光对流层设置的好例子?
【问题讨论】:
标签: python amazon-web-services amazon-aurora troposphere
为了设置 aurora,您应该确保正确设置了数据库实例和数据库集群。下面是用于在 VPC 中设置极光的代码 sn-p。
pipelinedbcluster = rds.DBCluster(
title='PipelineDBCluster',
DatabaseName=<your-db-name>,
DBClusterIdentifier=<your-cluster-name>,
DBSubnetGroupName=<your-subnet-group>,
DBClusterParameterGroupName='default.aurora-postgresql9.6',
DeletionProtection=False,
Engine='aurora-postgresql',
EngineVersion='9.6.8',
MasterUsername=<your-username>,
MasterUserPassword=<your-password>,
Port=5432,
VpcSecurityGroupIds=<your-primary-vpc-id>, #(required if creating aurora cluster in a VPC)
)
pipelinedb = rds.DBInstance(
title='PipelineDBInstance',
DBInstanceIdentifier=<your-instance-name>,
DBClusterIdentifier=Ref(pipelinedbcluster),
DBInstanceClass='db.r4.large',
Engine='aurora-postgresql',
EngineVersion='9.6.8',
PubliclyAccessible=False,
Tags=<your-tags>,
AutoMinorVersionUpgrade=True,
StorageType='aurora'
)
【讨论】:
试试 Aurora 蓝图here。
【讨论】: