2 Answers
- Newest
- Most votes
- Most comments
1
Most probable cause is because your lambda function is not being able to communicate with Lambda Service, for not having either a NAT Gateway/instance to access internet or not having a vpc endpoint to lambda service. Please check:
answered 7 months ago
Relevant content
- asked 6 years ago
- Accepted Answerasked 19 days ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Sorry, I don't understand. Lambda can't "answer" to API Gateway or Lambda can't start because VPC haven't some configuration? I don't need internet access on my lambda
Hi Luca, the execution environments where your lambda function code is executed, need communication back with Lambda service itself. By default, Lambda runs your functions in a secure VPC with access to AWS services and the internet. Lambda owns this VPC, which isn't connected to your account's default VPC. When you connect a function to a VPC in your account, the function can't access the internet unless your VPC provides access. To access Lambda service endpoints it needs access via either by your vpc gateways (nat gateway and internet gateway) or by a vpc interface endpoint.