External internet access for a VPC enabled lambda

0

Hi,

My first lambda function has no Internet access despite following a number of similar instructions, including Amazon's own documentation.

https://aws.amazon.com/premiumsupport/knowledge-center/internet-access-lambda-function/
https://forums.aws.amazon.com/thread.jspa?messageID=705279
https://gist.github.com/reggi/dc5f2620b7b4f515e68e46255ac042a7

Attempts to run a traceroute in a lambda function to see where the problem may lie return "access denied."

  1. How does one debug routing issues if I cannot ping/traceroute/etc?
  2. Are there instructions somewhere else that actually work?

I've got hours into this problem at this point.

asked 5 years ago587 views
2 Answers
0

Hi,
To debug, I would first create a regular EC2 instance in the subnet(s) that you are using for you VPC Lambda to see if you can connect to the Internet from the EC2 instance. That way you can narrow down the scope of the problem (i.e. if you cannot connect, then you can assume for now that Lambda is NOT related to the problem).

Is the subnet you are using a public or private subnet?
If it is a private subnet, do you have a NAT Gateway setup to allow access to the internet?
You can also modify Security Groups to allow "ping"/ICMP traffic if that would be helpful.
-randy

answered 5 years ago
0

Thanks! Allowing icmp got me over the hump.

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions