Search⌘ K
AI Features

A Closer Look at EC2 Instance Type: CLI Parameters

Explore how to specify EC2 instance types via AWS CLI and configure advanced options such as CPU cores, unlimited CPU credits, and hibernation. Understand practical commands to create, view, and manage instances effectively using AWS CLI parameters.

We'll cover the following...

Now that we know about the different instance types and classes, let’s take a look at the CLI options related to specifying the instance type and put our knowledge into practice!

CLI parameters

Now, let’s see how we can select instance types through the CLI and how we can set more advanced options, like T2 unlimited.

The following CLI parameters are available:

Shell
[--instance-type <value>]
[--credit-specification <value>]
[--cpu-options <value>]
[--hibernation-options <value>]

The first one, --instance-type, is straightforward, and we have used it before. With this parameter, we can specify the instance type we want to create. This parameter is mandatory, so we always need to set it when creating EC2 instances.

With --credit-specification, we can specify if we want to enable unlimited CPU credits (at an ...