This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.
AWS::RDS::DBProxy
The AWS::RDS::DBProxy resource creates or updates a DB proxy.
For information about RDS Proxy for Amazon RDS, see Managing Connections with Amazon RDS Proxy in the Amazon RDS User Guide.
For information about RDS Proxy for Amazon Aurora, see Managing Connections with Amazon RDS Proxy in the Amazon Aurora User Guide.
Note
Limitations apply to RDS Proxy, including DB engine version limitations and Amazon Region limitations.
For information about limitations that apply to RDS Proxy for Amazon RDS, see Limitations for RDS Proxy in the Amazon RDS User Guide.
For information about that apply to RDS Proxy for Amazon Aurora, see Limitations for RDS Proxy in the Amazon Aurora User Guide.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::RDS::DBProxy", "Properties" : { "Auth" :[ AuthFormat, ... ], "DBProxyName" :String, "DebugLogging" :Boolean, "DefaultAuthScheme" :String, "EndpointNetworkType" :String, "EngineFamily" :String, "IdleClientTimeout" :Integer, "RequireTLS" :Boolean, "RoleArn" :String, "Tags" :[ TagFormat, ... ], "TargetConnectionNetworkType" :String, "VpcSecurityGroupIds" :[ String, ... ], "VpcSubnetIds" :[ String, ... ]} }
YAML
Type: AWS::RDS::DBProxy Properties: Auth:- AuthFormatDBProxyName:StringDebugLogging:BooleanDefaultAuthScheme:StringEndpointNetworkType:StringEngineFamily:StringIdleClientTimeout:IntegerRequireTLS:BooleanRoleArn:StringTags:- TagFormatTargetConnectionNetworkType:StringVpcSecurityGroupIds:- StringVpcSubnetIds:- String
Properties
- Auth
- 
                    The authorization mechanism that the proxy uses. Required: No Type: Array of AuthFormat Minimum: 1Update requires: No interruption 
- DBProxyName
- 
                    The identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services account in the specified Amazon Web Services Region. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens. Required: Yes Type: String Pattern: [0-z]*Maximum: 64Update requires: Replacement 
- DebugLogging
- 
                    Specifies whether the proxy logs detailed connection and query information. When you enable DebugLogging, the proxy captures connection details and connection pool behavior from your queries. Debug logging increases CloudWatch costs and can impact proxy performance. Enable this option only when you need to troubleshoot connection or performance issues.Required: No Type: Boolean Update requires: No interruption 
- DefaultAuthScheme
- 
                    The default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database. Valid values are NONEandIAM_AUTH. When set toIAM_AUTH, the proxy uses end-to-end IAM authentication to connect to the database.Required: No Type: String Allowed values: IAM_AUTH | NONEUpdate requires: No interruption 
- EndpointNetworkType
- 
                    The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports. Valid values: - 
                            IPV4- The proxy endpoint supports IPv4 only.
- 
                            IPV6- The proxy endpoint supports IPv6 only.
- 
                            DUAL- The proxy endpoint supports both IPv4 and IPv6.
 Required: No Type: String Allowed values: IPV4 | IPV6 | DUALUpdate requires: Replacement 
- 
                            
- EngineFamily
- 
                    The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify MYSQL. For Aurora PostgreSQL and RDS for PostgreSQL databases, specifyPOSTGRESQL. For RDS for Microsoft SQL Server, specifySQLSERVER.Required: Yes Type: String Allowed values: MYSQL | POSTGRESQL | SQLSERVERUpdate requires: Replacement 
- IdleClientTimeout
- 
                    The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database. Required: No Type: Integer Update requires: No interruption 
- RequireTLS
- 
                    Specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy. Required: No Type: Boolean Update requires: No interruption 
- RoleArn
- 
                    The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Secrets Manager. Required: Yes Type: String Minimum: 20Maximum: 2048Update requires: No interruption 
- 
                    An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy. Required: No Type: Array of TagFormat Update requires: No interruption 
- TargetConnectionNetworkType
- 
                    The network type that the proxy uses to connect to the target database. The network type determines the IP version that the proxy uses for connections to the database. Valid values: - 
                            IPV4- The proxy connects to the database using IPv4 only.
- 
                            IPV6- The proxy connects to the database using IPv6 only.
 Required: No Type: String Allowed values: IPV4 | IPV6Update requires: Replacement 
