I am currently working on a project, which involves a Lambda (Master-)function to manage different other things.
When I run the database publicly accessible, everything works, no problem. When I emulate the Masterlambda on my home PC, with my IP as exception within the databases Security Group but otherwise no public internet access. This also works.
But when i want the MasterLambda to have access to a non public DB I have to add the DB to the Lambda, which puts the Lambda into the same VPC as the DB and cuts it off from public access. As a result, the Master Lambda cant communicate with the Sublambdas anymore.
I tried to put the Sublambdas into the same VPC, but without success. And even if this would work, would the Sublambdas still be able to make calls to Bedrock and Textract, or would they be cut off and timeout too?
The base problem here is that the DB should not be accessible from anywhere in the internet (pw is seemingly not enough)
Okay, I figured it out, here is how to do it: