Ensure that your Amazon Lambda functions have access to VPC-only resources such as AWS Redshift data warehouses, AWS ElastiCache clusters, AWS RDS database instances, and service endpoints that are only accessible from within a particular Virtual Private Cloud (VPC).
Based on your application requirements, you can configure your Amazon Lambda function to be associated with the appropriate Virtual Private Cloud. For example, to access resources inside a private VPC, you must provide additional VPC-specific configuration information that includes the VPC subnet IDs and security group IDs. Amazon Lambda service uses this configuration information to set up Elastic Network Interfaces (ENIs) that enable your function to connect securely to other resources available within your private VPC.
To determine if your AWS Lambda functions are associated with VPCs, perform the following actions:
To associate your existing Amazon Lambda function with Virtual Private Cloud(s) you have to update your functions network configuration. In order to do that, you simply select one of your VPCs and identify the relevant subnets and security groups. The AWS Lambda service makes use of this information to set up Elastic Network Interfaces (ENIs) and private IP addresses (taken from the subnet(s) that you specified) so that your function has access to the AWS resources within the selected VPC. To update the network configuration for your Lambda functions, perform the following: