up: Deployment Fails with "ResourceConflictException" in Lambda
Prerequisites
- [ v] I am running the latest version. (
up upgrade) - [ v] I searched to see if the issue already exists.
- [ v] I inspected the verbose debug output with the
-v, --verboseflag. - [ v] Are you an Up Pro subscriber?
Description
Please see: https://apex-dev.slack.com/archives/C65P0GAV8/p1631749067003000 … and: https://aws.amazon.com/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/
I have this issue too, but it was first reported by Ben Nichols on the Slack #up channel.
Whether via CLI up staging and up production, or, via in my case Github Actions, you get an error like:
Error: deploying: <region>: updating function code: ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:<region>:<arn_id>:function:my_func
… and the deployment fails.
Steps to Reproduce
Make a visible change in one of your branches and do up staging or up production as appropriate, or git push to the branch and have your CI run it. Either way, you get an error like the above.
As Ben Nichols mentioned, you can add aws:states:opt-out as the lambda description, to bypass the problem, but it’s reportedly going to stop working as of 1st Oct 2021.
This feels like something other up users are suddenly going to experience, so it’s my hope that someone can figure out how to change the code to fix this problem urgently.
Slack
Join us on Slack https://chat.apex.sh/
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 32 (8 by maintainers)
Confirmed I get the latest version and it works on the site that was failing. Thanks!
Edit: I mean I got the latest version automatically when deploying via GH actions. Also, running
up upgradefrom my$HOMEupgraded showing a progress bar, then gave a message “Updated 1.7.0 Pro to 1.7.1 Pro”.Ok if you
up upgradeyou should get v1.7.1-pro now with 0b09440, and if you run with-vyou should see a bunch of logs mentioning checking and waiting for the state to change, curious to know how long it’s actually stuck in a pending state if that is what’s going onyikes so I guess you need to poll/wait before UpdateFunctionCode, UpdateFunctionConfiguration, and PublishVersion by the looks of it haha… good old AWS, making things slow and difficult. I’ll have to add some reasonable limit for now when it comes to the wait so it doesn’t hang forever, but ideally it’s configurable
we are also seeing this issue. setting
aws:states:opt-outas the function description seems to have gotten us going again but its definitely a temporary fix that will break once AWS decides to force lifecycles on everyoneI’m not having any luck reproducing it actually, I’m still able to deploy my apps with 1.7.0-pro and I tried doing a few fresh application stacks as well. Are you guys seeing any particular pattern or is it across all of your apps?
I was about to make the same post.
I even tried a fresh app from the README, it deploys the first time but after that I can’t do any more deployments. I can’t figure out why it would suddenly stop working,