I'm trying to set up Aurora using Troposphere and can't find any good examples online. Can anyone provide a good example of an Aurora Troposphere setup?
Setting up Troposphere with Aurora
375 Views Asked by Arthur At
2
There are 2 best solutions below
0

In order to set up aurora, you should make sure you have a db instance and db cluster set up correctly. Below is a code snippet for setting up aurora in a VPC.
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'
)
- add the above two resources in the template of troposphere.
Try the Aurora blueprints here.