aws ec2 release-hosts
When you no longer want to use an On-Demand Dedicated Host it can be released. AWS CLI reference
1 example 1 option Its page in the AWS CLI reference
Examples
To release a Dedicated host from your account
The following release-hosts example releases a Dedicated host from your account. Instances that are on the host must be stopped or terminated before the host can be released.
aws ec2 release-hosts --host-ids=h-0029d6e3cacf1b3daIdentify--host-idsThe IDs of the Dedicated Hosts to release.Its output
{
"Successful": [
"h-0029d6e3cacf1b3da"
],
"Unsuccessful": []
}For more information, see Release an Amazon EC2 Dedicated Host in the Amazon EC2 User Guide.
Options
--host-idsThe IDs of the Dedicated Hosts to release.