-1

I thought I had an understanding of AWS security groups, but this doesn't make any sense.

I have a Lambda Function that is inside of my VPC.

It is assigned a security group (TestLambdaSG).

TestLambdaSG has inbound HTTP/HTTPS rules from IP 1.2.3.4/32

I can connect to my Lambda Function from my IP. Why?

AWS says that security groups are restrictive by default, so I shouldn't be able to connect. My Lambda function is an API that I created a test route that returns a "Success" message.

https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-security-groups.html

1 Answers1

3

The security group assigned to lambda only used to validate outgoing traffic , it is impossible to access the lambda directly through the socket connection. Therefore I dont think lambda security group's inbound rules are any useful.

But other services such as API gateway can invoke a lambda. An API gateway is publicly available by default when it is deployed.

That's why it's accessible from postman for you.

Arun Kamalanathan
  • 8,107
  • 4
  • 23
  • 39