I'm using Lambda@Edge (Cloudfront + lambda functio...
# aws
I'm using Lambda@Edge (Cloudfront + lambda functions). When I try to destroy the stack, and occasionally when I update (and am removing functions), I get this error from AWS. Any ideas how to work around this?
Copy code
error: deleting urn:pulumi:zzz::deploy::aws:lambda/function:Function::xxx: Error deleting Lambda Function: InvalidParameterValueException: Lambda was unable to delete arn:aws:lambda:us-east-1:1111:function:xxx:1 because it is a replicated function. Please see our documentation for Deleting Lambda@Edge Functions and Replicas.
According to the documentation (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-edge-delete-replicas.html), these functions get deleted automatically when the associated CloudFront distribution is deleted. Is there some way to ignore a delete? Maybe
I thought
{ protect: true}
might help, but that just gives me another error:
Copy code
error: refusing to delete protected resource 'urn:pulumi:zzz::deploy::aws:lambda/function:Function::xxx'