Home > Blockchain >  AWS beginner question - Is my connection using public internet?
AWS beginner question - Is my connection using public internet?

Time:01-08

For example, in my python code inside lambda I have the following string:

conexao = (
    "Driver={/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.2.1};"
    "Server=example.xxxxxxxxxxxxx.us-east-1.rds.amazonaws.com;"
    "Database=example;"
    "TrustServerCertificate=yes;"
    "Uid=admin;"
    "Pwd=xxxxxx;"
)

The endpoint of my RDS database is example.xxxxxxxxxxxxx.us-east-1.rds.amazonaws.com

Both RDS database and lambda database is in the same VPC and subnet.

Since it's in the same VPC and subnet, this mean I am not going over the internet right? or maybe it is? my RDS has the option Publicly accessible = Yes (because I need to access through my SSMS).

I'd like to access over the internet only in SSMS, when accessing thought lambda I'd like to use privatly.

Does AWS understand that, in this case, python code inside lambda don't need to access over the internet?

CodePudding user response:

this mean I am not going over the internet right?

Yes, that's correct.

You can very easily check it yourself if you want. In your lambda function, resolve example.xxxxxxxxxxxxx.us-east-1.rds.amazonaws.com into an IP address. What you should get, is a private IP address of the RDS instance, not public.

  • Related