2

Can I use psycopg2 for connect to RDS postgres in AWS Lambda? What permissions should I set for that?

2 Answers 2

3
import boto3

rds = boto3.client('rds')

for line in rds.describe_db_instances():
    print (line)
Sign up to request clarification or add additional context in comments.

Comments

3

You can use psycopg2 to in AWS Lambda, but you have to add the lib in the Lambda Zip or You can use Serverless Framework to do that.

You should attach RDS permissions to your Lambda.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.