serverless-components / express

⚡ Take existing Express.js apps and host them easily on cheap, auto-scaling, serverless infrastructure (AWS Lambda and AWS HTTP API).
https://serverless.com/components
Apache License 2.0
375 stars 34 forks source link

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

Open vinnyt123 opened 2 years ago

vinnyt123 commented 2 years ago

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.

Cameron-C-Chapman commented 2 years ago

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
vinnyt123 commented 2 years ago

Thank you! I will try that out 😄

Cameron-C-Chapman commented 2 years ago

@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

vinnyt123 commented 2 years ago

@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?

jyounus commented 2 years ago

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.

vinnyt123 commented 2 years ago

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.