id
stringlengths 14
16
| text
stringlengths 1
2.43k
| source
stringlengths 99
229
|
---|---|---|
4c94e6e2b46c-0 | Before creating an EC2 Fleet, Example Corp verifies that it has an IAM role with the required permissions\. For more information, see [EC2 Fleet prerequisites](manage-ec2-fleet.md#ec2-fleet-prerequisites)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-fleet-configuration-strategies.md |
e47d50180183-0 | Example Corp creates a file, `config.json`, with the following configuration for its EC2 Fleet\.
```
{
"LaunchTemplateConfigs": [
{
"LaunchTemplateSpecification": {
"LaunchTemplateId": "lt-07b3bc7625cdab851",
"Version": "1"
},
"Overrides": [
{
"InstanceType": "r3.2xlarge",
"SubnetId": "subnet-482e4972",
"WeightedCapacity": 1
},
{
"InstanceType": "r3.4xlarge",
"SubnetId": "subnet-482e4972",
"WeightedCapacity": 2
},
{
"InstanceType": "r3.8xlarge",
"MaxPrice": "0.90",
"SubnetId": "subnet-482e4972",
"WeightedCapacity": 4
}
]
}
],
"TargetCapacitySpecification": {
"TotalTargetCapacity": 20,
"DefaultTargetCapacityType": "spot" | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-fleet-configuration-strategies.md |
e47d50180183-1 | "TotalTargetCapacity": 20,
"DefaultTargetCapacityType": "spot"
}
}
```
Example Corp creates the EC2 Fleet using the following [create\-fleet](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-fleet.html) command\.
```
aws ec2 create-fleet \
--cli-input-json file://config.json
```
For more information, see [Creating an EC2 Fleet](manage-ec2-fleet.md#create-ec2-fleet)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-fleet-configuration-strategies.md |
e9a01bf7bc67-0 | The allocation strategy determines which Spot Instance pools your Spot Instances come from\.
With the `lowest-price` strategy \(which is the default strategy\), the Spot Instances come from the pool with the lowest price per unit at the time of fulfillment\. To provide 20 units of capacity, the EC2 Fleet launches either 20 `r3.2xlarge` instances \(20 divided by 1\), 10 `r3.4xlarge` instances \(20 divided by 2\), or 5 `r3.8xlarge` instances \(20 divided by 4\)\.
If Example Corp used the `diversified` strategy, the Spot Instances would come from all three pools\. The EC2 Fleet would launch 6 `r3.2xlarge` instances \(which provide 6 units\), 3 `r3.4xlarge` instances \(which provide 6 units\), and 2 `r3.8xlarge` instances \(which provide 8 units\), for a total of 20 units\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-fleet-configuration-strategies.md |
5a5644e343b0-0 | This tutorial uses a fictitious company called ABC Online to illustrate the process of requesting an EC2 Fleet with On\-Demand as the primary capacity, and Spot capacity if available\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-fleet-configuration-strategies.md |
a7e6aad0efe1-0 | ABC Online, a restaurant delivery company, wants to be able to provision Amazon EC2 capacity across EC2 instance types and purchasing options to achieve their desired scale, performance, and cost\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-fleet-configuration-strategies.md |
4da70b41673b-0 | ABC Online requires a fixed capacity to operate during peak periods, but would like to benefit from increased capacity at a lower price\. ABC Online determines the following requirements for their EC2 Fleet:
+ On\-Demand Instance capacity – ABC Online requires 15 On\-Demand Instances to ensure that they can accommodate traffic at peak periods\.
+ Spot Instance capacity – ABC Online would like to improve performance, but at a lower price, by provisioning 5 Spot Instances\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-fleet-configuration-strategies.md |
19ffc04e647c-0 | Before creating an EC2 Fleet, ABC Online verifies that it has an IAM role with the required permissions\. For more information, see [EC2 Fleet prerequisites](manage-ec2-fleet.md#ec2-fleet-prerequisites)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-fleet-configuration-strategies.md |
36f137a0161d-0 | ABC Online creates a file, `config.json`, with the following configuration for its EC2 Fleet\.
```
{
"LaunchTemplateConfigs": [
{
"LaunchTemplateSpecification": {
"LaunchTemplateId": "lt-07b3bc7625cdab851",
"Version": "2"
}
}
],
"TargetCapacitySpecification": {
"TotalTargetCapacity": 20,
"OnDemandTargetCapacity":15,
"DefaultTargetCapacityType": "spot"
}
}
```
ABC Online creates the EC2 Fleet using the following [create\-fleet](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-fleet.html) command\.
```
aws ec2 create-fleet \
--cli-input-json file://config.json
```
For more information, see [Creating an EC2 Fleet](manage-ec2-fleet.md#create-ec2-fleet)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-fleet-configuration-strategies.md |
b906a0dcd208-0 | The allocation strategy determines that the On\-Demand capacity is always fulfilled, while the balance of the target capacity is fulfilled as Spot if there is capacity and availability\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-fleet-configuration-strategies.md |
e77e2928cd5b-0 | The following are common tasks you can perform to get started using this tool\.
**Topics**
+ [Running EC2Rescue for Linux](#ec2rl_running_module)
+ [Uploading the results](#ec2rl_uploading_results)
+ [Creating backups](#ec2rl_creating_backups)
+ [Getting help](#ec2rl_getting_help) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2rl_working.md |
df7db04c5337-0 | You can run EC2Rescue for Linux as shown in the following examples\.
**Example: Run all modules**
To run all modules, run EC2Rescue for Linux with no options:
```
./ec2rl run
```
Some modules require root access\. If you are not a root user, use sudo to run these modules as follows:
```
sudo ./ec2rl run
```
**Example: Run a specific module**
To run only specific modules, use the \-\-only\-modules parameter:
```
./ec2rl run --only-modules=module_name --arguments
```
For example, this command runs the dig module to query the `amazon.com` domain:
```
./ec2rl run --only-modules=dig --domain=amazon.com
```
**Example: View the results**
You can view the results in `/var/tmp/ec2rl`:
```
cat /var/tmp/ec2rl/logfile_location
```
For example, view the log file for the dig module:
```
cat /var/tmp/ec2rl/2017-05-11T15_39_21.893145/mod_out/run/dig.log | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2rl_working.md |
df7db04c5337-1 | cat /var/tmp/ec2rl/2017-05-11T15_39_21.893145/mod_out/run/dig.log
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2rl_working.md |
67ed4b8e11ae-0 | If AWS Support has requested the results or to share the results from an S3 bucket, upload them using the EC2Rescue for Linux CLI tool\. The output of the EC2Rescue for Linux commands should provide the commands that you need to use\.
**Example: Upload results to AWS Support**
```
./ec2rl upload --upload-directory=/var/tmp/ec2rl/2017-05-11T15_39_21.893145 --support-url="URLProvidedByAWSSupport"
```
**Example: Upload results to an S3 bucket**
```
./ec2rl upload --upload-directory=/var/tmp/ec2rl/2017-05-11T15_39_21.893145 --presigned-url="YourPresignedS3URL"
```
For more information about generating pre\-signed URLs for Amazon S3, see [Uploading Objects Using Pre\-Signed URLs](https://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2rl_working.md |
add826597776-0 | Create a backup for your instance, one or more volumes, or a specific device ID using the following commands\.
**Example: Back up an instance using an Amazon Machine Image \(AMI\)**
```
./ec2rl run --backup=ami
```
**Example: Back up all volumes associated with the instance**
```
./ec2rl run --backup=allvolumes
```
**Example: Back up a specific volume**
```
./ec2rl run --backup=volumeID
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2rl_working.md |
d137e00988a5-0 | EC2Rescue for Linux includes a help file that gives you information and syntax for each available command\.
**Example: Display the general help**
```
./ec2rl help
```
**Example: List the available modules**
```
./ec2rl list
```
**Example: Display the help for a specific module**
```
./ec2rl help module_name
```
For example, use the following command to show the help file for the dig module:
```
./ec2rl help dig
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2rl_working.md |
296f92c03c7a-0 | Monitoring is an important part of maintaining the reliability, availability, and performance of your Amazon Elastic Compute Cloud \(Amazon EC2\) instances and your AWS solutions\. You should collect monitoring data from all of the parts in your AWS solutions so that you can more easily debug a multi\-point failure if one occurs\. Before you start monitoring Amazon EC2, however, you should create a monitoring plan that should include:
+ What are your goals for monitoring?
+ What resources will you monitor?
+ How often will you monitor these resources?
+ What monitoring tools will you use?
+ Who will perform the monitoring tasks?
+ Who should be notified when something goes wrong?
After you have defined your monitoring goals and have created your monitoring plan, the next step is to establish a baseline for normal Amazon EC2 performance in your environment\. You should measure Amazon EC2 performance at various times and under different load conditions\. As you monitor Amazon EC2, you should store a history of monitoring data that you've collected\. You can compare current Amazon EC2 performance to this historical data to help you to identify normal performance patterns and performance anomalies, and devise methods to address them\. For example, you can monitor CPU utilization, disk I/O, and network utilization for your EC2 instances\. When performance falls outside your established baseline, you might need to reconfigure or optimize the instance to reduce CPU utilization, improve disk I/O, or reduce network traffic\.
To establish a baseline you should, at a minimum, monitor the following items:
| Item to monitor | Amazon EC2 metric | Monitoring agent/CloudWatch Logs |
| --- | --- | --- | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/monitoring_ec2.md |
296f92c03c7a-1 | | Item to monitor | Amazon EC2 metric | Monitoring agent/CloudWatch Logs |
| --- | --- | --- |
| CPU utilization | [CPUUtilization](viewing_metrics_with_cloudwatch.md) | |
| Network utilization | [NetworkIn](viewing_metrics_with_cloudwatch.md) [NetworkOut](viewing_metrics_with_cloudwatch.md) | |
| Disk performance | [DiskReadOps](viewing_metrics_with_cloudwatch.md) [DiskWriteOps](viewing_metrics_with_cloudwatch.md) | |
| Disk Reads/Writes | [DiskReadBytes](viewing_metrics_with_cloudwatch.md) [DiskWriteBytes](viewing_metrics_with_cloudwatch.md) | |
| Memory utilization, disk swap utilization, disk space utilization, page file utilization, log collection | | \[Linux and Windows Server instances\] [Collect Metrics and Logs from Amazon EC2 Instances and On\-Premises Servers with the CloudWatch Agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html) \[Migration from previous CloudWatch Logs agent on Windows Server instances\] [ Migrate Windows Server Instance Log Collection to the CloudWatch Agent ](https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-cloudwatch-agent.html#monitoring-cloudwatch-agent-migrate) | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/monitoring_ec2.md |
a998130d2533-0 | The following instructions explain how to connect to your Linux instance using EC2 Instance Connect\.
**Topics**
+ [Connect using the browser\-based client](#ec2-instance-connect-connecting-console)
+ [Connect using the EC2 Instance Connect CLI](#ec2-instance-connect-connecting-ec2-cli)
+ [Connect using your own key and SSH client](#ec2-instance-connect-connecting-aws-cli)
**Limitations**
+ The following Linux distributions are supported:
+ Amazon Linux 2 \(any version\)
+ Ubuntu 16\.04 or later
+ To connect using the browser\-based client, the instance must have a public IPv4 address\.
+ If the instance does not have a public IP address, then you can only connect to the instance using the EC2 Instance Connect CLI, and only from a machine within the same VPC\.
+ EC2 Instance Connect does not support connecting using an IPv6 address\.
+ The Safari browser is currently not supported\.
**Prerequisites**
+ **Install Instance Connect on your instance\.**
For more information, see [Set up EC2 Instance Connect](ec2-instance-connect-set-up.md)\.
+ **\(Optional\) Install an SSH client on your local computer\.** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-instance-connect-methods.md |
a998130d2533-1 | + **\(Optional\) Install an SSH client on your local computer\.**
There is no need to install an SSH client if users only use the console or the EC2 Instance Connect CLI to connect to an instance\. Your local computer most likely has an SSH client installed by default\. You can check for an SSH client by typing ssh at the command line\. If your local computer doesn't recognize the command, you can install an SSH client\. For information about installing an SSH client on Linux or macOS X, see [http://www\.openssh\.com](http://www.openssh.com/)\. For information about installing an SSH client on Windows 10, see [OpenSSH in Windows](https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview)\.
+ **\(Optional\) Install the EC2 Instance Connect CLI on your local computer\.**
There is no need to install the EC2 Instance Connect CLI if users only use the console or an SSH client to connect to an instance\. For more information, see [Task 3: \(Optional\) Install the EC2 Instance Connect CLI](ec2-instance-connect-set-up.md#ec2-instance-connect-install-eic-CLI)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-instance-connect-methods.md |
6af031765eeb-0 | You can connect to an instance using the browser\-based client by selecting the instance from the Amazon EC2 console and choosing to connect using EC2 Instance Connect\. Instance Connect handles the permissions and provides a successful connection\.
**To connect to your instance using the browser\-based client from the Amazon EC2 console**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. In the navigation pane, choose **Instances**\.
1. Select the instance and choose **Connect**\.
1. Choose **EC2 Instance Connect \(browser\-based SSH connection\)**, **Connect**\.
A window opens, and you are connected to your instance\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-instance-connect-methods.md |
e1fda86d4507-0 | You can connect to an instance using the EC2 Instance Connect CLI by providing only the instance ID, while the Instance Connect CLI performs the following three actions in one call: it generates a one\-time\-use SSH public key, pushes the key to the instance where it remains for 60 seconds, and connects the user to the instance\. You can use basic SSH/SFTP commands with the Instance Connect CLI\.
**Note**
`-i` is not supported when using mssh\. When using the mssh command to connect to your instance, you do not need to specify any kind of identity file because Instance Connect manages the key pair\.
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-instance-connect-methods.md |
0c5b2523d2d6-0 | **To connect to an instance using the EC2 Instance Connect CLI**
Use the mssh command with the instance ID as follows\. You do not need to specify the user name for the AMI\.
```
$ mssh i-001234a4bf70dec41EXAMPLE
```
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-instance-connect-methods.md |
0415a2092406-0 | **To connect to an instance using the EC2 Instance Connect CLI**
Use the mssh command with the instance ID and the default user name for the Ubuntu AMI as follows\. You must specify the user name for the AMI or you get the following error: Authentication failed\.
```
$ mssh ubuntu@i-001234a4bf70dec41EXAMPLE
```
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-instance-connect-methods.md |
8b66f412cf5b-0 | You can use your own SSH key and connect to your instance from the SSH client of your choice while using the EC2 Instance Connect API\. This enables you to benefit from the Instance Connect capability to push a public key to the instance\.
**Requirement**
The supported RSA key types are OpenSSH and SSH2\. The supported lengths are 2048 and 4096\. For more information, see [Option 2: Import your own public key to Amazon EC2](ec2-key-pairs.md#how-to-generate-your-own-key-and-import-it-to-aws)\.
**To connect to your instance using your own key and any SSH client**
1.
**\(Optional\) Generate new SSH private and public keys**
You can generate new SSH private and public keys, `my_rsa_key` and `my_rsa_key.pub`, using the following command:
```
$ ssh-keygen -t rsa -f my_rsa_key
```
1.
**Push your SSH public key to the instance** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-instance-connect-methods.md |
8b66f412cf5b-1 | ```
1.
**Push your SSH public key to the instance**
Use the [send\-ssh\-public\-key](https://docs.aws.amazon.com/cli/latest/reference/ec2-instance-connect/send-ssh-public-key.html) command to push your SSH public key to the instance\. If you launched your instance using Amazon Linux 2, the default user name for the AMI is `ec2-user`\. If you launched your instance using Ubuntu, the default user name for the AMI is `ubuntu`\.
The following example pushes the public key to the specified instance in the specified Availability Zone, to authenticate `ec2-user`:
```
$ aws ec2-instance-connect send-ssh-public-key \
--instance-id i-001234a4bf70dec41EXAMPLE \
--availability-zone us-west-2b \
--instance-os-user ec2-user \
--ssh-public-key file://my_rsa_key.pub
```
1.
**Connect to the instance using your private key** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-instance-connect-methods.md |
8b66f412cf5b-2 | ```
1.
**Connect to the instance using your private key**
Use the ssh command to connect to the instance using the private key before the public key is removed from the instance metadata \(you have 60 seconds before it is removed\)\. Specify the private key that corresponds to the public key, the default user name for the AMI that you used to launch your instance, and the instance's public DNS name\. Add the `IdentitiesOnly=yes` option to ensure that only the files in the ssh config and the specified key are used for the connection\.
```
$ ssh -o "IdentitiesOnly=yes" -i my_rsa_key [email protected]
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-instance-connect-methods.md |
4f6a98a86c93-0 | The following tutorials show you how to perform common tasks using EC2 instances running Linux\. For videos, see [AWS Instructional Videos and Labs](https://aws.amazon.com/training/intro_series/)\.
**Topics**
+ [Tutorial: Install a LAMP web server on Amazon Linux 2](ec2-lamp-amazon-linux-2.md)
+ [Tutorial: Install a LAMP web server with the Amazon Linux AMI](install-LAMP.md)
+ [Tutorial: Hosting a WordPress blog with Amazon Linux](hosting-wordpress.md)
+ [Tutorial: Configure SSL/TLS on Amazon Linux 2](SSL-on-amazon-linux-2.md)
+ [Tutorial: Configure SSL/TLS on Amazon Linux](SSL-on-amazon-linux-ami.md)
+ [Tutorial: Increase the availability of your application on Amazon EC2](ec2-increase-availability.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-tutorials.md |
c257c76b5f0b-0 | Linux Amazon Machine Images use one of two types of virtualization: paravirtual \(PV\) or hardware virtual machine \(HVM\)\. The main differences between PV and HVM AMIs are the way in which they boot and whether they can take advantage of special hardware extensions \(CPU, network, and storage\) for better performance\.
For the best performance, we recommend that you use current generation instance types and HVM AMIs when you launch your instances\. For more information about current generation instance types, see [Amazon EC2 Instance Types](https://aws.amazon.com/ec2/instance-types/)\. If you are using previous generation instance types and would like to upgrade, see [Upgrade Paths](https://aws.amazon.com/ec2/previous-generation/#Upgrade_Paths)\.
The following table compares HVM and PV AMIs\.
| | HVM | PV |
| --- | --- | --- | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/virtualization_types.md |
c257c76b5f0b-1 | | | HVM | PV |
| --- | --- | --- |
| Description | HVM AMIs are presented with a fully virtualized set of hardware and boot by executing the master boot record of the root block device of your image\. This virtualization type provides the ability to run an operating system directly on top of a virtual machine without any modification, as if it were run on the bare\-metal hardware\. The Amazon EC2 host system emulates some or all of the underlying hardware that is presented to the guest\. | PV AMIs boot with a special boot loader called PV\-GRUB, which starts the boot cycle and then chain loads the kernel specified in the menu\.lst file on your image\. Paravirtual guests can run on host hardware that does not have explicit support for virtualization\. Historically, PV guests had better performance than HVM guests in many cases, but because of enhancements in HVM virtualization and the availability of PV drivers for HVM AMIs, this is no longer true\. For more information about PV\-GRUB and its use in Amazon EC2, see [User provided kernels](UserProvidedKernels.md)\. | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/virtualization_types.md |
c257c76b5f0b-2 | | Support for hardware extensions | Yes\. Unlike PV guests, HVM guests can take advantage of hardware extensions that provide fast access to the underlying hardware on the host system\. For more information on CPU virtualization extensions available in Amazon EC2, see [Intel Virtualization Technology](http://www.intel.com/content/www/us/en/virtualization/virtualization-technology/intel-virtualization-technology.html) on the Intel website\. HVM AMIs are required to take advantage of enhanced networking and GPU processing\. In order to pass through instructions to specialized network and GPU devices, the OS needs to be able to have access to the native hardware platform; HVM virtualization provides this access\. For more information, see [Enhanced networking on Linux](enhanced-networking.md) and [Linux accelerated computing instances](accelerated-computing-instances.md)\. | No, they cannot take advantage of special hardware extensions such as enhanced networking or GPU processing\. |
| Supported instance types | All current generation instance types support HVM AMIs\. | The following previous generation instance types support PV AMIs: C1, C3, HS1, M1, M3, M2, and T1\. Current generation instance types do not support PV AMIs\. |
| Supported Regions | All Regions support HVM instances\. | Asia Pacific \(Tokyo\), Asia Pacific \(Singapore\), Asia Pacific \(Sydney\), Europe \(Frankfurt\), Europe \(Ireland\), South America \(São Paulo\), US East \(N\. Virginia\), US West \(N\. California\), and US West \(Oregon\) | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/virtualization_types.md |
c257c76b5f0b-3 | | How to find | Verify that the virtualization type of the AMI is set to hvm, using the console or the [describe\-images](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html) command\. | Verify that the virtualization type of the AMI is set to paravirtual, using the console or the [describe\-images](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html) command\. |
**PV on HVM**
Paravirtual guests traditionally performed better with storage and network operations than HVM guests because they could leverage special drivers for I/O that avoided the overhead of emulating network and disk hardware, whereas HVM guests had to translate these instructions to emulated hardware\. Now PV drivers are available for HVM guests, so operating systems that cannot be ported to run in a paravirtualized environment can still see performance advantages in storage and network I/O by using them\. With these PV on HVM drivers, HVM guests can get the same, or better, performance than paravirtual guests\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/virtualization_types.md |
0092afa40890-0 | You can launch an instance using the launch instance wizard\. The launch instance wizard specifies all the launch parameters required for launching an instance\. Where the launch instance wizard provides a default value, you can accept the default or specify your own value\. At the very least, you need to select an AMI and a key pair to launch an instance\.
Before you launch your instance, be sure that you are set up\. For more information, see [Setting up with Amazon EC2](get-set-up-for-amazon-ec2.md)\.
**Important**
When you launch an instance that's not within the [AWS Free Tier](https://aws.amazon.com/free/), you are charged for the time that the instance is running, even if it remains idle\.
**Topics**
+ [Initiate instance launch](#initiate-instance-launch)
+ [Step 1: Choose an Amazon Machine Image \(AMI\)](#step-1-AMI)
+ [Step 2: Choose an Instance Type](#choose-an-instance-type-page)
+ [Step 3: Configure Instance Details](#configure_instance_details_step)
+ [Step 4: Add Storage](#step-4-add-storage)
+ [Step 5: Add Tags](#step-5-add-tags)
+ [Step 6: Configure Security Group](#step-6-configure-security-group) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
0092afa40890-1 | + [Step 6: Configure Security Group](#step-6-configure-security-group)
+ [Step 7: Review Instance Launch and Select Key Pair](#step-7-review-instance-launch) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
d34f908c085f-0 | 1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. In the navigation bar at the top of the screen, the current Region is displayed \(for example, US East \(Ohio\)\)\. Select a Region for the instance that meets your needs\. This choice is important because some Amazon EC2 resources can be shared between Regions, while others can't\. For more information, see [Resource locations](resources.md)\.
1. From the Amazon EC2 console dashboard, choose **Launch Instance**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
661dfb22da9a-0 | When you launch an instance, you must select a configuration, known as an Amazon Machine Image \(AMI\)\. An AMI contains the information required to create a new instance\. For example, an AMI might contain the software required to act as a web server, such as Linux, Apache, and your website\.
When you launch an instance, you can either select an AMI from the list, or you can select a Systems Manager parameter that points to an AMI ID\. For more information, see [Using a Systems Manager parameter to find an AMI](finding-an-ami.md#using-systems-manager-parameter-to-find-AMI)\.
On the **Choose an Amazon Machine Image \(AMI\)** page, use one of two options to choose an AMI\. Either [search the list of AMIs](#procedure-search-list-of-AMIs), or [search by Systems Manager parameter](#procedure-by-systems-manager-parameter)\.<a name="procedure-search-list-of-AMIs"></a>
**By searching the list of AMIs**
1. Select the type of AMI to use in the left pane:
**Quick Start**
A selection of popular AMIs to help you get started quickly\. To select an AMI that is eligible for the free tier, choose **Free tier only** in the left pane\. These AMIs are marked **Free tier eligible**\.
**My AMIs** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
661dfb22da9a-1 | **My AMIs**
The private AMIs that you own, or private AMIs that have been shared with you\. To view AMIs that are shared with you, choose **Shared with me** in the left pane\.
**AWS Marketplace**
An online store where you can buy software that runs on AWS, including AMIs\. For more information about launching an instance from the AWS Marketplace, see [Launching an AWS Marketplace instance](launch-marketplace-console.md)\.
**Community AMIs**
The AMIs that AWS community members have made available for others to use\. To filter the list of AMIs by operating system, choose the appropriate check box under **Operating system**\. You can also filter by architecture and root device type\.
1. Check the **Root device type** listed for each AMI\. Notice which AMIs are the type that you need, either `ebs` \(backed by Amazon EBS\) or `instance-store` \(backed by instance store\)\. For more information, see [Storage for the root device](ComponentsAMIs.md#storage-for-the-root-device)\.
1. Check the **Virtualization type** listed for each AMI\. Notice which AMIs are the type that you need, either `hvm` or `paravirtual`\. For example, some instance types require HVM\. For more information, see [Linux AMI virtualization types](virtualization_types.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
661dfb22da9a-2 | 1. Choose an AMI that meets your needs, and then choose **Select**\.<a name="procedure-by-systems-manager-parameter"></a>
**By Systems Manager parameter**
1. Choose **Search by Systems Manager parameter** \(at top right\)\.
1. For **Systems Manager parameter**, select a parameter\. The corresponding AMI ID appears next to **Currently resolves to**\.
1. Choose **Search**\. The AMIs that match the AMI ID appear in the list\.
1. Select the AMI from the list, and choose **Select**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
ed8291e75a67-0 | On the **Choose an Instance Type** page, select the hardware configuration and size of the instance to launch\. Larger instance types have more CPU and memory\. For more information, see [Instance types](instance-types.md)\.
To remain eligible for the free tier, choose the **t2\.micro** instance type \(or the **t3\.micro** instance type in Regions where **t2\.micro** is unavailable\)\. For more information, see [Burstable performance instances](burstable-performance-instances.md)\.
By default, the wizard displays current generation instance types, and selects the first available instance type based on the AMI that you selected\. To view previous generation instance types, choose **All generations** from the filter list\.
**Note**
To set up an instance quickly for testing purposes, choose **Review and Launch** to accept the default configuration settings, and launch your instance\. Otherwise, to configure your instance further, choose **Next: Configure Instance Details**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
ec32f1764b94-0 | On the **Configure Instance Details** page, change the following settings as necessary \(expand **Advanced Details** to see all the settings\), and then choose **Next: Add Storage**:
+ **Number of instances**: Enter the number of instances to launch\.
**Tip**
To ensure faster instance launches, break up large requests into smaller batches\. For example, create five separate launch requests for 100 instances each instead of one launch request for 500 instances\.
+ \(Optional\) To help ensure that you maintain the correct number of instances to handle demand on your application, you can choose **Launch into Auto Scaling Group** to create a launch configuration and an Auto Scaling group\. Auto Scaling scales the number of instances in the group according to your specifications\. For more information, see the [Amazon EC2 Auto Scaling User Guide](https://docs.aws.amazon.com/autoscaling/ec2/userguide/)\.
**Note**
If Amazon EC2 Auto Scaling marks an instance that is in an Auto Scaling group as unhealthy, the instance is automatically scheduled for replacement where it is terminated and another is launched, and you lose your data on the original instance\. An instance is marked as unhealthy if you stop or reboot the instance, or if another event marks the instance as unhealthy\. For more information, see [Health Checks for Auto Scaling Instances](https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) in the *Amazon EC2 Auto Scaling User Guide*\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
ec32f1764b94-1 | + **Purchasing option**: Choose **Request Spot instances** to launch a Spot Instance\. This adds and removes options from this page\. Set your maximum price, and optionally update the request type, interruption behavior, and request validity\. For more information, see [Creating a Spot Instance request](spot-requests.md#using-spot-instances-request)\.
+ **Network**: Select the VPC, or to create a new VPC, choose **Create new VPC** to go the Amazon VPC console\. When you have finished, return to the wizard and choose **Refresh** to load your VPC in the list\.
+ **Subnet**: You can launch an instance in a subnet associated with an Availability Zone, Local Zone, Wavelength Zone or Outpost\.
To launch the instance in an Availability Zone, select the subnet into which to launch your instance\. You can select **No preference** to let AWS choose a default subnet in any Availability Zone\. To create a new subnet, choose **Create new subnet** to go to the Amazon VPC console\. When you are done, return to the wizard and choose **Refresh** to load your subnet in the list\.
To launch the instance in a Local Zone, select a subnet that you created in the Local Zone\.
To launch an instance in an Outpost, select a subnet in a VPC that you associated with an Outpost\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
ec32f1764b94-2 | To launch an instance in an Outpost, select a subnet in a VPC that you associated with an Outpost\.
+ **Auto\-assign Public IP**: Specify whether your instance receives a public IPv4 address\. By default, instances in a default subnet receive a public IPv4 address and instances in a nondefault subnet do not\. You can select **Enable** or **Disable** to override the subnet's default setting\. For more information, see [Public IPv4 addresses and external DNS hostnames](using-instance-addressing.md#concepts-public-addresses)\.
+ **Auto\-assign IPv6 IP**: Specify whether your instance receives an IPv6 address from the range of the subnet\. Select **Enable** or **Disable** to override the subnet's default setting\. This option is only available if you've associated an IPv6 CIDR block with your VPC and subnet\. For more information, see [Your VPC and Subnets](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) in the *Amazon VPC User Guide*\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
ec32f1764b94-3 | + **Domain join directory**: Select the AWS Directory Service directory \(domain\) to which your Linux instance is joined after launch\. If you select a domain, you must select an IAM role with the required permissions\. For more information, see [Seamlessly Join a Linux EC2 Instance to Your AWS Managed Microsoft AD Directory](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/seamlessly_join_linux_instance.html)\.
+ **Placement group**: A placement group determines the placement strategy of your instances\. Select an existing placement group, or create a new one\. This option is only available if you've selected an instance type that supports placement groups\. For more information, see [Placement groups](placement-groups.md)\.
+ **Capacity Reservation**: Specify whether to launch the instance into shared capacity, any `open` Capacity Reservation, a specific Capacity Reservation, or a Capacity Reservation group\. For more information, see [Launching instances into an existing Capacity Reservation](capacity-reservations-using.md#capacity-reservations-launch)\.\.
+ **IAM role**: Select an AWS Identity and Access Management \(IAM\) role to associate with the instance\. For more information, see [IAM roles for Amazon EC2](iam-roles-for-amazon-ec2.md)\.
+ **CPU options**: Choose **Specify CPU options** to specify a custom number of vCPUs during launch\. Set the number of CPU cores and threads per core\. For more information, see [Optimizing CPU options](instance-optimize-cpu.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
ec32f1764b94-4 | + **Shutdown behavior**: Select whether the instance should stop or terminate when shut down\. For more information, see [Changing the instance initiated shutdown behavior](terminating-instances.md#Using_ChangingInstanceInitiatedShutdownBehavior)\.
+ **Stop \- Hibernate behavior**: To enable hibernation, select this check box\. This option is only available if your instance meets the hibernation prerequisites\. For more information, see [Hibernate your Linux instance](Hibernate.md)\.
+ **Enable termination protection**: To prevent accidental termination, select this check box\. For more information, see [Enabling termination protection](terminating-instances.md#Using_ChangingDisableAPITermination)\.
+ **Monitoring**: Select this check box to enable detailed monitoring of your instance using Amazon CloudWatch\. Additional charges apply\. For more information, see [Monitoring your instances using CloudWatch](using-cloudwatch.md)\.
+ **EBS\-optimized instance**: An Amazon EBS\-optimized instance uses an optimized configuration stack and provides additional, dedicated capacity for Amazon EBS I/O\. If the instance type supports this feature, select this check box to enable it\. Additional charges apply\. For more information, see [Amazon EBS–optimized instances](ebs-optimized.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
ec32f1764b94-5 | + **Tenancy**: If you are launching your instance into a VPC, you can choose to run your instance on isolated, dedicated hardware \(**Dedicated**\) or on a Dedicated Host \(**Dedicated host**\)\. Additional charges may apply\. For more information, see [Dedicated Instances](dedicated-instance.md) and [Dedicated Hosts](dedicated-hosts-overview.md)\.
+ **T2/T3 Unlimited**: Select this check box to enable applications to burst beyond the baseline for as long as needed\. Additional charges may apply\. For more information, see [Burstable performance instances](burstable-performance-instances.md)\.
+ **File systems**: Choose **Add file system** to mount one or more Amazon EFS file systems to your instance\. For more information, see [Using Amazon EFS with Amazon EC2](AmazonEFS.md)\.
+ **Network interfaces**: If you selected a specific subnet, you can specify up to two network interfaces for your instance:
+ For **Network Interface**, select **New network interface** to let AWS create a new interface, or select an existing, available network interface\.
+ For **Primary IP**, enter a private IPv4 address from the range of your subnet, or leave **Auto\-assign** to let AWS choose a private IPv4 address for you\.
+ For **Secondary IP addresses**, choose **Add IP** to assign more than one private IPv4 address to the selected network interface\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
ec32f1764b94-6 | + For **Secondary IP addresses**, choose **Add IP** to assign more than one private IPv4 address to the selected network interface\.
+ \(IPv6\-only\) For **IPv6 IPs**, choose **Add IP**, and enter an IPv6 address from the range of the subnet, or leave **Auto\-assign** to let AWS choose one for you\.
+ Choose **Add Device** to add a secondary network interface\. A secondary network interface can reside in a different subnet of the VPC, provided it's in the same Availability Zone as your instance\.
For more information, see [Elastic network interfaces](using-eni.md)\. If you specify more than one network interface, your instance cannot receive a public IPv4 address\. Additionally, if you specify an existing network interface for eth0, you cannot override the subnet's public IPv4 setting using **Auto\-assign Public IP**\. For more information, see [Assigning a public IPv4 address during instance launch](using-instance-addressing.md#public-ip-addresses)\.
+ **Kernel ID**: \(Only valid for paravirtual \(PV\) AMIs\) Select **Use default** unless you want to use a specific kernel\.
+ **RAM disk ID**: \(Only valid for paravirtual \(PV\) AMIs\) Select **Use default** unless you want to use a specific RAM disk\. If you have selected a kernel, you may need to select a specific RAM disk with the drivers to support it\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
ec32f1764b94-7 | + **Metadata accessible**: You can enable or disable access to the instance metadata\. For more information, see [Configuring the instance metadata service](configuring-instance-metadata-service.md)\.
+ **Metadata version**: If you enable access to the instance metadata, you can choose to require the use of Instance Metadata Service Version 2 when requesting instance metadata\. For more information, see [Configuring instance metadata options for new instances](configuring-instance-metadata-service.md#configuring-IMDS-new-instances)\.
+ **Metadata token response hop limit**: If you enable instance metadata, you can set the allowable number of network hops for the metadata token\. For more information, see [Configuring the instance metadata service](configuring-instance-metadata-service.md)\.
+ **User data**: You can specify user data to configure an instance during launch, or to run a configuration script\. To attach a file, select the **As file** option and browse for the file to attach\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
1e9f48002f0d-0 | The AMI you selected includes one or more volumes of storage, including the root device volume\. On the **Add Storage** page, you can specify additional volumes to attach to the instance by choosing **Add New Volume**\. Configure each volume as follows, and then choose **Next: Add Tags**\.
+ **Type**: Select instance store or Amazon EBS volumes to associate with your instance\. The types of volume available in the list depend on the instance type you've chosen\. For more information, see [Amazon EC2 instance store](InstanceStorage.md) and [Amazon EBS volumes](ebs-volumes.md)\.
+ **Device**: Select from the list of available device names for the volume\.
+ **Snapshot**: Enter the name or ID of the snapshot from which to restore a volume\. You can also search for available shared and public snapshots by typing text into the **Snapshot** field\. Snapshot descriptions are case\-sensitive\.
+ **Size**: For EBS volumes, you can specify a storage size\. Even if you have selected an AMI and instance that are eligible for the free tier, to stay within the free tier, you must stay under 30 GiB of total storage\. For more information, see [Constraints on the size and configuration of an EBS volume](volume_constraints.md)\.
+ **Volume Type**: For EBS volumes, select a volume type\. For more information, see [Amazon EBS volume types](ebs-volume-types.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
1e9f48002f0d-1 | + **IOPS**: If you have selected a Provisioned IOPS SSD volume type, then you can enter the number of I/O operations per second \(IOPS\) that the volume can support\.
+ **Delete on Termination**: For Amazon EBS volumes, select this check box to delete the volume when the instance is terminated\. For more information, see [Preserving Amazon EBS volumes on instance termination](terminating-instances.md#preserving-volumes-on-termination)\.
+ **Encrypted**: If the instance type supports EBS encryption, you can specify the encryption state of the volume\. If you have enabled encryption by default in this Region, the default CMK is selected for you\. You can select a different key or disable encryption\. For more information, see [Amazon EBS encryption](EBSEncryption.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
9ab2cea79c7c-0 | On the **Add Tags** page, specify [tags](Using_Tags.md) by providing key and value combinations\. You can tag the instance, the volumes, or both\. For Spot Instances, you can tag the Spot Instance request only\. Choose **Add another tag** to add more than one tag to your resources\. Choose **Next: Configure Security Group** when you are done\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
61139fafa9d9-0 | On the **Configure Security Group** page, use a security group to define firewall rules for your instance\. These rules specify which incoming network traffic is delivered to your instance\. All other traffic is ignored\. \(For more information about security groups, see [Amazon EC2 security groups for Linux instances](ec2-security-groups.md)\.\) Select or create a security group as follows, and then choose **Review and Launch**\.
+ To select an existing security group, choose **Select an existing security group**, and select your security group\. You can't edit the rules of an existing security group, but you can copy them to a new group by choosing **Copy to new**\. Then you can add rules as described in the next step\.
+ To create a new security group, choose **Create a new security group**\. The wizard automatically defines the launch\-wizard\-*x* security group and creates an inbound rule to allow you to connect to your instance over SSH \(port 22\)\.
+ You can add rules to suit your needs\. For example, if your instance is a web server, open ports 80 \(HTTP\) and 443 \(HTTPS\) to allow internet traffic\.
To add a rule, choose **Add Rule**, select the protocol to open to network traffic, and then specify the source\. Choose **My IP** from the **Source** list to let the wizard add your computer's public IP address\. However, if you are connecting through an ISP or from behind your firewall without a static IP address, you need to find out the range of IP addresses used by client computers\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
61139fafa9d9-1 | **Warning**
Rules that enable all IP addresses \(`0.0.0.0/0`\) to access your instance over SSH or RDP are acceptable for this short exercise, but are unsafe for production environments\. You should authorize only a specific IP address or range of addresses to access your instance\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
0351fb86bee6-0 | On the **Review Instance Launch** page, check the details of your instance, and make any necessary changes by choosing the appropriate **Edit** link\.
When you are ready, choose **Launch**\.
In the **Select an existing key pair or create a new key pair** dialog box, you can choose an existing key pair, or create a new one\. For example, choose **Choose an existing key pair**, then select the key pair you created when getting set up\. For more information, see [Amazon EC2 key pairs and Linux instances](ec2-key-pairs.md)\.
**Important**
If you choose the **Proceed without key pair** option, you won't be able to connect to the instance unless you choose an AMI that is configured to allow users another way to log in\.
To launch your instance, select the acknowledgment check box, then choose **Launch Instances**\.
\(Optional\) You can create a status check alarm for the instance \(additional fees may apply\)\. \(If you're not sure, you can always add one later\.\) On the confirmation screen, choose **Create status check alarms** and follow the directions\. For more information, see [Creating and editing status check alarms](monitoring-system-instance-status-check.md#creating_status_check_alarms)\.
If the instance fails to launch or the state immediately goes to `terminated` instead of `running`, see [Troubleshooting instance launch issues](troubleshooting-launch.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/launching-instance.md |
5e241e7f891d-0 | Amazon Virtual Private Cloud \(Amazon VPC\) enables you to define a virtual network in your own logically isolated area within the AWS cloud, known as a *virtual private cloud \(VPC\)*\. You can launch your Amazon EC2 resources, such as instances, into the subnets of your VPC\. Your VPC closely resembles a traditional network that you might operate in your own data center, with the benefits of using scalable infrastructure from AWS\. You can configure your VPC; you can select its IP address range, create subnets, and configure route tables, network gateways, and security settings\. You can connect instances in your VPC to the internet or to your own data center\.
When you create your AWS account, we create a *default VPC* for you in each Region\. A default VPC is a VPC that is already configured and ready for you to use\. You can launch instances into your default VPC immediately\. Alternatively, you can create your own *nondefault VPC* and configure it as you need\.
If you created your AWS account before 2013\-12\-04, you might have support for the EC2\-Classic platform in some regions\. If you created your AWS account after 2013\-12\-04, it does not support EC2\-Classic, so you must launch your resources in a VPC\. For more information, see [EC2\-Classic](ec2-classic-platform.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/using-vpc.md |
6499959f6a34-0 | For more information about Amazon VPC, see the following documentation\.
| Guide | Description |
| --- | --- |
| [Amazon VPC User Guide](https://docs.aws.amazon.com/vpc/latest/userguide/) | Describes key concepts and provides instructions for using the features of Amazon VPC\. |
| [Amazon VPC Peering Guide](https://docs.aws.amazon.com/vpc/latest/peering/) | Describes VPC peering connections and provides instructions for using them\. |
| [Amazon VPC Transit Gateways](https://docs.aws.amazon.com/vpc/latest/tgw/) | Describes transit gateways and provides instructions for configuring and using them\. |
| [AWS Site\-to\-Site VPN User Guide](https://docs.aws.amazon.com/vpn/latest/s2svpn/) | Describes Site\-to\-Site VPN connections and provides instructions for configuring and using them\. | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/using-vpc.md |
6268d0276661-0 | The following steps help you to get started with one of the following base AMIs: Amazon Linux, Amazon Linux 2, RHEL 7\.6, RHEL 7\.7, RHEL 7\.8, CentOS 7, Ubuntu 16\.04, and Ubuntu 18\.04\.
**Topics**
+ [Step 1: Prepare an EFA\-enabled security group](#nccl-start-base-setup)
+ [Step 2: Launch a temporary instance](#nccl-start-base-temp)
+ [Step 3: Install the EFA software](#nccl-start-base-enable)
+ [Step 4: Install Nvidia GPU drivers and the Nvidia CUDA toolkit](#nccl-start-base-drivers)
+ [Step 5: Install NCCL](#nccl-start-base-nccl)
+ [Step 6: Install the aws\-ofi\-nccl plugin](#nccl-start-base-plugin)
+ [Step 7: Install the NCCL tests](#nccl-start-base-tests)
+ [Step 8: Test your EFA and NCCL configuration](#nccl-start-base-test)
+ [Step 9: Install your machine learning applications](#nccl-start-base-app)
+ [Step 10: Create an EFA and NCCL\-enabled AMI](#nccl-start-base-ami)
+ [Step 11: Terminate the temporary instance](#nccl-start-base-terminate) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
6268d0276661-1 | + [Step 11: Terminate the temporary instance](#nccl-start-base-terminate)
+ [Step 12: Launch EFA and NCCL\-enabled instances into a cluster placement group](#nccl-start-base-cluster)
+ [Step 13: Enable passwordless SSH](#nccl-start-base-passwordless) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
7c338fa121a8-0 | An EFA requires a security group that allows all inbound and outbound traffic to and from the security group itself\.
**To create an EFA\-enabled security group**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. In the navigation pane, choose **Security Groups** and then choose **Create Security Group**\.
1. In the **Create Security Group** window, do the following:
1. For **Security group name**, enter a descriptive name for the security group, such as `EFA-enabled security group`\.
1. \(Optional\) For **Description**, enter a brief description of the security group\.
1. For **VPC**, select the VPC into which you intend to launch your EFA\-enabled instances\.
1. Choose **Create**\.
1. Select the security group that you created, and on the **Description** tab, copy the **Group ID**\.
1. On the **Inbound** and **Outbound** tabs, do the following:
1. Choose **Edit**\.
1. For **Type**, choose **All traffic**\.
1. For **Source**, choose **Custom**\.
1. Paste the security group ID that you copied into the field\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
7c338fa121a8-1 | 1. For **Source**, choose **Custom**\.
1. Paste the security group ID that you copied into the field\.
1. Choose **Save**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
e8536ca4c2fd-0 | Launch a temporary instance that you can use to install and configure the EFA software components\. You use this instance to create an EFA\-enabled AMI from which you can launch your EFA\-enabled instances\.
**To launch a temporary instance**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. Choose **Launch Instance**\.
1. On the **Choose an AMI** page, choose one of the following AMIs: Amazon Linux, Amazon Linux 2, RHEL 7\.6, RHEL 7\.7, RHEL 7\.8, CentOS 7, Ubuntu 16\.04, and Ubuntu 18\.04\.
1. On the **Choose an Instance Type** page, select `p3dn.24xlarge` and then choose **Next: Configure Instance Details**\.
1. On the **Configure Instance Details** page, do the following:
1. For **Elastic Fabric Adapter**, choose **Enable**\.
1. In the **Network Interfaces** section, for device **eth0**, choose **New network interface**\.
1. Choose **Next: Add Storage**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
e8536ca4c2fd-1 | 1. Choose **Next: Add Storage**\.
1. On the **Add Storage** page, specify the volumes to attach to the instances, in addition to the volumes specified by the AMI \(such as the root device volume\)\. Then choose **Next: Add Tags**\.
1. On the **Add Tags** page, specify a tag that you can use to identify the temporary instance, and then choose **Next: Configure Security Group**\.
1. On the **Configure Security Group** page, for **Assign a security group**, select **Select an existing security group**\. Then select the security group that you created in **Step 1**\.
1. On the **Review Instance Launch** page, review the settings, and then choose **Launch** to choose a key pair and to launch your instance\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
4c882e2e7cb0-0 | Install the EFA\-enabled kernel, EFA drivers, Libfabric, and Open MPI stack that is required to support EFA on your temporary instance\.
**To install the EFA software**
1. Connect to the instance you launched\. For more information, see [Connect to your Linux instance](AccessingInstances.md)\.
1. To ensure that all of your software packages are up to date, perform a quick software update on your instance\. This process may take a few minutes\.
+ Amazon Linux, Amazon Linux 2, RHEL 7\.6/7\.7/7\.8, CentOS 7
```
$ sudo yum update -y
```
+ Ubuntu 16\.04 and Ubuntu 18\.04
```
$ sudo apt-get update -y
```
```
$ sudo apt-get upgrade -y
```
1. Download the EFA software installation files\. The software installation files are packaged into a compressed tarball \(`.tar.gz`\) file\. To download the latest *stable* version, use the following command\.
```
$ curl -O https://efa-installer.amazonaws.com/aws-efa-installer-1.9.5.tar.gz
```
You can also get the latest version by replacing the version number with `latest` in the preceding command\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
4c882e2e7cb0-1 | ```
You can also get the latest version by replacing the version number with `latest` in the preceding command\.
1. \(Optional\) Verify the authenticity and integrity of the EFA tarball \(`.tar.gz`\) file\. We recommend that you do this to verify the identity of the software publisher and to check that the file has not been altered or corrupted since it was published\. If you do not want to verify the tarball file, skip this step\.
**Note**
Alternatively, if you prefer to verify the tarball file by using an MD5 or SHA256 checksum instead, see [Verifying the EFA installer using a checksum](efa-verify.md)\.
1. Download the public GPG key and import it into your keyring\.
```
$ wget https://efa-installer.amazonaws.com/aws-efa-installer.key
```
```
$ gpg --import aws-efa-installer.key
```
The command should return a key value\. Make a note of the key value, because you need it in the next step\.
1. Verify the GPG key's fingerprint\. Run the following command and specify the key value from the previous step\.
```
$ gpg --fingerprint key_value
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
4c882e2e7cb0-2 | ```
$ gpg --fingerprint key_value
```
The command should return a fingerprint that is identical to `4E90 91BC BB97 A96B 26B1 5E59 A054 80B1 DD2D 3CCC`\. If the fingerprint does not match, don't run the EFA installation script, and contact AWS Support\.
1. Download the signature file and verify the signature of the EFA tarball file\.
```
$ wget https://efa-installer.amazonaws.com/aws-efa-installer-1.9.5.tar.gz.sig
```
```
$ gpg --verify ./aws-efa-installer-1.9.5.tar.gz.sig
```
The following shows example output\.
```
gpg: Signature made Wed 29 Jul 2020 12:50:13 AM UTC using RSA key ID DD2D3CCC
gpg: Good signature from "Amazon EC2 EFA <[email protected]>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 4E90 91BC BB97 A96B 26B1 5E59 A054 80B1 DD2D 3CCC
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
4c882e2e7cb0-3 | ```
If the result includes `Good signature`, and the fingerprint matches the fingerprint returned in the previous step, proceed to the next step\. If not, don't run the EFA installation script, and contact AWS Support\.
1. Extract the files from the compressed `.tar.gz` file and navigate into the extracted directory\.
```
$ tar -xf aws-efa-installer-1.9.5.tar.gz
```
```
$ cd aws-efa-installer
```
1. Run the EFA software installation script\.
```
$ sudo ./efa_installer.sh -y
```
Libfabric is installed in the `/opt/amazon/efa` directory, while Open MPI is installed in the `/opt/amazon/openmpi` directory\.
1. Log out of the instance and then log back in\.
1. Confirm that the EFA software components were successfully installed\.
```
$ fi_info -p efa
```
The command should return information about the Libfabric EFA interfaces\. The following example shows the command output\.
```
provider: efa
fabric: EFA-fe80::94:3dff:fe89:1b70
domain: efa_0-rdm
version: 2.0 | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
4c882e2e7cb0-4 | domain: efa_0-rdm
version: 2.0
type: FI_EP_RDM
protocol: FI_PROTO_EFA
provider: efa
fabric: EFA-fe80::94:3dff:fe89:1b70
domain: efa_0-dgrm
version: 2.0
type: FI_EP_DGRAM
protocol: FI_PROTO_EFA
provider: efa;ofi_rxd
fabric: EFA-fe80::94:3dff:fe89:1b70
domain: efa_0-dgrm
version: 1.0
type: FI_EP_RDM
protocol: FI_PROTO_RXD
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
491cb955f581-0 | **To install the Nvidia GPU Drivers and the Nvidia CUDA toolkit**
1. Install the utilities that are needed to install the Nvidia GPU drivers and the Nvidia CUDA toolkit\.
+ Amazon Linux, Amazon Linux 2, RHEL 7\.6/7\.7/7\.8, CentOS 7
```
$ sudo yum groupinstall 'Development Tools' -y
```
+ Ubuntu 16\.04 and Ubuntu 18\.04
```
$ sudo apt-get install build-essential -y
```
1. To use the Nvidia GPU driver, you must first disable the `nouveau` open source drivers\.
1. Install the **gcc** compiler and the kernel headers package for the version of the kernel that you are currently running\.
+ Amazon Linux, Amazon Linux 2, RHEL 7\.6/7\.7/7\.8, CentOS 7
```
$ sudo yum install -y gcc kernel-devel-$(uname -r)
```
+ Ubuntu 16\.04 and Ubuntu 18\.04
```
$ sudo apt-get install -y gcc make linux-headers-$(uname -r)
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
491cb955f581-1 | ```
$ sudo apt-get install -y gcc make linux-headers-$(uname -r)
```
1. Add `nouveau` to the `/etc/modprobe.d/blacklist.conf `blacklist file\.
```
$ cat << EOF | sudo tee --append /etc/modprobe.d/blacklist.conf
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
EOF
```
1. Open `/etc/default/grub` using your preferred text editor and add the following\.
```
$ GRUB_CMDLINE_LINUX="rdblacklist=nouveau"
```
1. Rebuild the Grub configuration\.
+ Amazon Linux, Amazon Linux 2, RHEL 7\.6/7\.7/7\.8, CentOS 7
```
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
```
+ Ubuntu 16\.04 and Ubuntu 18\.04
```
$ sudo update-grub
```
1. Reboot the instance and reconnect to it\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
491cb955f581-2 | $ sudo update-grub
```
1. Reboot the instance and reconnect to it\.
1. Download the Nvidia CUDA Toolkit installer\.
```
$ wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run
```
1. Run the Nvidia CUDA Toolkit installer\.
```
$ sudo sh cuda_10.1.243_418.87.00_linux.run
```
When prompted to accept the license agreement, enter `accept` and press **Enter**\.
1. At the CUDA Installer menu, ensure that all of the items are selected, highlight **Install**, and then press **Enter**\.
1. Add the following statements to the shell startup scripts to ensure that the CUDA paths are set each time that the instance starts\.
```
export PATH=/usr/local/cuda-10.1/bin:/usr/local/cuda-10.1/NsightCompute-2019.1${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
491cb955f581-3 | ```
+ For *bash* shells, add the statements to `/home/username/.bashrc` and `/home/username/.bash_profile`\.
+ For *tcsh* shells, add the statements to `/home/username/.cshrc`\.
1. To confirm that the Nvidia GPU drivers are functional, run the following command\.
```
$ nvidia-smi -q | head
```
The command should return information about the Nvidia GPUs, Nvidia GPU drivers, and Nvidia CUDA toolkit\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
396e2466469f-0 | Install NCCL\. For more information about NCCL, see the [NCCL repository](https://github.com/NVIDIA/nccl)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
9f5590cc7972-0 | + NCCL requires Nvidia CUDA 7\.0 or later\. For more information about installing the latest version, see [ CUDA Toolkit 10\.1 Update 2 Download](https://developer.nvidia.com/cuda-downloads) on the Nvidia website\.
**To install NCCL**
1. Navigate to your home directory\.
```
$ cd $HOME
```
1. Clone the official NCCL repository to the instance and navigate into the local cloned repository\.
```
$ git clone https://github.com/NVIDIA/nccl.git
```
```
$ cd nccl
```
1. Build and install NCCL and specify the CUDA installation directory\. The following command assumes that CUDA is installed in the default directory\.
```
$ make -j src.build
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
7763eda20c65-0 | The aws\-ofi\-nccl plugin maps NCCL's connection\-oriented transport APIs to Libfabric's connection\-less reliable interface\. This enables you to use Libfabric as a network provider while running NCCL\-based applications\. For more information about the aws\-ofi\-nccl plugin, see the [aws\-ofi\-nccl repository](https://github.com/aws/aws-ofi-nccl)\.
**To install the aws\-ofi\-nccl plugin**
1. Navigate to your home directory\.
```
$ cd $HOME
```
1. \(Ubuntu 16\.04 and Ubuntu 18\.04\) Install the utilities that are required to install the **aws\-ofi\-nccl** plugin\. To install the required utilities, run the following command\.
```
$ sudo apt-get install libtool autoconf -y
```
1. Clone the `aws` branch of the official AWS aws\-ofi\-nccl repository to the instance and navigate into the local cloned repository\.
```
$ git clone https://github.com/aws/aws-ofi-nccl.git -b aws
```
```
$ cd aws-ofi-nccl
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
7763eda20c65-1 | ```
```
$ cd aws-ofi-nccl
```
1. To generate the `configure` script, run the `autogen.sh` script\.
```
$ ./autogen.sh
```
1. To generate the *make* files, run the `configure` script and specify the MPI, Libfabric, NCCL, and CUDA installation directories\.
```
$ ./configure --with-mpi=/opt/amazon/openmpi --with-libfabric=/opt/amazon/efa --with-nccl=$HOME/nccl/build --with-cuda=/usr/local/cuda-10.1
```
1. Add the Open MPI directory to the `PATH` variable\.
```
$ export PATH=/opt/amazon/openmpi/bin/:$PATH
```
1. Install the aws\-ofi\-nccl plugin\.
```
$ sudo make
```
```
$ sudo make install
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
b7fdb5f7ffa0-0 | Install the NCCL tests\. The NCCL tests enable you to confirm that NCCL is properly installed and that it is operating as expected\. For more information about the NCCL tests, see the [nccl\-tests repository](https://github.com/NVIDIA/nccl-tests)\.
**To install the NCCL tests**
1. Navigate to your home directory\.
```
$ cd $HOME
```
1. Clone the official nccl\-tests repository to the instance and navigate into the local cloned repository\.
```
$ git clone https://github.com/NVIDIA/nccl-tests.git
```
```
$ cd nccl-tests
```
1. Add the Libfabric directory to the `LD_LIBRARY_PATH` variable\.
+ Amazon Linux, Amazon Linux 2, RHEL 7\.6/7\.7/7\.8, CentOS 7
```
$ export LD_LIBRARY_PATH=/opt/amazon/efa/lib64:$LD_LIBRARY_PATH
```
+ Ubuntu 16\.04 and Ubuntu 18\.04
```
$ export LD_LIBRARY_PATH=/opt/amazon/efa/lib:$LD_LIBRARY_PATH
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
b7fdb5f7ffa0-1 | $ export LD_LIBRARY_PATH=/opt/amazon/efa/lib:$LD_LIBRARY_PATH
```
1. \(Amazon Linux, Amazon Linux 2, RHEL 7\.6/7\.7/7\.8, CentOS 7 only\) By default, the make file looks for the required libraries in the `mpi_home/lib` directory\. However, with the Open MPI installed with EFA, the libraries are located in `mpi_home/lib64`\. To update the path in the make file, run the following command\.
```
$ sed -i s/'NVLDFLAGS += -L$(MPI_HOME)\/lib -lmpi'/'NVLDFLAGS += -L$(MPI_HOME)\/lib64 -lmpi'/ src/Makefile
```
1. Install the NCCL tests and specify the MPI, NCCL, and CUDA installation directories\.
```
$ make MPI=1 MPI_HOME=/opt/amazon/openmpi NCCL_HOME=$HOME/nccl/build CUDA_HOME=/usr/local/cuda-10.1
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
eb244a9696c9-0 | Run a test to ensure that your temporary instance is properly configured for EFA and NCCL\.
**To test your EFA and NCCL configuration**
1. Create a host file that specifies the hosts on which to run the tests\. The following command creates a host file named `my-hosts` that includes a reference to the instance itself\.
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
66c3f8cc5c53-0 | ```
[ec2-user ~]$ TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` \
&& curl -H "X-aws-ec2-metadata-token: $TOKEN" –v http://169.254.169.254/latest/meta-data/local-ipv4 >> my-hosts
```
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
eae17f8b9bfd-0 | ```
[ec2-user ~]$ curl http://169.254.169.254/latest/meta-data/local-ipv4 >> my-hosts
```
------
1. Run the test and specify the host file \(`--hostfile`\) and the number of GPUs to use \(`-n`\)\. The following command runs the `all_reduce_perf` test on 8 GPUs on the instance itself, and specifies the following environment variables\.
+ `FI_PROVIDER="efa"`—specifies the fabric interface provider\. This must be set to `"efa"`\.
+ `FI_EFA_TX_MIN_CREDITS=64`—specifies the minimum number of send credits that the sender requests from the receiver\. `64` is the recommended value for NCCL jobs using EFA\. The value should only be increased for message transfers that are larger than 256 MB\.
+ `NCCL_DEBUG=INFO`—enables detailed debugging output\. You can also specify `VERSION` to print only the NCCL version at the start of the test, or `WARN` to receive only error messages\.
+ `NCCL_TREE_THRESHOLD=0`—disables tree algorithms for the test\.
For more information about the NCCL test arguments, see the [NCCL Tests README](https://github.com/NVIDIA/nccl-tests/blob/master/README.md) in the official nccl\-tests repository\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
eae17f8b9bfd-1 | + Amazon Linux, Amazon Linux 2, RHEL 7\.6/7\.7/7\.8, CentOS 7
```
$ /opt/amazon/openmpi/bin/mpirun \
-x FI_PROVIDER="efa" \
-x FI_EFA_TX_MIN_CREDITS=64 \
-x LD_LIBRARY_PATH=$HOME/nccl/build/lib:/usr/local/cuda-10.1/lib64:/opt/amazon/efa/lib64:/opt/amazon/openmpi/lib64:$LD_LIBRARY_PATH \
-x NCCL_DEBUG=INFO \
-x NCCL_TREE_THRESHOLD=0 \
--hostfile my-hosts -n 8 -N 8 \
--mca btl tcp,self --mca btl_tcp_if_exclude lo,docker0 --bind-to none \
$HOME/nccl-tests/build/all_reduce_perf -b 8 -e 1G -f 2 -g 1 -c 1 -n 100
```
+ Ubuntu 16\.04 and Ubuntu 18\.04
```
$ /opt/amazon/openmpi/bin/mpirun \
-x FI_PROVIDER="efa" \
-x FI_EFA_TX_MIN_CREDITS=64 \ | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
eae17f8b9bfd-2 | -x FI_PROVIDER="efa" \
-x FI_EFA_TX_MIN_CREDITS=64 \
-x LD_LIBRARY_PATH=$HOME/nccl/build/lib:/usr/local/cuda-10.1/lib64:/opt/amazon/efa/lib:/opt/amazon/openmpi/lib:$LD_LIBRARY_PATH \
-x NCCL_DEBUG=INFO \
-x NCCL_TREE_THRESHOLD=0 \
--hostfile my-hosts -n 8 -N 8 \
--mca btl tcp,self --mca btl_tcp_if_exclude lo,docker0 --bind-to none \
$HOME/nccl-tests/build/all_reduce_perf -b 8 -e 1G -f 2 -g 1 -c 1 -n 100
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
360a601c50dc-0 | Install the machine learning applications on the temporary instance\. The installation procedure varies depending on the specific machine learning application\. For more information about installing software on your Linux instance, see [Managing Software on Your Linux Instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/managing-software.html)\.
**Note**
You might need to refer to your machine learning application’s documentation for installation instructions\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
1ba033af55dc-0 | After you have installed the required software components, you create an AMI that you can reuse to launch your EFA\-enabled instances\.
**To create an AMI from your temporary instance**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. In the navigation pane, choose **Instances**\.
1. Select the temporary instance that you created and choose **Actions**, **Image**, **Create Image**\.
1. In the **Create Image** window, do the following:
1. For **Image name**, enter a descriptive name for the AMI\.
1. \(Optional\) For **Image description**, enter a brief description of the AMI\.
1. Choose **Create Image** and then choose **Close**\.
1. In the navigation pane, choose **AMIs**\.
1. Locate the AMI you created in the list\. Wait for the Status to transition from `pending` to `available` before continuing to the next step\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
330b71ac9a0e-0 | At this point, you no longer need the temporary instance that you launched\. You can terminate the instance to stop incurring charges for it\.
**To terminate the temporary instance**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. In the navigation pane, choose **Instances**\.
1. Select the temporary instance that you created and then choose **Actions**, **Instance State**, **Terminate**, **Yes, Terminate**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
136b85daefd4-0 | Launch your EFA and NCCL\-enabled instances into a cluster placement group using the EFA\-enabled AMI and the EFA\-enabled security group that you created earlier\.
**To launch your EFA and NCCL\-enabled instances into a cluster placement group**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. Choose **Launch Instance**\.
1. On the **Choose an AMI** page, choose **My AMIs**, find the AMI that you created earlier, and then choose **Select**\.
1. On the **Choose an Instance Type** page, select **p3dn\.24xlarge** and then choose **Next: Configure Instance Details**\.
1. On the **Configure Instance Details** page, do the following:
1. For **Number of instances**, enter the number of EFA and NCCL\-enabled instances that you want to launch\.
1. For **Network** and **Subnet**, select the VPC and subnet into which to launch the instances\.
1. For **Placement group**, select **Add instance to placement group**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
136b85daefd4-1 | 1. For **Placement group**, select **Add instance to placement group**\.
1. For **Placement group name**, select **Add to a new placement group**, and then enter a descriptive name for the placement group\. Then for **Placement group strategy**, select **cluster**\.
1. For **EFA**, choose **Enable**\.
1. In the **Network Interfaces** section, for device **eth0**, choose **New network interface**\. You can optionally specify a primary IPv4 address and one or more secondary IPv4 addresses\. If you are launching the instance into a subnet that has an associated IPv6 CIDR block, you can optionally specify a primary IPv6 address and one or more secondary IPv6 addresses\.
1. Choose **Next: Add Storage**\.
1. On the **Add Storage** page, specify the volumes to attach to the instances in addition to the volumes specified by the AMI \(such as the root device volume\)\. Then choose **Next: Add Tags**\.
1. On the **Add Tags** page, specify tags for the instances, such as a user\-friendly name, and then choose **Next: Configure Security Group**\.
1. On the **Configure Security Group** page, for **Assign a security group**, select **Select an existing security group**, and then select the security group that you created earlier\.
1. Choose **Review and Launch**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
136b85daefd4-2 | 1. Choose **Review and Launch**\.
1. On the **Review Instance Launch** page, review the settings, and then choose **Launch** to choose a key pair and to launch your instances\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
e8262627b8a7-0 | To enable your applications to run across all of the instances in your cluster, you must enable passwordless SSH access from the leader node to the member nodes\. The leader node is the instance from which you run your applications\. The remaining instances in the cluster are the member nodes\.
**To enable passwordless SSH between the instances in the cluster**
1. Select one instance in the cluster as the leader node, and connect to it\.
1. Disable `strictHostKeyChecking` and enable `ForwardAgent` on the leader node\. Open `~/.ssh/config` using your preferred text editor and add the following\.
```
Host *
ForwardAgent yes
Host *
StrictHostKeyChecking no
```
1. Generate an RSA key pair\.
```
$ ssh-keygen -t rsa -N "" -f /home/ubuntu/.ssh/id_rsa
```
The key pair is created in the `$HOME/.ssh/` directory\.
1. Change the permissions of the private key on the leader node\.
```
$ chmod 600 ~/.ssh/id_rsa
```
1. Open `~/.ssh/id_rsa.pub` using your preferred text editor and copy the key\.
1. For each member node in the cluster, do the following: | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
e8262627b8a7-1 | 1. For each member node in the cluster, do the following:
1. Connect to the instance\.
1. Open `~/.ssh/authorized_keys` using your preferred text editor and add the public key that you copied earlier\.
1. To test that the passwordless SSH is functioning as expected, connect to your leader node and run the following command\.
```
$ ssh member_node_private_ip
```
You should connect to the member node without being prompted for a key or password\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/efa-start-nccl-base.md |
a179514d3447-0 | The steps for launching, monitoring, and modifying these instances are similar\. The key difference is the default credit specification when they launch\. If you do not change the default credit specification, the default is that:
+ T3 and T4g instances launch as `unlimited`
+ T2 instances launch as `standard`
**Topics**
+ [Launching a burstable performance instance as Unlimited or Standard](#launch-burstable-performance-instances)
+ [Using an Auto Scaling group to launch a burstable performance instance as Unlimited](#burstable-performance-instances-auto-scaling-grp)
+ [Viewing the credit specification of a burstable performance instance](#describe-burstable-performance-instances)
+ [Modifying the credit specification of a burstable performance instance](#modify-burstable-performance-instances)
+ [Setting the default credit specification for the account](#burstable-performance-instance-set-default-credit-specification-for-account)
+ [Viewing the default credit specification](#burstable-performance-instances-get-default-credit-specification) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
8c902c997215-0 | You can launch your instances as `unlimited` or `standard` using the Amazon EC2 console, an AWS SDK, a command line tool, or with an Auto Scaling group\. For more information, see [Using an Auto Scaling group to launch a burstable performance instance as Unlimited](#burstable-performance-instances-auto-scaling-grp)\.
**Requirements**
+ You must launch your instances using an Amazon EBS volume as the root device\. For more information, see [Amazon EC2 root device volume](RootDeviceStorage.md)\.
+ For more information about AMI and driver requirements for these instances, see [Release notes](general-purpose-instances.md#general-purpose-instances-limits)\.
**To launch a burstable performance instance as Unlimited or Standard \(console\)**
1. Follow the [Launching an instance using the Launch Instance Wizard](launching-instance.md) procedure\.
1. On the **Choose an Instance Type** page, select an instance type, and choose **Next: Configure Instance Details**\.
1. Choose a credit specification\.
1. To launch a T3 or T4g instance as `standard`, clear **Unlimited**\.
1. To launch a T2 instance as `unlimited`, select **Unlimited**\.
1. Continue as prompted by the wizard\. When you've finished reviewing your options on the **Review Instance Launch** page, choose **Launch**\. For more information, see [Launching an instance using the Launch Instance Wizard](launching-instance.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
8c902c997215-1 | **To launch a burstable performance instance as Unlimited or Standard \(AWS CLI\)**
Use the [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) command to launch your instances\. Specify the credit specification using the `--credit-specification CpuCredits=` parameter\. Valid credit specifications are `unlimited` and `standard`\.
+ For T3 and T4g, if you do not include the `--credit-specification` parameter, the instance launches as `unlimited` by default\.
+ For T2, if you do not include the `--credit-specification` parameter, the instance launches as `standard` by default\.
```
aws ec2 run-instances --image-id ami-abc12345 --count 1 --instance-type t3.micro --key-name MyKeyPair --credit-specification "CpuCredits=unlimited"
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
f8e8bec235fa-0 | When burstable performance instances are launched or started, they require CPU credits for a good bootstrapping experience\. If you use an Auto Scaling group to launch your instances, we recommend that you configure your instances as `unlimited`\. If you do, the instances use surplus credits when they are automatically launched or restarted by the Auto Scaling group\. Using surplus credits prevents performance restrictions\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
8931bcc7ac57-0 | You must use a *launch template* for launching instances as `unlimited` in an Auto Scaling group\. A launch configuration does not support launching instances as `unlimited`\.
**To create a launch template that launches instances as Unlimited \(console\)**
1. Follow the [Creating a Launch Template for an Auto Scaling Group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html) procedure\.
1. In **Launch template contents**, for **Instance type**, choose an instance size\.
1. To launch instances as `unlimited` in an Auto Scaling group, under **Advanced details**, for **Credit specification**, choose **Unlimited**\.
1. When you've finished defining the launch template parameters, choose **Create launch template**\. For more information, see [Creating a Launch Template for an Auto Scaling Group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html) in the *Amazon EC2 Auto Scaling User Guide*\.
**To create a launch template that launches instances as Unlimited \(AWS CLI\)**
Use the [create\-launch\-template](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-launch-template.html) command and specify `unlimited` as the credit specification\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
8931bcc7ac57-1 | + For T3 and T4g, if you do not include the `CreditSpecification={CpuCredits=unlimited}` value, the instance launches as `unlimited` by default\.
+ For T2, if you do not include the `CreditSpecification={CpuCredits=unlimited}` value, the instance launches as `standard` by default\.
```
aws ec2 create-launch-template --launch-template-name MyLaunchTemplate --version-description FirstVersion --launch-template-data ImageId=ami-8c1be5f6,InstanceType=t3.medium,CreditSpecification={CpuCredits=unlimited}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
ee53c21420ec-0 | To associate the launch template with an Auto Scaling group, create the Auto Scaling group using the launch template, or add the launch template to an existing Auto Scaling group\.
**To create an Auto Scaling group using a launch template \(console\)**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. On the navigation bar at the top of the screen, select the same Region that you used when you created the launch template\.
1. In the navigation pane, choose **Auto Scaling Groups**, **Create Auto Scaling group**\.
1. Choose **Launch Template**, select your launch template, and then choose **Next Step**\.
1. Complete the fields for the Auto Scaling group\. When you've finished reviewing your configuration settings on the **Review page**, choose **Create Auto Scaling group**\. For more information, see [Creating an Auto Scaling Group Using a Launch Template](https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-launch-template.html) in the *Amazon EC2 Auto Scaling User Guide*\.
**To create an Auto Scaling group using a launch template \(AWS CLI\)** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
ee53c21420ec-1 | **To create an Auto Scaling group using a launch template \(AWS CLI\)**
Use the [create\-auto\-scaling\-group](https://docs.aws.amazon.com/cli/latest/reference/autoscaling/create-auto-scaling-group.html) AWS CLI command and specify the `--launch-template` parameter\.
**To add a launch template to an existing Auto Scaling group \(console\)**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. On the navigation bar at the top of the screen, select the same Region that you used when you created the launch template\.
1. In the navigation pane, choose **Auto Scaling Groups**\.
1. From the Auto Scaling group list, select an Auto Scaling group, and choose **Actions**, **Edit**\.
1. On the **Details** tab, for **Launch Template**, choose a launch template, and then choose **Save**\.
**To add a launch template to an existing Auto Scaling group \(AWS CLI\)**
Use the [update\-auto\-scaling\-group](https://docs.aws.amazon.com/cli/latest/reference/autoscaling/update-auto-scaling-group.html) AWS CLI command and specify the `--launch-template` parameter\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
8bdfc75c15b7-0 | You can view the credit specification \(`unlimited` or `standard`\) of a running or stopped instance\.
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
536d33c79237-0 | **To view the credit specification of a burstable instance**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. In the left navigation pane, choose **Instances**\.
1. Select the instance\.
1. Choose **Details** and view the **Credit specification** field\. The value is either `unlimited` or `standard`\.
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
7f7cbb4076df-0 | **To view the credit specification of a burstable instance**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. In the left navigation pane, choose **Instances**\.
1. Select the instance\.
1. Choose **Description** and view the **T2/T3 Unlimited** field\.
+ If the value is `Enabled`, then your instance is configured as `unlimited`\.
+ If the value is `Disabled`, then your instance is configured as `standard`\.
------
**To describe the credit specification of a burstable performance instance \(AWS CLI\)**
Use the [describe\-instance\-credit\-specifications](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instance-credit-specifications.html) command\. If you do not specify one or more instance IDs, all instances with the credit specification of `unlimited` are returned, as well as instances that were previously configured with the `unlimited` credit specification\. For example, if you resize a T3 instance to an M4 instance, while it is configured as `unlimited`, Amazon EC2 returns the M4 instance\.
**Example**
```
aws ec2 describe-instance-credit-specifications --instance-id i-1234567890abcdef0 | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/burstable-performance-instances-how-to.md |
Subsets and Splits