I have an Aurora database on a VPC. Today I needed to connect to that database through Lambda. Not really an issue except I needed internet access in that Lambda and so I had to setup the following:
- I added a new subnet for the public NAT.
- I added a NAT Gateway and assigned it to a new EIP and the new subnet.
- I added a new route table that routed all traffic to the
igw
and associated that table with the new subnet I created in step 1. - I modified the
Main
route table and routed all traffic to the NAT.
This gave me internet access in my Lambda, and by running the Lambda on the VPC, I also had access to my Aurora database.
However, I have now lost public access to this database through MySQL Workbench.
What do I need to configure to route the public traffic back to the VPC?