title: aws Lambda created ENI not deleting while deletion of stack
body: <p>CloudFormation creates Lambda function. When the function is executed an ENI is provisioned automatically by lambda. The ENI seems to be left in existence after function execution for to speed up subsequent function execution. CloudFormation deletes the lambda function. The<code>EN</code> remains behind. When attempting to delete the <code>VPC CloudFormation stack</code>, stack deletion fails as the ENI is using a <code>security group and subnet</code>.</p>
  
  <p>in my <code>lambda role</code> the <code>delete permission</code> are there.</p>
  
  <blockquote>
    <p>"Effect": "Allow", "Action": [ "ec2:CreateNetworkInterface", "ec2:DeleteNetworkInterface", "ec2:DescribeNetworkInterfaces" ], "Resource": "*"</p>
  </blockquote>
  
  <p>I am using custom resource to run the lambda from CloudFormation template, so lambda will be called both stack creation and deletion. The ENI will be used in creation of stack and deletion of stack. Now how to handle the eni deletion?</p>