Question: If I add a VPC to the Lambda, does it loose access to AWS services like DynamoDB? ***
My Lambda needs to do a fetch two HTTPS services (technically one is wss). As I understand Lambdas, they can't get to anything, even AWS services unless given. The Lambda already was able to access DynamoDB tables, but I wanted to give it the REST services as well. I read somewhere that the Lambda can't really connect almost anywhere without associating it with a VPC. To do that, I added an inline policy as described at AWS Lambda:The provided execution role does not have permissions to call DescribeNetworkInterfaces on EC2
The Lambda has a custom role which has AWS Policies:
AmazonS3FullAccess AmazonAPIGatewayInvokeFullAccess AmazonDynamoDBFullAccess AWSLambdaBasicExecutionRole
plus an inline policy (literally from the SO link above)
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeNetworkInterfaces",
"ec2:CreateNetworkInterface",
"ec2:DeleteNetworkInterface",
"ec2:DescribeInstances",
"ec2:AttachNetworkInterface"
],
"Resource": "*"
}
]
}