Lambda creating ENI everytime it is invoked: Hitting limit

前端 未结 2 701
-上瘾入骨i
-上瘾入骨i 2020-12-29 12:20

My Lambda accesses resources on my VPC so as instructed in the documentation I\'ve given the Lambda a role to create network interfaces. I was under the assumption that the

2条回答
  •  暖寄归人
    2020-12-29 12:49

    As Mark suggested, the issue was my AWS Lambda didn't have the DeleteNetworkInterface Action specified in the role(Policy) that the lambda was set to. By giving the appropriate policy the Lambda now detaches and deletes the ENI when done.

            {
                "Effect": "Allow",
                "Resource": "*",
                "Action": [
                    "ec2:DescribeInstances",
                    "ec2:CreateNetworkInterface",
                    "ec2:AttachNetworkInterface",
                    "ec2:DescribeNetworkInterfaces",
                    "ec2:DeleteNetworkInterface",
                    "ec2:DetachNetworkInterface",
                    "ec2:ModifyNetworkInterfaceAttribute",
                    "ec2:ResetNetworkInterfaceAttribute",
                    "autoscaling:CompleteLifecycleAction"
                ]
            }
    

提交回复
热议问题