在 CloudFormation 中获取 Aurora Serverless 集群 ARN(输出)

Getting an Aurora Serverless Cluster ARN in CloudFormation (Output)

我在检索 CloudFormation 模板内的新 RDS Aurora Serverless 集群的 ARN 时遇到问题。

有人可以告诉我输出值应该低于什么参考值吗?

Resources:
  RDSCluster:
    Type: AWS::RDS::DBCluster
    Properties:
      MasterUsername: someusername
      MasterUserPassword: somepass
      DatabaseName: mydb
      Engine: aurora-postgresql
      EngineMode: serverless
      EngineVersion: '10.7'
      EnableHttpEndpoint: true
      ScalingConfiguration:
        AutoPause: false
        MaxCapacity: 16
        MinCapacity: 2
        SecondsUntilAutoPause: 300

Outputs:
  RDSClusterARN:
    Description: RDS Cluster ARN
    Export:
      Name: RDSCluster
    Value:
      Ref: RDSCluster # Help! What should this value be?

我目前得到的输出:

    {
        "OutputKey": "RDSClusterARN",
        "OutputValue": "t1-rdscluster-1i771l6x4amfg",
        "Description": "RDS Cluster ARN",
        "ExportName": "RDSCluster"
    },

由于 AWS CloudFormation AWS::RDS::DBCluster 资源的当前限制,您必须按如下方式手动构建其 ARN(另请参阅 Working with Amazon Resource Names (ARNs) in Amazon RDS

!Sub "arn:${AWS::Partition}:rds:${AWS::Region}:${AWS::AccountId}:cluster:${RDSCluster}"