Destroying stack containing Lambda@Edge fails
See original GitHub issueDeleting Lambda@Edge functions manually is not possible as of now in AWS. The Lambda@Edge function gets deleted automatically 1 hour after the associated Cloudfront distribution gets removed. As such, Pulumi destroy
keeps on failing during that time. Ideally, Pulumi should skip the deletion of Lambda@Edge functions.

Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Lambda Edge won't delete after 5 days - AWS re:Post
The Cloudfront distro has been deleted for 5 days. I have no way to manually delete the Lambda Edge functions so I am...
Read more >(aws-cloudfront): Lambda Edge won't delete after 5 days #15010
I tried to re-deploy but it wanted me to destroy the stack fist. Well, it's been 5 days and I still cannot destroy...
Read more >Can't delete Lambda@Edge even though previously ...
Although, long story short, if the CloudFront distribution is deleted, check that there are no IAM roles associated to this Lambda function.
Read more >[CDK] CloudFront create failed, now got dangling Lambda ...
So my stack has a CloudFront distribution and a Lambda@Edge for some file resolution. Due to a zone mixup, the CF distribution errored...
Read more >class EdgeFunction (construct) · AWS CDK
Convenience resource for requesting a Lambda function in the 'us-east-1' region for use with Lambda@Edge. Implements several restrictions enforced by Lambda@ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So the only workaround that I found was using
pulumi state delete
the function in question. I think it would be more easier for Pulumi to treat replicas differently instead of Amazon directly.This is being tracked upstream in https://github.com/hashicorp/terraform-provider-aws/issues/1721.