Skip to content

Trouble configuring VPC

0

I am trying to configure VPC for a lambda function, but get the error message: 'The provided execution role does not have permissions to call CreateNetworkInterface on EC2'. I have tried to give the execution role the following permissions:execution role permissions The VPCpermission-role is a custom role with the following inline-permissions: custom permissions I still get the same error message trying to configure the VPC.

Any help would be greatly appreciated!

3 Answers
0

Hi,

Could you double check an answer I provided a month ago to similar issue?

https://repost.aws/questions/QUJDtnFc8vQh67h81Bd3sVTQ/error-message-connecting-lambda-vpc-with-documentdb-the-provided-execution-role-does-not-have-permissions-to-call-createnetworkinterface-on-ec2

Otherwise, one option you can try is to remove the permissions, save the iam role, and re add them.

Hope it helps ;)

EXPERT
answered 3 years ago
  • I actually stumbled upon your answer while I was looking for a solution, ands subsequently tried it, but it didn't solve my problem. I will give removing and re-adding the permissions a go.

0

The lambda execution role is specific to the lambda function itself. I have a feeling you are getting confused between the role you are using to access AWS vs. this execution role. You shouldn't need to "configure" a VPC for Lambda, Lambda does this by itself when you place it inside a VPC and it has the correct permissions. You can find a Lambda's execution role via this screen in the console:

Enter image description here

AWS
answered 3 years ago
  • I am referring to the same execution role that you highlighted on the image you posted, not an IAM user. As for the VPC configuration I am referring to the VPC tab below "Permissions". As of now it is empty ('No VPC configuration This function isn't connected to a VPC.'), but I am trying to connect it to a VPC I have already created, apologies if that was a bit unclear.

0

If it can help narrow it down, this is a list of permissions that should be active for the execution role: permission list

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.