Skip to main content

Using internet-facing AWS services within VPC-enabled functions

If you're running a Lambda function within a VPC (for instance, to allow it to connect to an RDS database), you will not normally be able to connect to non-VPC services like DynamoDB or SQS. Your only options are to either use a Lambda function that is not running within a VPC, or set up a VPC endpoint.

You can set up a VPC endpoint in the VPC console, using the instructions here: https://aws.amazon.com/blogs/aws/new-vpc-endpoints-for-dynamodb/ 

Warning: VPC endpoints are charged (around $8 per month per endpoint).