Creating an Aurora Serverless Cluster from cloudformation?

后端 未结 4 1005
执笔经年
执笔经年 2020-12-03 10:51

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/Amazon

相关标签:
4条回答
  • 2020-12-03 11:06

    It is now possible to create an AWS::RDS::DBCluster with an EngineMode set to serverless. See more here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-enginemode

    0 讨论(0)
  • 2020-12-03 11:15

    I found an article that indicated that the Go SDK has been updated with the EngineMode parameter, and when I looked through the AWS SDK changelog, I found some RDS updates in the most recent versions. I've had to manually update my AWS CLI to the latest release to get my shell scripts working with that option.

    https://github.com/aws/aws-cli/releases

    https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst

    https://github.com/terraform-providers/terraform-provider-aws/issues/5503

    No news on the CloudFormation side though.

    0 讨论(0)
  • 2020-12-03 11:23

    Simple answer - No. Not till they make it available in CFN. As of 1-2 days ago, the EngineMode and ScalingConfiguration property are not yet available in the RDS API, as my API call threw this error. First they will make available the APIs/cli. Once that works, create a CFN Custom Resource to invoke the RDS API from a lambda. It might be a while before it is made directly available in CFN.

    2018-08-15T16:12:09.648Z f57erb2b-g3a5-11e8-8f64-81912181e535 { MultipleValidationErrors: There were 2 validation errors: * UnexpectedParameter: Unexpected key 'EngineMode' found in params * UnexpectedParameter: Unexpected key 'ScalingConfiguration' found in params

    And I know role/permission is not a problem as I could launch normal Aurora cluster from the same.

    PS: RDS APIs now work for serverless

    Edit: Some time in Oct 18, EngineMode added to CFN, so now this is possible -> https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-enginemode

    0 讨论(0)
  • 2020-12-03 11:26

    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
    

    More complete example of all available options for RDS (including Aurora): https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html

    0 讨论(0)
提交回复
热议问题