Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to launch an RDS instance without a VPC?

I'm trying to insert records into a Postgres database in RDS from a Lambda function. My Node.js lambda function works correctly when run locally, but the database connection times out when run in AWS.

I've read several articles and tutorials which suggest that AWS Lambda functions cannot access RDS instances that are within a VPC. For example: http://ashiina.github.io/2015/01/amazon-lambda-first-impression/

Unfortunately; it seems I am unable to create an RDS instance that exists outside of a VPC. At this dropdown I would expect to be able to select an option for "No VPC" or something along those lines.

Has this option been removed? Perhaps I have missed a step?

like image 391
sudoNebula Avatar asked Dec 10 '15 21:12

sudoNebula


Video Answer


1 Answers

You can create a publicly accessible RDS instance. Then you should be able to access it from anywhere, inside or outside AWS. I believe that would get around your issue with Lambda. You are asked if the instances needs to be publicly accessible when you create a new RDS instance via the web console.

Or you could just wait a few weeks, as Lambda within a VPC is supposed to be enabled "later this year".

Edit: Note that newer Amazon accounts are restricted to VPC only resources. You can't create EC2 or RDS instances outside of a VPC anymore. That's why you don't see the "No VPC" option anymore.

Second Edit: VPC access for Lambda functions is now genearally available.

like image 198
Mark B Avatar answered Oct 02 '22 06:10

Mark B