I have an EC2 in a VPC. I created a lambda function without configuring VPC (so lambda console shows No VPC). but it still can start, stop the EC2. (in the lambda service role, I grant permission to start, stop ec2), question 1: Why the lambda can access ec2 even if it is not in the VPC of the ec2?
however, the same lambda function cannot access the web server installed in the EC2 using http://website_of_ec2.com. unless I configure the lambda with VPC, subnet and security group (the same VPC as EC2) question 2: why in this case the lambda need to have VPC configured?