Lambda function should have access to VPC resources in configuration

이 페이지는 아직 한국어로 제공되지 않으며 번역 작업 중입니다. 번역에 관한 질문이나 의견이 있으시면 언제든지 저희에게 연락해 주십시오.

Description

Configure your Amazon Lambda Function to have access to VPC-only resources.

Rationale

By default, Amazon Lambda functions run in a secure VPC with access to any AWS service and the internet. Selecting which resources have access secures the connections within your private VPC.

Remediation

From the console

Follow the Configuring VPC access (console) docs to configure VPC access for an existing function.

From the command line

  1. Run update-function-configuration with your Amazon Lambda function name and VPC configuration. Set network connectivity to AWS resources within the configured VPC.

    update-function-configuration.sh

       aws lambda update-function-configuration
           --function-name your-lambda-function-name
           --vpc-config SubnetIds="subnet-ab12cd34","subnet-12345678",SecurityGroupIds="id-0abcd1234abcd5678"