I have a AWS Lambda function that points to an application load balancer URL when triggered. This load balancer sits in a public subnet.
I was required to attach a VPC to the Lambda function to prevent it from going over the internet as the public subnet NACLs were too permissive.
After attaching my Lambda function to the VPC, I attached a Security Group to the VPC configuration. The Lambda function now sits within the private subnet.
# inbound
HTTPS TCP 443 0.0.0.0/0
#outbound
ALL ALL 443 0.0.0.0/0
The private subnets have a route in their Route Table that points to a NAT Gateway. In addition, the NACL attached to the private subnet looks like this:
100 All traffic All All 0.0.0.0/0 Allow
* All traffic All All 0.0.0.0/0 Deny
Why is my Lambda function not able to hit the application load balancer?