Reputation: 27594
I'm trying to delete an AWS Lambda function through the GUI, but am getting a response: There was an error deleting your function: Lambda was unable to delete arn:aws:lambda:us-east-1:624929674184:function:lambda-auth:1 because it is a replicated function.
How can one delete replicated Lambda functions?
Upvotes: 11
Views: 21173
Reputation: 4200
If you tried every other answer, and it's still not deleting - wait 5-10 minutes and try again.
Upvotes: 3
Reputation: 1485
BHEERAJ's answer is good, but in my exact case I waited like 6 hours and nothing changed and the error was still ocurring, but then I also removed related S3 buckets (and to remove the bucket, I had to remove items inside it first):
https://s3.console.aws.amazon.com/s3
Then in about half a hour I tried to remove those Lambda functions, and finally it actually deleted.
Upvotes: -1
Reputation: 611
I have figured out the solution to delete Lambda@edge replica.
Note!> Please remember to delete any IAM Roles and Permissions associated with Lambda@edge Functions.
I hope this will work :)
Please refer the link Delete Lambda@Edge Functions and Replicas, you will find it much useful.
Upvotes: 14
Reputation: 5065
Replicated functions are something Lambda@Edge
uses, so I assume that's the case here even though it's not stated. You should review this document on how to delete these. You can't manually delete them at this time:
You can delete a Lambda@Edge function only when the replicas of the function have been deleted by CloudFront. Replicas of a Lambda function are automatically deleted in the following situations:
After you have removed the last association for the function from all of your CloudFront distributions. If more than one distribution uses a function, the replicas are removed only after the function is disassociated from the last one.
After you delete the last distribution that a function was associated with.
Replicas are typically deleted within a few hours.
Note:
Replicas cannot be manually deleted at this time. This helps prevent a situation where a replica is removed that you're still using, which would result in an error.
Upvotes: 6