question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

serverless deploy fails with ROLLBACK_COMPLETE error

See original GitHub issue

This is a Bug Report

Description

  • What went wrong?

I got the following error message upon trying to re-deploy my function after a previous error:

Serverless Error ---------------------------------------

  Stack:arn:aws:cloudformation:us-east-2:018790755515:stack/gmail-to-expensify-forwarding-service-dev/0ac0c780-cb27-11e9-9a01-0ab95d3a5528 is in ROLLBACK_COMPLETE state and can not be updated.
  • What did you expect should have happened?

Serverless should have attempted to deploy the function.

  • What was the config you used?
---
service:
  name: gmail-to-expensify-forwarding-service

frameworkVersion: '>=1.0.0'

provider:
  name: aws
  runtime: ruby2.5
  region: ${opt:region, 'us-east-2'}
  memorySize: 128
  deploymentBucket:
    name: ${env:SERVERLESS_BUCKET_NAME}
  deploymentPrefix: serverless

package:
  include:
    - lib/**
    - bin/**
    - .env

functions:
  forwarderBegin:
    handler: bin/forwarder.begin
    description: Begins scanning for and forwarding receipts.
    timeout: 60
    events:
      - schedule:
          name: Gmail Receipt check
          description: Checks for receipts
          rate: rate(1 minute)
          enabled: true
  • What stacktrace or error message from your provider did you see?
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service gmail-to-expensify-forwarding-service.zip file to S3 (13.76 KB)...
Serverless: Validating template...
Serverless: Updating Stack...

  Serverless Error ---------------------------------------

  Stack:arn:aws:cloudformation:us-east-2:018790755515:stack/gmail-to-expensify-forwarding-service-dev/0ac0c780-cb27-11e9-9a01-0ab95d3a5528 is in ROLLBACK_COMPLETE state and can not be updated.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          linux
     Node Version:              8.16.1
     Framework Version:         1.50.0
     Plugin Version:            1.3.8
     SDK Version:               2.1.0

Similar or dependent issues:

Additional Data

Using awscli to manually delete the CloudFormation stack seems to resolve the issue.

  • Serverless Framework Version you’re using:
  • Operating System:
  • Stack Trace:
  • Provider Error messages:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

28reactions
shivamgupta211commented, Nov 8, 2019

Encountered same issue while deploying the serverless on AWS. Internally serverless create an AWS cloud formation stack by the name of your serverless name.

In my case, it was in “ROLLBACK_COMPLETE” state, so I manually deleted the stack from AWS console & redeploy the serverless again and worked perfectly.

I hope it helps you.

1reaction
cfbaocommented, Dec 4, 2019

Should serverless have done the stack removal and re-creation for users automatically? Or at least provide this as an option?

Edit: Interesting to see that there’s #5631 that’s supposed to fix this issue. Then why are we still seeing this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 10 Serverless Deployment Errors (and How to Fix Them)
Select the resource(s) that failed and click Continue update rollback. Once your stack has successfully deleted or rolled back, you can deploy ......
Read more >
Update CloudFormation stacks stuck in ... - AWS
To skip the resources that caused the rollback failures, complete the following steps in the Resolution section.
Read more >
amazon web services - Serverless lambda deploy stuck in ...
The screenshot looks like the deployment was successful, but a rollback means something failed to create and was reverted. – Aaron Stuyvenberg.
Read more >
Stack is in state and can not be updated - Seed.run
In this state, you cannot make further deployments. To get the stack working again, go to your CloudFormation console and see what caused...
Read more >
"Already exists in stack" error when attempting to re-deploy a ...
I had the same issue. It was caused by an earlier development stage where I'd created my s3 bucket manually. Removing the s3...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found