AWS Lambda:The provided execution role does not have permissions to call DescribeNetworkInterfaces on EC2

前端 未结 6 1515
难免孤独
难免孤独 2021-02-06 21:17

Today I have a new AWS Lambda question, and can\'t find anywhere in Google.

I new a Lambda function, there is no question. But when I input any code in this function[eg.

6条回答
  •  北海茫月
    2021-02-06 21:55

    Here's a quick and dirty way of resolving the error.

    Open IAM on AWS console, select the role that's attached to the Lambda function and give it the EC2FullAccess permission.

    This will let you update the Lambda VPC by granting EC2 control access. Be sure to remove the permission from the role, the function still runs.

    Is it more or less secure than leaving some permissions attached permanently? Debatable.

提交回复
热议问题