express icon indicating copy to clipboard operation
express copied to clipboard

Error deploying "An update is in progress for resource:"

Open vinnyt123 opened this issue 4 years ago • 6 comments

Upon deploying a stack with this component, I now get an error. The exact same deployment worked fine a couple of months ago.

Command run: sls deploy

Output:

serverless ⚡components
Action: "deploy" - Stage: "dev" - Org: "ExampleOrg" - App: "fullstack-app" - Name: "api"

17s › Serverless › The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-east-1:example

  Documentation: https://github.com/serverless/components 
  Support: https://app.serverless.com/support 
  Slack: https://www.serverless.com/slack/ 

I believe this is due to the update of Lambda functions to include states from AWS: https://aws.amazon.com/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/.

It would be great if this could be addressed as this is a huge blocker in deploying.

vinnyt123 avatar Nov 21 '21 08:11 vinnyt123

I might be wrong but I don't think this is really maintained anymore. When I inspect the deployment package that uses the express component it's on version 3.0.0, and this npm config is set to private. I think serverless is maintaining the express component privately now.

I was in the same situation as you, and tracked down the root cause and a workaround that works until serverless updates their private express component and update the components registry.

The root cause explanation and workaround is documented in the link you referenced: https://aws.amazon.com/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/

And I was able to get passed this issue by updating my services description in the serverless.yml.

component: express
name: my-app-api

inputs:
  description: aws:states:opt-out

Cameron-C-Chapman avatar Nov 24 '21 23:11 Cameron-C-Chapman

Thank you! I will try that out 😄

vinnyt123 avatar Nov 25 '21 00:11 vinnyt123

@vinnyt123 There is a discussion about this issue going on in the main serverless repo. It looks like this fix may only work until December 6th, but the components team has been notified internally.

https://github.com/serverless/serverless/discussions/10271

Cameron-C-Chapman avatar Nov 29 '21 15:11 Cameron-C-Chapman

@Cameron-C-Chapman Thanks I'll keep an eye on that. I agree with your point that there needs to be more clarity on whether the express component is no longer maintained, or it is available via some internally maintained registry?

vinnyt123 avatar Dec 07 '21 22:12 vinnyt123

The workaround no longer works. I'm unable to deploy my express app using serverless. I will have to move away from serverless and look at https://github.com/vendia/serverless-express, which seems to be more maintained and active.

What a shame.

jyounus avatar Mar 03 '22 10:03 jyounus

Mine works again now after I reinstalled the serverless CLI on a new machine, and was prompted to run npm install -g @serverless/components to install the now separate serverless components CLI too. Then I ran components login, then components deploy, and it worked without any issues.

vinnyt123 avatar Mar 07 '22 07:03 vinnyt123