0
votes

I am trying to deploy an EC2 Fleet against a custom AMI I have created. I am getting the following:

Repeated errors have occurred processing the launch specification "c5.large, ami-xxxxxxxx, Linux/UNIX, us-east-1b while launching spot instance". It will not be retried for at least 13 minutes. Error message: com.amazonaws.services.ec2.model.AmazonEC2Exception: Spot instance requests are not supported for this AMI. (Service: AmazonEC2; Status Code: 400; Error Code: UnsupportedOperation)

The base AMI deploys just fine, but my custom AMI derived from that base AMI does not. For brevity, we can assume the only difference between my custom AMI and the base is a handful of RPM packages and some files created at /root and that the AMI is being created from a source EC2 instance.

Amazon's documentation lists the following EC2 Fleet Limitations

The following limitations apply to EC2 Fleet:

  • EC2 Fleet is available only through the API or AWS CLI.
  • You need to create a separate EC2 Fleet for each region.

However I can't seem to find anything about which AMI's are supported.

Does EC2 Fleet support custom AMIs? If so, what are the restrictions, if any?

1
What is your definition of a custom AMI (what level of changes did you make and how did you create the AMI)?John Hanley
You answer does not provide any details on what level of changes that you made to the instance. You did something that AWS does not like. Edit your question and provide the details.John Hanley
The first step that I would do is launch an instance, shutdown, create an AMI and verify that the AMI is still supported. Some AMIs have license restrictions. For whatever reason you just don't want to provide details so that someone can help you.John Hanley
I am saying create an instance and then shutdown. Don't make any changes. In your description your are modifying the system by installing RPMS. Some RPMs can modify the version of the OS. In some cases, OS updates can make the system unbootable on AWS (and Azure, etc.). If you ask for help, provide the details asked. I will leave this thread. Hopefully someone can help you.John Hanley

1 Answers

0
votes

It is possible to deploy EC2 Fleets with custom AMI's.

Currently the only way to deploy EC2 Fleets vs EC2 Spot Fleets is via the aws ec2 create-fleet awscli command.

EC2 Fleets are still a new construct and are not yet a full featured service.

My issue turned out to be the fact that I was attempting to use a cloudformation template to deploy an EC2::SpotFleet, rather than an EC2 Fleet.

There are more restrictions on which AMI's can be deployed as spot instances vs on-demand instances.