ROLLBACK_COMPLETE roadblock
If you try and deploy a SAM template, but mess something up, then you get an error message with no help on how to fix it.
Today, I accidentally defined two attributes in a DynamoDB resource and it invoked a rollback. I fixed the issue, bu the next deploy had this:
Error: Failed to create changeset for the stack: xxxx, An error occurred (ValidationError) when calling the CreateChangeSet operation: Stack:arn:aws:cloudformation:eu-west-1:xxxxx:stack/xxxx/xxxx is in ROLLBACK_COMPLETE state and can not be updated.
Well, that's not very useful. There's no instructions on what to do next. No force command on the CLI, nothing.
The tool should offer help.
Closing as we are tracking it in a related issue: https://github.com/aws/aws-sam-cli/issues/2191
Just for anyone who reads this, the right thing to do here is to destroy the CloudFormation stack and create it again.
You can only get into the ROLLBACK_COMPLETE state when attempting to create a stack for the first time, so there should be no risk of losing data etc.
@morefaey Locally I can invoke sam no problem but as soon as I do sam deploy, it goes to ROLLBACK_COMPLETE saying the size limit which shouldn't be the case since it's dockerized and limit is 10 GB as opposed to 250 MB for lambda. Any advice here?
Resource handler returned message:
"Unzipped size must be smaller than
262144000 bytes (Service: Lambda, Status
Code: 400, Request ID:
edcfb9f4-a192-4e7f-8425-d42d08f41f10)"
(RequestToken:
ae65205d-b6fe-9945-66ec-3be0b7ddf06b,
HandlerErrorCode: InvalidRequest)
ROLLBACK_IN_PROGRESS AWS::CloudFormation::Stack EVERFLOWAPIFUNCTION The following resource(s) failed to
create: [EFApiFunction]. Rollback
requested by user.