AWS lambda to check if it has access to the internet. I'm using it to test internet access from the VPCs.
- Go to AWS console -> Lambda and create new function.
- Copy code from index.js
- Paste the code to the editor in AWS console.
- Add lambda to the appropriate VPC, subnets and security groups (depending what you want to test).
- Run the test by clicking "TEST" button in the top right in AWS lambda console.
- Examine the logs.
If lambda times out it is usually a good indication you don't have internet access.