Get info about current VPC/subnet within lambda?

Is there an easy way to determine the current VPC/subnet information from within a lambda function?

I’d like to be able to have a simple function that does some information gathering for me. I can think of a few possible ways to do it, just wondering if anyone knows of anything natively direct.

  1. Get current IP address
  2. Find and describe ENI with that IP
  3. Get info about subnet/vpc that ENI resides in

Thanks

Probably the easiest way would be the Lambda GetFunctionConfiguration API.

doh. I feel dumb. Somehow I had missed that function’s existence.

Looks like I can just pass the function name. Awesome. Thanks!

Don’t feel dumb! This stuff is not obvious.

are you talking about the world of tutorials where they expect you to spend the next two months reading it all sequentially or the world of documentation which only indexes words expecting searches to be done only by people who already know the material they are searching for?