0
votes

I'm trying to create an AWS spot fleet through CloudFormation, but I'm getting this permission error. I'm creating this stack through a root account, so I don't see a possible reason for an IAM error via CloudFormation.

I'm creating this stack from the CLI with root account credentials.

Has anybody encountered this before?

CloudFormation failure image

1

1 Answers

0
votes

I would check the instructions for the 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.

Also, to quote the documentation on 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.