Search code examples
amazon-web-servicesaws-lambdaamazon-vpcterraform-provider-awsaws-security-group

Lambda security group deletion hanging and can't be deleted in AWS console


I used Terraform to create a security group and lambda, I changed the security name and wanted to apply terraform again, Terraform is trying to delete the old security group and create the one with the new name.

But the logs show me that it's been trying to delete the old security group for almost half an hour!!!! I looked for solution online, a potential solution is that I can delete the group in the console, but AWS warned me that it can't be deleted because there are network interfaces attached to it, so I tried to deleted the network interfaces, but they can't be dettached & deleted, and the status showed in use.

Has anyone encountered this situation? Please help me....Thanks.


Solution

  • Based on the comments, this is resolved by deleting the associated lambda from the console manually.

    Update: Issue affecting HashiCorp Terraform resource deletions after the VPC Improvements to AWS Lambda

    Why can't I detach or delete an elastic network interface created by Lambda?