question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Destroying stack containing Lambda@Edge fails

See original GitHub issue

Deleting 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.

Screenshot 2020-07-18 at 10 27 18 PM

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
allroundexpertscommented, Nov 18, 2020

@leezen AWS will delete the function automatically (replicas included). So really if the SDK tracked these functions differently (and didn’t attempt to delete at all) it wouldn’t be a problem.

@allroundexperts did you find a workaround?

I think a simple solution Amazon could provide is to not return a 400 in this case, but just treat the call as a success (the fucntion will get deleted eventually by CloudFront anyways). If you want to show support, check out my thread on their forums https://forums.aws.amazon.com/thread.jspa?threadID=331402

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.

0reactions
lukehobancommented, Nov 19, 2022
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found