Lambda in VPC Hands OnΒΆ
We are going to create an empty security group in EC2.
Then, in Lambda, we can go to Configuration - VPC
and set it up:
This will fail because the lambda execution role doesn't have CreatenetworkInterface permission.
So, we need to attach this permission to the execution role.
After that's done, we can see the new network interfaces in EC2 - Network Interfaces
.