From the course: AWS Certified Developer - Associate (DVA-C02) Cert Prep

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

AWS Lambda and Amazon VPC integration

AWS Lambda and Amazon VPC integration

- [Instructor] If you have resources like a database or EC2 inside a private subnet that you want to access and process data from it using Lambda functions, by default, you won't be able to. The reason is that under the hood, Lambda functions are run in a separate secure VPC with access to the internet and AWS services. This VPC is entirely managed by AWS Lambda, which means you don't have access to it. Take note that this VPC is different from the default VPC that is created in your accounts. So how will you enable connectivity between a Lambda function and the resources hosted in a private subnet? First, you must create an execution role for the function with the AWS Lambda VPC access execution role policy attached to it. This manage IAM policy contains a list of permissions required for the Lambda function to create an elastic network interface. This is necessary because when you connect a Lambda function to A VPC, Lambda needs to manage the creation and deletion of elastic network…

Contents