Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower
hourly rate compared to On-Demand instance pricing.
Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings
that match your specifications. After you've purchased a Reserved Instance, you can check for your
new Reserved Instance with DescribeReservedInstances.
To queue a purchase for a future date and time, specify a purchase time. If you do not specify a
purchase time, the default is the current time.
We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide.
example
Use a bare-bones client and the command you need to make an API call.
Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.
Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances.
To queue a purchase for a future date and time, specify a purchase time. If you do not specify a purchase time, the default is the current time.
For more information, see Reserved Instances and Reserved Instance Marketplace in the Amazon EC2 User Guide.
We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, PurchaseReservedInstancesOfferingCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, PurchaseReservedInstancesOfferingCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new PurchaseReservedInstancesOfferingCommand(input); const response = await client.send(command);
PurchaseReservedInstancesOfferingCommandInput for command's
input
shape.PurchaseReservedInstancesOfferingCommandOutput for command's
response
shape.config for EC2Client's
config
shape.