amazon-web-services - CloudFormation 失败,出现 ec2 :RequestSpotFleet IAM error

标签 amazon-web-services aws-cloudformation

我尝试通过 CloudFormation 创建 AWS Spot 队列,但收到此权限错误。我通过根帐户创建此堆栈,因此我没有看到通过 CloudFormation 出现 IAM 错误的可能原因。

我正在使用 root 帐户凭据从 CLI 创建此堆栈。

有人遇到过这种情况吗?

CloudFormation failure image

最佳答案

我会检查 Amazon EC2 Spot Fleet Role 的说明:

If you create a managed compute environment that uses Amazon EC2 Spot Fleet Instances, you must create a role that grants the Spot Fleet permission to bid on, launch, tag, and terminate instances on your behalf. Specify the role in your Spot Fleet request. You must also have the AWSServiceRoleForEC2Spot and AWSServiceRoleForEC2SpotFleet service-linked roles for Amazon EC2 Spot and Spot Fleet.

另外,引用 Spot Fleet Pre-requisites 上的文档:

If you use the Amazon EC2 console to create a Spot Fleet, it creates a role named aws-ec2-spot-fleet-tagging-role that grants the Spot Fleet permission to request, launch, terminate, and tag instances on your behalf. This role is selected when you create your Spot Fleet request.

If you use the AWS CLI or an API instead, you must ensure that this role exists.

关于amazon-web-services - CloudFormation 失败,出现 ec2 :RequestSpotFleet IAM error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58168909/

相关文章:

aws-cloudformation - Codepipeline 创建的标签堆栈

aws-cloudformation - 当 bash 脚本失败时回滚 AWS 堆栈创建

amazon-web-services - 有没有办法从 CFT 中的 DNS 名称获取 HostedZoneId?

aws-cloudformation - 如何使用 CloudFormation 定义 ECR 生命周期策略

amazon-web-services - 无法通过 CFT 在 CodeBuild 项目上成功设置 SNS,但可以手动工作

php - AWS SignatureDoesNotMatch 错误但签名代码和 key 对似乎都有效

bash - AWS CLI 挂起等待用户输入

amazon-web-services - 如何使用 AWS CloudFormation 为 SNS 订阅指定 'Raw Message Delivery'?

python - 使用 Python SDK 的内置算法的 Amazon SageMaker 超参数调整错误

python-3.x - 如何在 AWS Lambda Python 3.6 环境中运行 aws-cli?