AWS Fundamentals Logo
AWS Fundamentals
AWS::EC2::EC2Fleet

EC2 EC2Fleet

Resource Type definition for AWS::EC2::EC2Fleet

Properties

12 configurable properties. 2 required. Click a row to see details.

Filter:
PropertyTypeFlags
LaunchTemplateConfigs
Array<FleetLaunchTemplateConfigRequest>
RequiredCreate-only
TargetCapacitySpecification
TargetCapacitySpecificationRequest
Required
Context
string
ExcessCapacityTerminationPolicy
string
OnDemandOptions
OnDemandOptionsRequest
Create-only
ReplaceUnhealthyInstances
boolean
Create-only
SpotOptions
SpotOptionsRequest
Create-only
TagSpecifications
Array<TagSpecification>
Create-only
TerminateInstancesWithExpiration
boolean
Create-only
Type
string
Create-only
ValidFrom
string
Create-only
ValidUntil
string
Create-only

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
FleetIdstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::EC2Fleet

Resources:
  MyResource:
    Type: AWS::EC2::EC2Fleet
    Properties:
      TargetCapacitySpecification: "value"
      LaunchTemplateConfigs: []

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

ec2:CreateFleetec2:DescribeFleetsec2:CreateTagsec2:RunInstancesiam:PassRoleec2:DescribeCapacityReservations

delete

ec2:DescribeFleetsec2:DescribeFleetInstancesec2:DescribeInstanceStatusec2:DeleteFleetsec2:TerminateInstances

list

ec2:DescribeFleets

read

ec2:DescribeFleets

update

ec2:ModifyFleetec2:DescribeFleets

Get the EC2 Cheat Sheet

Everything you need to know about EC2 on one page. HD quality, print-friendly.

Download Free Infographic

Quick Facts

ServiceEC2
Properties13
Required2
TaggingNot supported
Primary IDFleetId

Supported Operations

CreateDeleteListReadUpdate

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

LaunchTemplateConfigsOnDemandOptionsReplaceUnhealthyInstancesSpotOptionsTagSpecificationsTerminateInstancesWithExpirationTypeValidFromValidUntilTargetCapacitySpecification/TargetCapacityUnitTypeTargetCapacitySpecification/DefaultTargetCapacityType

External Links