Am not sure why my internet searches are fruitless, but I would like to be able to create a resource (RDS) in a VPC. All I see is the ability to specify security groups, which gives me error messages like this…
An error occurred: RDSInstance - VPC Security Groups cannot be associated with non-VPC DB Instances.
Why cannot I not just specify something like this…
You need to create a DB subnet group with the subnets want to use then use that when creating the RDS instance. The RDS CloudFormation docs are the best place to start looking.
Thanks for the response. What would be insanely useful for people who, like myself, are searching for how to do this sort of thing is the posting of example YAML. In the meanwhile I’ll check out what you’ve said above.
Well, I tried setting the new RDS DB instance to having the same security groups as my VPC (using VPCSecurityGroups: [sg-abc123, sg-xyz789, …etc…]), but got this…
An error occurred: RDSInstance - VPC Security Groups cannot be associated with non-VPC DB Instances.
…so it seems it still thinks my DB is not associated with a VPC
I have been struggling with this for a while - trying to make the code portable among all AWS Regions, especially when there is no default VPC or default subnet. Your solution gets the RDS created.
We are mostly focused on IoT Core and Lambda - and not very familiar with VPCs, Subnets, etc.
Can you suggest an enhancement that would allow an external tool, like MySQL WorkBench, to communicate with the RDS using Port 3306 over TCP?