ResourceConflictException: … An update is in progress for resource: …

0

After deploying (update) a Lambda for about 150 times in an automated way using CI, this suddenly fails since in eu-west-1 since 2021-09-14 ~16:17 CET.

ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:eu-west-1:NNNNNNNN:function:XXXXXXXX  

The last successful deploy was 2021-09-14 ~16:17 CET.

The 2 last successful deploys now fail too, with the same error.

Details are described and followed-up in [claudia/issues/226](https://github.com/claudiajs/claudia/issues/226).

The closest issue comparable to what I see is [Terraform aws_lambda_function ResourceConflictException due to a concurrent update operation #5154](https://github.com/hashicorp/terraform-provider-aws/issues/5154#issuecomment-423912491), where it says, in 2018,

OK, I've figured out what's happening here based on a comment here: AWS has some sort of limit on how many concurrent
modifications you can make to a Lambda function.

I am pretty sure now that something changed on the side of AWS, either in general, in for this instance.

Does anybody have any clue? Did something change? How can this be mitigated?

jandeca
asked 3 years ago4947 views
3 Answers
0
jandeca
answered 3 years ago
0

I'm having this same problem. It started yesterday and it only happens with one lambda function. Other lambda functions are deployed just fine.

I also noticed that the ci/cd tool is using an old version of the AWS SDK (1.11.834), and if I deploy the code using AWS CLI (2.2.37) it works. Could this be related?

Edited by: raulbarreto-delivion on Sep 16, 2021 7:11 AM

answered 3 years ago
0

AWS are rolling out this change
https://aws.amazon.com/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/

You need to put a check for the function state in between the update_function_code and the publish version calls

Make sure the state is active before proceeding
https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html

Stuart
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions