Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
326 views
in Technique[技术] by (71.8m points)

amazon web services - Trying to let my lambda access an RDS database (postgres) but when creating database proxy the "RDS DB Instance" is empty

I created an RDS postgres database with public access. I can connect to it from SQL Workbench and perform SQL queries. Now I want to build a lambda to query data from my database.

Following the instructions from https://docs.aws.amazon.com/lambda/latest/dg/configuration-database.html

In this screen: https://imgur.com/yUsyGRQ

If I open the "RDS DB instance" drop down my database is not there.

What have I done wrong?

Thanks

question from:https://stackoverflow.com/questions/65652313/trying-to-let-my-lambda-access-an-rds-database-postgres-but-when-creating-data

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

A common reason for that is using wrong PostgreSQL version. RDS proxy supports only some version:

For RDS PostgreSQL, RDS Proxy supports version 10.10 and higher minor versions, and version 11.5 and higher minor versions. For Aurora PostgreSQL, RDS Proxy supports version 10.11 and higher minor versions, and 11.6 and higher minor versions.

Thus, if you use newest version PostgreSQL 12, RDS proxy will not show it as its not supported.

You still can use this db from lambda, but have to associate your function with the VPC where RDS is and setup security groups so that function can connect to the db.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...