Can not access S3 via VPC endpoint in Lambda

前端 未结 4 1607
一整个雨季
一整个雨季 2021-01-05 06:48

I have a Lambda function in my VPC, and I want to access S3 bucket.

I have set S3 VPC endpoint correctly I think,

because I created an EC2 instance in the sa

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-05 07:42

    If you want to allow an AWS Lambda to access Amazon S3, use one of these methods:

    • Do not associate the function to a VPC. Access is then automatic.
    • If the function is attached to a public subnet in the VPC, associate an Elastic IP to the Lambda function's ENI that appears in the VPC (Not recommended)
    • If the function is attached to a private subnet in the VPC, launch a NAT Gateway in the public subnet and update Route Tables. Traffic will flow to the Internet via the NAT Gateway.
    • Add an Amazon S3 VPC Endpoint in the VPC and update Route Tables. Traffic will flow through that instead of the Internet Gateway.

提交回复
热议问题