Skip to content
Examples for using Serverless within a VPC
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
nat-gateway
vpc-endpoint
README.md

README.md

Serverless VPC Examples

This repository contains example configuration for using a Lambda function inside a VPC. It also shows two different methods for using AWS services from a Lambda function in a VPC.

The two methods are:

  • Using a NAT Gateway: Adding a NAT Gateway provides full public internet access to your Lambda function. A NAT Gateway costs ~$35 per month per instance plus data processing charges.
  • Using a VPC Endpoint: A VPC endpoint allows you to use a specific AWS service from within a VPC. A VPC endpoint costs ~$7.50 per month plus data processing charges.

Check out the accompanying blog post on using AWS services from a Lambda inside a VPC for a larger breakdown of the pros and cons of the two approaches.

You can’t perform that action at this time.