- 
                            
- VpcSecurityGroupIds
- 
                    One or more VPC security group IDs to associate with the new proxy. If you plan to update the resource, don't specify VPC security groups in a shared VPC. Required: No Type: Array of String Minimum: 1Update requires: No interruption 
- VpcSubnetIds
- 
                    One or more VPC subnet IDs to associate with the new proxy. Required: Yes Type: Array of String Minimum: 2Update requires: Replacement 
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the name of the DB proxy.
For more information about using the Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.
- DBProxyArn
- 
                            The Amazon Resource Name (ARN) for the proxy. 
- Endpoint
- 
                            The endpoint that you can use to connect to the DB proxy. You include the endpoint value in the connection string for a database client application. 
- VpcId
- 
                            The VPC ID to associate with the DB proxy. 
Examples
Creating a DB proxy and registering a DB instance
The following example creates a DB proxy and registers a DB instance.
JSON
{ "AWSTemplateFormatVersion": "2010-09-09", "Parameters": { "ProxyName": { "Type": "String", "Default": "exampleProxy" }, "InstanceName": { "Type": "String", "Default": "database-1" }, "BootstrapSecretReaderRoleArn": { "Type": "String", "Default": "arn:aws:iam::123456789012:role/RDSSecretReaderRoleForDBProxy" }, "BootstrapProxySecretArn": { "Type": "String", "Default": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MySecretForDBProxy" }, "SubnetIds": { "Type": "String", "Default": "subnet-01b761b31fb498f20,subnet-012b9a958ef0f9949,subnet-05e8e263052025378" } }, "Resources": { "TestDBProxy": { "Type": "AWS::RDS::DBProxy", "Properties": { "DebugLogging": true, "DBProxyName": { "Ref": "ProxyName" }, "EngineFamily": "MYSQL", "IdleClientTimeout": 120, "RequireTLS": true, "RoleArn": { "Ref": "BootstrapSecretReaderRoleArn" }, "Auth": [ { "AuthScheme": "SECRETS", "SecretArn": { "Ref": "BootstrapProxySecretArn" }, "IAMAuth": "DISABLED" } ], "VpcSubnetIds": { "Fn::Split": [ ",", { "Ref": "SubnetIds" } ] } } }, "ProxyTargetGroup": { "Type": "AWS::RDS::DBProxyTargetGroup", "Properties": { "DBProxyName": { "Ref": "TestDBProxy" }, "DBInstanceIdentifiers": [ { "Ref": "InstanceName" } ], "TargetGroupName": "default", "ConnectionPoolConfigurationInfo": { "MaxConnectionsPercent": 100, "MaxIdleConnectionsPercent": 50, "ConnectionBorrowTimeout": 120 } } } } }
YAML
AWSTemplateFormatVersion: 2010-09-09 Parameters: ProxyName: Type: String Default: exampleProxy InstanceName: Type: String Default: database-1 BootstrapSecretReaderRoleArn: Type: String Default: arn:aws:iam::123456789012:role/RDSSecretReaderRoleForDBProxy BootstrapProxySecretArn: Type: String Default: arn:aws:secretsmanager:us-west-2:123456789012:secret:MySecretForDBProxy SubnetIds: Type: String Default: subnet-01b761b31fb498f20,subnet-012b9a958ef0f9949,subnet-05e8e263052025378 Resources: TestDBProxy: Type: AWS::RDS::DBProxy Properties: DebugLogging: true DBProxyName: !Ref ProxyName EngineFamily: MYSQL IdleClientTimeout: 120 RequireTLS: true RoleArn: !Ref BootstrapSecretReaderRoleArn Auth: - {AuthScheme: SECRETS, SecretArn: !Ref BootstrapProxySecretArn, IAMAuth: DISABLED} VpcSubnetIds: Fn::Split: [",", !Ref SubnetIds] ProxyTargetGroup: Type: AWS::RDS::DBProxyTargetGroup Properties: DBProxyName: !Ref TestDBProxy DBInstanceIdentifiers: [!Ref InstanceName] TargetGroupName: default ConnectionPoolConfigurationInfo: MaxConnectionsPercent: 100 MaxIdleConnectionsPercent: 50 ConnectionBorrowTimeout: 120