简体   繁体   中英

AWS Lambda and RDS outside a VPC

From my understanding, I can run AWS Lambda outside a VPC, as well as the RDS and have that set to publicly accessible. That would be the perfect solution for me because my lambda functions need internet access and a NAT Gateway which would allow that when inside a VPC is way too expensive. In which cases is it safe to go for that option? When is it a bad idea to have an RDS outside a VPC? What are the risks?

It is a VERY bad idea to expose your SQL server to the public internet. This is a very large security risk and you could eventually lose your data.

The a Nat gateway is too expensive, you could break the project into 2 lambda functions. Have one lambda function invoke attached to the VPC access the DB. This lambda can then invoke a second lambda function outside of the VPC, execute code, and return the results.

Natgateway is still the best solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM