Question:
From Aurora Serverless’s document, there are 3 ways to create an Aurora serverless DB cluster: AWS management console, CLI, and RDS API. (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/aurora-serverless.create.html)
Form my understanding, one would use EngineMode
in the RDS API to create Aurora Serverless, but this property is not available in AWS::RDS::DBCluster
yet (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html).
Would it be possible to create an Aurora Serverless Cluster from cloudformation? Any advice would be appreciated!
Answer:
Thanks for Chris’s update. As an example, here is my cloudFormation template for serverless aurora. We no longer need the DBInstance
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
RDSCluster: Type: AWS::RDS::DBCluster Properties: MasterUsername: Ref: DBUsername MasterUserPassword: Ref: DBPassword DatabaseName: RANDOMNAME Engine: aurora EngineMode: serverless ScalingConfiguration: AutoPause: true MaxCapacity: 16 MinCapacity: 2 SecondsUntilAutoPause: 300 DBSubnetGroupName: Ref: DBSubnetGroup |
More complete example of all available options for RDS (including Aurora):
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html