AWS SAM 使用 aws-sam-cli 将代码库部署到 AWS 云,但出现以下错误。
Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Requires capabilities : [CAPABILITY_IAM]
当您创建或部署堆栈时,您需要显式允许创建 IAM 资源。为此,您需要在调用时添加参数sam deploy
:
--capabilities CAPABILITY_IAM
如果您想创建命名 IAM 资源(例如您显式指定名称的角色或用户),您将需要使用--capabilities CAPABILITY_NAMED_IAM
反而。
您可以在此处阅读有关在 CloudFormation 中部署 IAM 资源的更多信息:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capability https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities
SAM部署文档:https://github.com/awslabs/aws-sam-cli/blob/develop/docs/deploying_serverless_applications.rst#deploying-your-application https://github.com/awslabs/aws-sam-cli/blob/develop/docs/deploying_serverless_applications.rst#deploying-your-application
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)