问题描述
在 Aurora Serverless 的文档中,有 3 种方法可以创建 Aurora Serverless 数据库集群:AWS 管理控制台、CLI 和 RDS API.(https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/aurora-serverless.create.html)
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)
根据我的理解,可以在 RDS API 中使用 EngineMode
来创建 Aurora Serverless,但此属性在 AWS::RDS::DBCluster
中尚不可用(https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.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).
是否可以从 cloudformation 创建一个 Aurora Serverless 集群?任何建议将不胜感激!
Would it be possible to create an Aurora Serverless Cluster from cloudformation? Any advice would be appreciated!
推荐答案
感谢 Chris 的更新.例如,这是我的无服务器 Aurora 的 cloudFormation 模板.我们不再需要 DBInstance
.
Thanks for Chris's update. As an example, here is my cloudFormation template for serverless aurora. We no longer need the DBInstance
.
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
RDS(包括 Aurora)所有可用选项的更完整示例:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html
More complete example of all available options for RDS (including Aurora):https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html
这篇关于从 cloudformation 创建 Aurora Serverless 集群?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!