问题
Lambda role have below permissions
"Action" : "rds-db:connect"
"Resource": "arn:aws:rds:*:6548938434:cluster:*"
Code is below
import pg8000
#region is us-east-2b
client = boto3.client(service_name='rds',
region_name='us-east-2')
def lambda_handler(event,context):
conn = pg8000.connect(database='postgres', user='test_user',\
password='1234567', \
host='abc-dev-chhd674.us-east-2.rds.amazonaws.com', \
port=5432, ssl_context=True)
I have connection timed out issue
来源:https://stackoverflow.com/questions/65245051/what-are-the-action-and-resource-to-connect-the-rds