AWS CloudFormation: Internal Failure. Rollback requested by user
I am creating a stack via the AWS Ruby SDK v3 and it is failing with an internal error. After a long period of time (30-40 minutes) it fails and rolls back with an internal failure. No resources show up and there are no other events.
24 May 2019 07:32:08 stack-name ROLLBACK_COMPLETE -
24 May 2019 07:31:42 stack-name ROLLBACK_IN_PROGRESS Internal Failure. Rollback requested by user.
24 May 2019 07:05:10 stack-name CREATE_IN_PROGRESS User Initiated
Launching the stack as a different (more privileged) user means that it starts immediately. I have also tried removing all resources from the stack except for one EC2 instance and the same behaviour is exhibited.
The stack is launched with capabilities CAPABILITY_IAM and CAPABILITY_NAMED_IAM . My best guess is that the user is missing an IAM policy which allows it to even start processing the stack, but I don't know how to debug it. It's a role that is used by many other deployments and cannot be easily changed. Any guidance on how to debug or what might cause this behaviour is appreciated.
The code does produce a large list of dynamically produced Parameters and Tags. From what I can tell these are working correctly as they show up in the console as expected.
The problem turned out to be that the template had a parameter:
AWS::SSM::Parameter::Name
But the role that I was using did not have enough permissions to SSM, specifically it did not have the GetParameter action. A process of elimination of trying the template in a test account with a test role and slowly adding and removing permissions determined this.