Guided Lab: Creating a Capacity Reservation (Mock)
Description
AWS Capacity Reservation is a feature provided by Amazon Web Services (AWS) that enables you to reserve capacity for your Amazon EC2 instances in a specific Availability Zone for any duration. This feature is particularly useful for applications that require specific host or instance placement. By reserving compute capacity in advance, you can ensure that it is available when you create instances against the reservation. There is no minimum time or size commitment, and you can create, modify, and terminate your capacity reservation at any time.
Objectives
In this lab, you will:
- Understand Capacity Reservations
- Learn how to create a Capacity Reservation
Lab Steps
Create a Capacity Reservation to reserve compute capacity for your instances in a specific Availability Zone for any duration
1. Navigate to the search bar, type “EC2”, and click to open the EC2 Dashboard.
2. On the left-hand panel, select Capacity Reservations under the Instances. You will be redirected to the Capacity Reservation dashboard. In the Capacity Reservation types, select the Create On-Demand Capacity Reservation and click Get started.
3. When creating a Capacity Reservation, it’s important to configure the Instance details section properly. The instance type, platform, and Availability Zone of the instances that you plan to launch must match the instance type, platform, and Availability Zone specified in the reservation. If there is a mismatch, the Capacity Reservation will not apply. For example, if an open Capacity Reservation doesn’t match, an instance launch that targets that Capacity Reservation explicitly will fail.
- Instance Type– The type of instance to launch into the reserved capacity. An example is
t3.micro
. - Platform – The operating system for your instances. For this lab, we will use Linux as the Operating System.
- Availability Zone– Specify the Availability Zone where you want to reserve the capacity.
- Tenancy – Specify whether to run on shared hardware (default) or a dedicated instance.
- (Optional) Placement group ARN – The ARN of the cluster placement group in which to create the Capacity Reservation.
- Quantity – The request will be denied if the specified number of instances exceeds the remaining On-Demand Instance limit for the chosen instance type.
4. Configure the following settings in the Reservation details section:
- Reservation Ends – Choose one of the following options:
- Manually – Reserve the capacity until you explicitly cancel it. Note that it will remain active in your account and continue to be billed until you manually cancel it.
- Specific time – Cancel the capacity reservation automatically at the specified date and time.
For this lab, we will use the Specific Time.
- Instance eligibility – Choose one of the following options:
- Open – The Capacity Reservation automatically places an instance into reserved capacity if it has matching attributes (instance type, platform, and Availability Zone).
- Targeted– The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and that explicitly target the reservation.
5. If you have finished the configuration, click the Create button.
A confirmation window for creating the Capacity Reservation will appear. Select Confirm.
Note: This lab is for mock creation only; therefore, you won’t be able to actually reserve capacity.