CmdID

CmdID / aws / aws ec2

aws ec2 modify-fleet

Modifies the specified EC2 Fleet. AWS CLI reference

1 example 6 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To scale an EC2 Fleet

The following modify-fleet example modifies the target capacity of the specified EC2 Fleet. If the specified value is greater than the current capacity, the EC2 Fleet launches additional instances. If the specified value is less than the current capacity, the EC2 Fleet cancels any open requests and if the termination policy is terminate, the EC2 fleet terminates any instances that exceed the new target capacity.

aws ec2 modify-fleet --fleet-id fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE --target-capacity-specification TotalTargetCapacity=5Identify
--fleet-idThe ID of the EC2 Fleet.
--target-capacity-specificationThe size of the EC2 Fleet.
Its output
{
    "Return": true
}

For more information, see Manage an EC2 Fleet in the Amazon EC2 User Guide.

Options

6 in the AWS CLI reference
--contextReserved.
--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.
--excess-capacity-termination-policyIndicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
--fleet-idThe ID of the EC2 Fleet.
--launch-template-configsThe launch template and overrides.
--target-capacity-specificationThe size of the EC2 Fleet.