11/17/2020, 12:08 AM
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?
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 (, 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:
error: refusing to delete protected resource 'urn:pulumi:zzz::deploy::aws:lambda/function:Function::xxx'