This template can be run in CloudFormation to create an Aurora Serverless cluster that can be accessed using the Data API.
Currently the Data API is only available in us-east-1
.
After the template is run, we need to enable the Data API.
- Head to the RDS Console and select your created cluster.
- In the cluster summary page, select "Modify"
- In the modify page, scroll down to the "Network & Security" section.
-
Make sure that Data API is checked.
-
Click Continue
-
On the confirm screen make sure that the "Enable data API" is enabled.
If you don't want to wait you can choose to apply the changes immediately.
aws rds-data execute-sql --db-cluster-or-instance-arn <value from DatabaseClusterArn> --aws-secret-store-arn <value from DatabaseConnectionSecretArn> --sql-statements "select * from information_schema.tables limit 1;"