Is there a way to run initial SQL when creating an RDS database instance using CloudFormation?

后端 未结 4 1441
北海茫月
北海茫月 2020-12-24 05:21

I am creating an RDS instance using CloudFormation using this:

\"Resources\": {
        \"myDB\": {
            \"Type\": \"AWS::RDS::DBInstance\",
                     


        
4条回答
  •  离开以前
    2020-12-24 05:26

    No, it's not possible. However, you could have an EC2 instance connect to your RDS instance to do it. I'd probably store a .sql file in S3 and use a cloud-init script on the EC2 instance to download the file and execute it.

提交回复
热议问题