ec2:CreateCapacityReservation

Write

ec2:CreateCapacityReservation is a Write access-level action in the ec2 service. Grants permission to create a Capacity Reservation

Resource types

ARNs that ec2:CreateCapacityReservation can be scoped to in an IAM policy.

arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation/${CapacityReservationId} required
capacity-reservation

Condition keys

Keys you can use in the Condition block of a policy that grants ec2:CreateCapacityReservation.

ec2:Region String

Filters access by the name of the AWS Region

aws:RequestTag/${TagKey} String

Filters access by a tag key and value pair that is allowed in the request

aws:TagKeys ArrayOfString

Filters access by a list of tag keys that are allowed in the request

ec2:AvailabilityZone String

Filters access by the name of an Availability Zone in an AWS Region

ec2:AvailabilityZoneId String

Filters access by the ID of an Availability Zone in an AWS Region

ec2:CapacityReservationFleet ARN

Filters access by the ARN of the Capacity Reservation Fleet

ec2:EbsOptimized Bool

Filters access by whether the instance is enabled for EBS optimization

ec2:EndDate Date

Filters access by the date and time at which the Capacity Reservation ends

ec2:EndDateType String

Filters access by the way in which the Capacity Reservation ends

ec2:EphemeralStorage Bool

Filters access by whether the instance is enabled for ephemeral storage

ec2:InstanceCount Numeric

Filters access by the number of instances

ec2:InstanceMatchCriteria String

Filters access by the type of instance launches that the Capacity Reservation accepts

ec2:InstancePlatform ARN

Filters access by the type of operating system for which the Capacity Reservation reserves capacity

ec2:InstanceType String

Filters access by the type of instance

ec2:OutpostArn ARN

Filters access by the ARN of the Outpost

ec2:PlacementGroup ARN

Filters access by the ARN of the placement group

ec2:Tenancy String

Filters access by the tenancy of the VPC or instance (default, dedicated, or host)

Example IAM policy

A minimal policy that allows ec2:CreateCapacityReservation. Replace "Resource": "*" with a specific ARN to follow least privilege.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowEc2CreateCapacityReservation",
      "Effect": "Allow",
      "Action": "ec2:CreateCapacityReservation",
      "Resource": "*"
    }
  ]
}

Related actions in ec2

View all ec2 actions →