AWS SAM - Failed to create the changeset: Waiter ChangeSetCreateComplete failed
Asked Answered
H

3

30

AWS SAM deploying codebase to AWS cloud using aws-sam-cli but it throw me below error.

Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Requires capabilities : [CAPABILITY_IAM]

Hamnet answered 8/9, 2018 at 12:52 Comment(0)
P
55

When you're creating or deploying a stack you need to explicitly allow creation of IAM resources. To do that, you need to add the parameter when calling sam deploy:

--capabilities CAPABILITY_IAM

If you want to create named IAM resources (e.g. roles or users where you explicitly specify the name), you'll want to use --capabilities CAPABILITY_NAMED_IAM instead.

You can read more about deploying IAM resources in CloudFormation here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities

SAM deployment documentation: https://github.com/awslabs/aws-sam-cli/blob/develop/docs/deploying_serverless_applications.rst#deploying-your-application

Posthorse answered 8/9, 2018 at 17:27 Comment(3)
thanks its work fine with --capabilities CAPABILITY_IAM flagHamnet
thanks Could SAM be anymore opiniated ;(Relate
Ok, 'funny' this didn't work for me: sam deploy --config-env default --profile myprofile –-capabilities CAPABILITY_IAM But this did: sam deploy --config-env default --capabilities CAPABILITY_IAM --profile myprofileLamebrain
B
2

Do check your YAML file indentation. review the YAML file once again, if it's a tad bit not up to the SAM standards it will throw this error. DO check once again.

Bannock answered 16/4, 2021 at 23:15 Comment(0)
U
1

Search the stack in cloudformation and delete it, and then try to run the command again, this helped me solve the problem

Unavailing answered 7/10, 2022 at 7:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.