将 RDS Proxy 与 AWS CloudFormation 一起使用 - Amazon Relational Database Service

将 RDS Proxy 与 AWS CloudFormation 一起使用

您可以将 RDS Proxy 与 AWS CloudFormation 一起使用。这有助于您创建相关资源组。此类组可能包含可连接到新创建的 Amazon RDS 数据库实例的代理。AWS CloudFormation 中的 RDS Proxy 支持涉及两种新的注册表类型:DBProxyDBProxyTargetGroup

以下列表显示了 RDS Proxy 的 AWS CloudFormation 模板示例。

Resources: DBProxy: Type: AWS::RDS::DBProxy Properties: DBProxyName: CanaryProxy EngineFamily: MYSQL RoleArn: Fn::ImportValue: SecretReaderRoleArn Auth: - {AuthScheme: SECRETS, SecretArn: !ImportValue ProxySecret, IAMAuth: DISABLED} VpcSubnetIds: Fn::Split: [",", "Fn::ImportValue": SubnetIds] ProxyTargetGroup: Type: AWS::RDS::DBProxyTargetGroup Properties: DBProxyName: CanaryProxy TargetGroupName: default DBInstanceIdentifiers: - Fn::ImportValue: DBInstanceName DependsOn: DBProxy

有关此示例中的资源的更多信息,请参阅 DBProxyDBProxyTargetGroup

有关您可以使用 AWS CloudFormation 创建的资源的更多信息,请参阅 RDS 资源类型参考