id
stringlengths 14
16
| text
stringlengths 1
2.43k
| source
stringlengths 99
229
|
---|---|---|
d8f15a7d348d-18 | | r5dn\.large \* | 4,750 | 593\.75 | 18,750 |
| r5dn\.xlarge \* | 4,750 | 593\.75 | 18,750 |
| r5dn\.2xlarge \* | 4,750 | 593\.75 | 18,750 |
| r5dn\.4xlarge | 4,750 | 593\.75 | 18,750 |
| r5dn\.8xlarge | 6,800 | 850 | 30,000 |
| r5dn\.12xlarge | 9,500 | 1,187\.5 | 40,000 |
| r5dn\.16xlarge | 13,600 | 1,700 | 60,000 |
| r5dn\.24xlarge | 19,000 | 2,375 | 80,000 |
| r5n\.large \* | 4,750 | 593\.75 | 18,750 |
| r5n\.xlarge \* | 4,750 | 593\.75 | 18,750 |
| r5n\.2xlarge \* | 4,750 | 593\.75 | 18,750 |
| r5n\.4xlarge | 4,750 | 593\.75 | 18,750 |
| r5n\.8xlarge | 6,800 | 850 | 30,000 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-19 | | r5n\.8xlarge | 6,800 | 850 | 30,000 |
| r5n\.12xlarge | 9,500 | 1,187\.5 | 40,000 |
| r5n\.16xlarge | 13,600 | 1,700 | 60,000 |
| r5n\.24xlarge | 19,000 | 2,375 | 80,000 |
| r6g\.medium \* | 4,750 | 593\.75 | 20,000 |
| r6g\.large \* | 4,750 | 593\.75 | 20,000 |
| r6g\.xlarge \* | 4,750 | 593\.75 | 20,000 |
| r6g\.2xlarge \* | 4,750 | 593\.75 | 20,000 |
| r6g\.4xlarge | 4,750 | 593\.75 | 20,000 |
| r6g\.8xlarge | 9,500 | 1,187\.5 | 40,000 |
| r6g\.12xlarge | 14,250 | 1,781\.25 | 50,000 |
| r6g\.16xlarge | 19,000 | 2,375 | 80,000 |
| r6g\.metal | 19,000 | 2,375 | 80,000 |
| r6gd\.medium \* | 4,750 | 593\.75 | 20,000 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-20 | | r6gd\.medium \* | 4,750 | 593\.75 | 20,000 |
| r6gd\.large \* | 4,750 | 593\.75 | 20,000 |
| r6gd\.xlarge \* | 4,750 | 593\.75 | 20,000 |
| r6gd\.2xlarge \* | 4,750 | 593\.75 | 20,000 |
| r6gd\.4xlarge | 4,750 | 593\.75 | 20,000 |
| r6gd\.8xlarge | 9,500 | 1,187\.5 | 40,000 |
| r6gd\.12xlarge | 14,250 | 1,781\.25 | 50,000 |
| r6gd\.16xlarge | 19,000 | 2,375 | 80,000 |
| r6gd\.metal | 19,000 | 2,375 | 80,000 |
| t3\.nano \* | 2,085 | 260\.57 | 11,800 |
| t3\.micro \* | 2,085 | 260\.57 | 11,800 |
| t3\.small \* | 2,085 | 260\.57 | 11,800 |
| t3\.medium \* | 2,085 | 260\.57 | 11,800 |
| t3\.large \* | 2,780 | 347\.5 | 15,700 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-21 | | t3\.large \* | 2,780 | 347\.5 | 15,700 |
| t3\.xlarge \* | 2,780 | 347\.5 | 15,700 |
| t3\.2xlarge \* | 2,780 | 347\.5 | 15,700 |
| t3a\.nano \* | 2,085 | 260\.57 | 11,800 |
| t3a\.micro \* | 2,085 | 260\.57 | 11,800 |
| t3a\.small \* | 2,085 | 260\.57 | 11,800 |
| t3a\.medium \* | 2,085 | 260\.57 | 11,800 |
| t3a\.large \* | 2,780 | 347\.5 | 15,700 |
| t3a\.xlarge \* | 2,780 | 347\.5 | 15,700 |
| t3a\.2xlarge \* | 2,780 | 347\.5 | 15,700 |
| t4g\.nano \* | 2,606 | 325\.75 | 11,800 |
| t4g\.micro \* | 2,606 | 325\.75 | 11,800 |
| t4g\.small \* | 2,606 | 325\.75 | 11,800 |
| t4g\.medium \* | 2,606 | 325\.75 | 11,800 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-22 | | t4g\.medium \* | 2,606 | 325\.75 | 11,800 |
| t4g\.large \* | 3,475 | 434\.37 | 15,700 |
| t4g\.xlarge \* | 3,475 | 434\.37 | 15,700 |
| t4g\.2xlarge \* | 3,475 | 434\.37 | 15,700 |
| u\-6tb1\.metal | 38,000 | 4,750 | 160,000 |
| u\-9tb1\.metal | 38,000 | 4,750 | 160,000 |
| u\-12tb1\.metal | 38,000 | 4,750 | 160,000 |
| u\-18tb1\.metal | 38,000 | 4,750 | 160,000 |
| u\-24tb1\.metal | 38,000 | 4,750 | 160,000 |
| x1\.16xlarge | 7,000 | 875 | 40,000 |
| x1\.32xlarge | 14,000 | 1,750 | 80,000 |
| x1e\.xlarge | 500 | 62\.5 | 3,700 |
| x1e\.2xlarge | 1,000 | 125 | 7,400 |
| x1e\.4xlarge | 1,750 | 218\.75 | 10,000 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-23 | | x1e\.4xlarge | 1,750 | 218\.75 | 10,000 |
| x1e\.8xlarge | 3,500 | 437\.5 | 20,000 |
| x1e\.16xlarge | 7,000 | 875 | 40,000 |
| x1e\.32xlarge | 14,000 | 1,750 | 80,000 |
| z1d\.large \* | 3,170 | 396\.25 | 13,333 |
| z1d\.xlarge \* | 3,170 | 396\.25 | 13,333 |
| z1d\.2xlarge | 3,170 | 396\.25 | 13,333 |
| z1d\.3xlarge | 4,750 | 593\.75 | 20,000 |
| z1d\.6xlarge | 9,500 | 1,187\.5 | 40,000 |
| z1d\.12xlarge | 19,000 | 2,375 | 80,000 |
| z1d\.metal | 19,000 | 2,375 | 80,000 |
\* These instance types can support maximum performance for 30 minutes at least once every 24 hours\. If you have a workload that requires sustained maximum performance for longer than 30 minutes, select an instance type according to baseline performance as shown in the following table\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-24 | | Instance size | Baseline bandwidth \(Mbps\) | Baseline throughput \(MB/s, 128 KiB I/O\) | Baseline IOPS \(16 KiB I/O\) |
| --- | --- | --- | --- |
| a1\.medium | 300 | 37\.5 | 2,500 |
| a1\.large | 525 | 65\.625 | 4,000 |
| a1\.xlarge | 800 | 100 | 6,000 |
| a1\.2xlarge | 1,750 | 218\.75 | 10,000 |
| c5\.large | 650 | 81\.25 | 4,000 |
| c5\.xlarge | 1,150 | 143\.75 | 6,000 |
| c5\.2xlarge | 2,300 | 287\.5 | 10,000 |
| c5a\.large | 200 | 25 | 800 |
| c5a\.xlarge | 400 | 50 | 1,600 |
| c5a\.2xlarge | 800 | 100 | 3,200 |
| c5a\.4xlarge | 1,580 | 198 | 6,600 |
| c5ad\.large | 200 | 25 | 800 |
| c5ad\.xlarge | 400 | 50 | 1,600 |
| c5ad\.2xlarge | 800 | 100 | 3,200 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-25 | | c5ad\.2xlarge | 800 | 100 | 3,200 |
| c5ad\.4xlarge | 1,580 | 198 | 6,600 |
| c5d\.large | 650 | 81\.25 | 4,000 |
| c5d\.xlarge | 1,150 | 143\.75 | 6,000 |
| c5d\.2xlarge | 2,300 | 287\.5 | 10,000 |
| c5n\.large | 650 | 81\.25 | 4,000 |
| c5n\.xlarge | 1,150 | 143\.75 | 6,000 |
| c5n\.2xlarge | 2,300 | 287\.5 | 10,000 |
| c6g\.medium | 315 | 39\.375 | 2,500 |
| c6g\.large | 630 | 78\.75 | 3,600 |
| c6g\.xlarge | 1,188 | 148\.5 | 6,000 |
| c6g\.2xlarge | 2,375 | 296\.875 | 12,000 |
| c6gd\.medium | 315 | 39\.375 | 2,500 |
| c6gd\.large | 630 | 78\.75 | 3,600 |
| c6gd\.xlarge | 1,188 | 148\.5 | 6,000 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-26 | | c6gd\.xlarge | 1,188 | 148\.5 | 6,000 |
| c6gd\.2xlarge | 2,375 | 296\.875 | 12,000 |
| g4dn\.xlarge | 950 | 118\.75 | 3,000 |
| g4dn\.2xlarge | 1,150 | 143\.75 | 6,000 |
| i3en\.large | 577 | 72\.1 | 3,000 |
| i3en\.xlarge | 1,154 | 144\.2 | 6,000 |
| i3en\.2xlarge | 2,307 | 288\.39 | 12,000 |
| i3en\.3xlarge | 3,800 | 475 | 15,000 |
| inf1\.xlarge | 1,190 | 148\.75 | 4,000 |
| inf1\.2xlarge | 1,190 | 148\.75 | 6,000 |
| m5\.large | 650 | 81\.25 | 3,600 |
| m5\.xlarge | 1,150 | 143\.75 | 6,000 |
| m5\.2xlarge | 2,300 | 287\.5 | 12,000 |
| m5a\.large | 650 | 81\.25 | 3,600 |
| m5a\.xlarge | 1,085 | 135\.63 | 6,000 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-27 | | m5a\.xlarge | 1,085 | 135\.63 | 6,000 |
| m5a\.2xlarge | 1,580 | 197\.5 | 8,333 |
| m5ad\.large | 650 | 81\.25 | 3,600 |
| m5ad\.xlarge | 1,085 | 135\.63 | 6,000 |
| m5ad\.2xlarge | 1,580 | 197\.5 | 8,333 |
| m5d\.large | 650 | 81\.25 | 3,600 |
| m5d\.xlarge | 1,150 | 143\.75 | 6,000 |
| m5d\.2xlarge | 2,300 | 287\.5 | 12,000 |
| m5dn\.large | 650 | 81\.25 | 3,600 |
| m5dn\.xlarge | 1,150 | 143\.75 | 6,000 |
| m5dn\.2xlarge | 2,300 | 287\.5 | 12,000 |
| m5n\.large | 650 | 81\.25 | 3,600 |
| m5n\.xlarge | 1,150 | 143\.75 | 6,000 |
| m5n\.2xlarge | 2,300 | 287\.5 | 12,000 |
| m6g\.medium | 315 | 39\.375 | 2,500 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-28 | | m6g\.medium | 315 | 39\.375 | 2,500 |
| m6g\.large | 630 | 78\.75 | 3,600 |
| m6g\.xlarge | 1,188 | 148\.5 | 6,000 |
| m6g\.2xlarge | 2,375 | 296\.875 | 12,000 |
| m6gd\.medium | 315 | 39\.375 | 2,500 |
| m6gd\.large | 630 | 78\.75 | 3,600 |
| m6gd\.xlarge | 1,188 | 148\.5 | 6,000 |
| m6gd\.2xlarge | 2,375 | 296\.875 | 12,000 |
| r5\.large | 650 | 81\.25 | 3,600 |
| r5\.xlarge | 1,150 | 143\.75 | 6,000 |
| r5\.2xlarge | 2,300 | 287\.5 | 12,000 |
| r5a\.large | 650 | 81\.25 | 3,600 |
| r5a\.xlarge | 1,085 | 135\.63 | 6,000 |
| r5a\.2xlarge | 1,580 | 197\.5 | 8,333 |
| r5ad\.large | 650 | 81\.25 | 3,600 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-29 | | r5ad\.large | 650 | 81\.25 | 3,600 |
| r5ad\.xlarge | 1,085 | 135\.63 | 6,000 |
| r5ad\.2xlarge | 1,580 | 197\.5 | 8,333 |
| r5d\.large | 650 | 81\.25 | 3,600 |
| r5d\.xlarge | 1,150 | 143\.75 | 6,000 |
| r5d\.2xlarge | 2,300 | 287\.5 | 12,000 |
| r5dn\.large | 650 | 81\.25 | 3,600 |
| r5dn\.xlarge | 1,150 | 143\.75 | 6,000 |
| r5dn\.2xlarge | 2,300 | 287\.5 | 12,000 |
| r5n\.large | 650 | 81\.25 | 3,600 |
| r5n\.xlarge | 1,150 | 143\.75 | 6,000 |
| r5n\.2xlarge | 2,300 | 287\.5 | 12,000 |
| r6g\.medium | 315 | 39\.375 | 2,500 |
| r6g\.large | 630 | 78\.75 | 3,600 |
| r6g\.xlarge | 1,188 | 148\.5 | 6,000 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-30 | | r6g\.xlarge | 1,188 | 148\.5 | 6,000 |
| r6g\.2xlarge | 2,375 | 296\.875 | 12,000 |
| r6gd\.medium \* | 315 | 39\.375 | 2,500 |
| r6gd\.large \* | 630 | 78\.75 | 3,600 |
| r6gd\.xlarge \* | 1,188 | 148\.5 | 6,000 |
| r6gd\.2xlarge \* | 2,375 | 296\.875 | 12,000 |
| t3\.nano | 43 | 5\.43 | 250 |
| t3\.micro | 87 | 10\.86 | 500 |
| t3\.small | 174 | 21\.71 | 1,000 |
| t3\.medium | 347 | 43\.43 | 2,000 |
| t3\.large | 695 | 86\.86 | 4,000 |
| t3\.xlarge | 695 | 86\.86 | 4,000 |
| t3\.2xlarge | 695 | 86\.86 | 4,000 |
| t3a\.nano | 45 | 5\.63 | 250 |
| t3a\.micro | 90 | 11\.25 | 500 |
| t3a\.small | 175 | 21\.88 | 1,000 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
d8f15a7d348d-31 | | t3a\.small | 175 | 21\.88 | 1,000 |
| t3a\.medium | 350 | 43\.75 | 2,000 |
| t3a\.large | 695 | 86\.86 | 4,000 |
| t3a\.xlarge | 695 | 86\.86 | 4,000 |
| t3a\.2xlarge | 695 | 86\.86 | 4,000 |
| t4g\.nano | 32 | 4 | 250 |
| t4g\.micro | 64 | 8 | 500 |
| t4g\.small | 128 | 16 | 1,000 |
| t4g\.medium | 256 | 32 | 2,000 |
| t4g\.large | 512 | 64 | 4,000 |
| t4g\.xlarge | 1,024 | 128 | 4,000 |
| t4g\.2xlarge | 2,048 | 256 | 4,000 |
| z1d\.large | 800 | 100 | 3,333 |
| z1d\.xlarge | 1,580 | 197\.5 | 6,667 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
a7a3fb65110b-0 | The following table lists the instance types that support EBS optimization but EBS optimization is not enabled by default\. You can enable EBS optimization when you launch these instances or after they are running\. Instances must have EBS optimization enabled to achieve the level of performance described\. When you enable EBS optimization for an instance that is not EBS\-optimized by default, you pay an additional low, hourly fee for the dedicated capacity\. For pricing information, see EBS\-Optimized Instances on the [Amazon EC2 Pricing, On\-Demand Pricing page](http://aws.amazon.com/ec2/pricing/on-demand/)\.
| Instance size | Maximum bandwidth \(Mbps\) | Maximum throughput \(MB/s, 128 KiB I/O\) | Maximum IOPS \(16 KiB I/O\) |
| --- | --- | --- | --- |
| c1\.xlarge | 1,000 | 125 | 8,000 |
| c3\.xlarge | 500 | 62\.5 | 4,000 |
| c3\.2xlarge | 1,000 | 125 | 8,000 |
| c3\.4xlarge | 2,000 | 250 | 16,000 |
| g2\.2xlarge | 1,000 | 125 | 8,000 |
| i2\.xlarge | 500 | 62\.5 | 4,000 |
| i2\.2xlarge | 1,000 | 125 | 8,000 | | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
a7a3fb65110b-1 | | i2\.2xlarge | 1,000 | 125 | 8,000 |
| i2\.4xlarge | 2,000 | 250 | 16,000 |
| m1\.large | 500 | 62\.5 | 4,000 |
| m1\.xlarge | 1,000 | 125 | 8,000 |
| m2\.2xlarge | 500 | 62\.5 | 4,000 |
| m2\.4xlarge | 1,000 | 125 | 8,000 |
| m3\.xlarge | 500 | 62\.5 | 4,000 |
| m3\.2xlarge | 1,000 | 125 | 8,000 |
| r3\.xlarge | 500 | 62\.5 | 4,000 |
| r3\.2xlarge | 1,000 | 125 | 8,000 |
| r3\.4xlarge | 2,000 | 250 | 16,000 |
The `i2.8xlarge`, `c3.8xlarge`, and `r3.8xlarge` instances do not have dedicated EBS bandwidth and therefore do not offer EBS optimization\. On these instances, network traffic and Amazon EBS traffic share the same 10\-gigabit network interface\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
0475a8f0d783-0 | You can use the `EBSIOBalance%` and `EBSByteBalance%` metrics to help you determine whether your instances are sized correctly\. You can view these metrics in the CloudWatch console and set an alarm that is triggered based on a threshold you specify\. These metrics are expressed as a percentage\. Instances with a consistently low balance percentage are candidates to size up\. Instances where the balance percentage never drops below 100% are candidates for downsizing\. For more information, see [Monitoring your instances using CloudWatch](using-cloudwatch.md)\.
The high memory instances are designed to run large in\-memory databases, including production deployments of the SAP HANA in\-memory database, in the cloud\. To maximize EBS performance, use high memory instances with an even number of `io1` or `io2` volumes with identical provisioned performance\. For example, for IOPS heavy workloads, use four `io1` or `io2` volumes with 40,000 provisioned IOPS to get the maximum 160,000 instance IOPS\. Similarly, for throughput heavy workloads, use six `io1` or `io2` volumes with 48,000 provisioned IOPS to get the maximum 4,750 MB/s throughput\. For additional recommendations, see [Storage Configuration for SAP HANA](https://docs.aws.amazon.com/quickstart/latest/sap-hana/storage.html)\.
**Considerations** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
0475a8f0d783-1 | **Considerations**
+ G4, I3en, Inf1, M5a, M5ad, R5a, R5ad, T3, T3a, and Z1d instances launched after February 26, 2020 provide the maximum performance listed in the table above\. To get the maximum performance from an instance launched before February 26, 2020, stop and start it\.
+ C5, C5d, C5n, M5, M5d, M5n, M5dn, R5, R5d, R5n, R5dn, and P3dn instances launched after December 3, 2019 provide the maximum performance listed in the table above\. To get the maximum performance from an instance launched before December 3, 2019, stop and start it\.
+ `u-6tb1.metal`, `u-9tb1.metal`, and `u-12tb1.metal` instances launched after March 12, 2020 provide the performance in the table above\. Instances of these types launched before March 12, 2020 might provide lower performance\. To get the maximum performance from an instance launched before March 12, 2020, contact your account team to upgrade the instance at no additional cost\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
ae9e31881ea4-0 | You can enable optimization for an instance by setting its attribute for EBS optimization\.
**To enable Amazon EBS optimization when launching an instance using the console**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. Choose **Launch Instance**\.
1. In **Step 1: Choose an Amazon Machine Image \(AMI\)**, select an AMI\.
1. In **Step 2: Choose an Instance Type**, select an instance type that is listed as supporting Amazon EBS optimization\.
1. In **Step 3: Configure Instance Details**, complete the fields that you need and choose **Launch as EBS\-optimized instance**\. If the instance type that you selected in the previous step doesn't support Amazon EBS optimization, this option is not present\. If the instance type that you selected is Amazon EBS–optimized by default, this option is selected and you can't deselect it\.
1. Follow the directions to complete the wizard and launch your instance\.
**To enable EBS optimization when launching an instance using the command line**
You can use one of the following commands with the corresponding option\. For more information about these command line interfaces, see [Accessing Amazon EC2](concepts.md#access-ec2)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
ae9e31881ea4-1 | + [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) with `--ebs-optimized` \(AWS CLI\)
+ [New\-EC2Instance](https://docs.aws.amazon.com/powershell/latest/reference/items/New-EC2Instance.html) with `-EbsOptimized` \(AWS Tools for Windows PowerShell\) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
369144119c09-0 | You can enable or disable optimization for an existing instance by modifying its Amazon EBS–optimized instance attribute\. If the instance is running, you must stop it first\.
**Warning**
When you stop an instance, the data on any instance store volumes is erased\. To keep data from instance store volumes, be sure to back it up to persistent storage\.
**To enable EBS optimization for an existing instance using the 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**, and select the instance\.
1. To stop the instance, choose **Actions**, **Instance State**, **Stop**\.
1. In the confirmation dialog box, choose **Yes, Stop**\. It can take a few minutes for the instance to stop\.
1. With the instance still selected, choose **Actions**, **Instance Settings**, **Change Instance Type**\.
1. In the **Change Instance Type** dialog box, do one of the following:
+ If the instance type of your instance is Amazon EBS–optimized by default, **EBS\-optimized** is selected and you can't change it\. You can choose **Cancel**, because Amazon EBS optimization is already enabled for the instance\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
369144119c09-1 | + If the instance type of your instance supports Amazon EBS optimization, choose **EBS\-optimized**, **Apply**\.
+ If the instance type of your instance does not support Amazon EBS optimization, you can't choose **EBS\-optimized**\. You can select an instance type from **Instance Type** that supports Amazon EBS optimization, and then choose **EBS\-optimized**, **Apply**\.
1. Choose **Actions**, **Instance State**, **Start**\.
**To enable EBS optimization for an existing instance using the command line**
1. If the instance is running, use one of the following commands to stop it:
+ [stop\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/stop-instances.html) \(AWS CLI\)
+ [Stop\-EC2Instance](https://docs.aws.amazon.com/powershell/latest/reference/items/Stop-EC2Instance.html) \(AWS Tools for Windows PowerShell\)
1. To enable EBS optimization, use one of the following commands with the corresponding option:
+ [modify\-instance\-attribute](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-attribute.html) with `--ebs-optimized` \(AWS CLI\) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
369144119c09-2 | + [Edit\-EC2InstanceAttribute](https://docs.aws.amazon.com/powershell/latest/reference/items/Edit-EC2InstanceAttribute.html) with `-EbsOptimized` \(AWS Tools for Windows PowerShell\) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-optimized.md |
47580f290f90-0 | You can stop and start your instance if it has an Amazon EBS volume as its root device\. The instance retains its instance ID, but can change as described in the [Overview](#instance_stop) section\.
When you stop an instance, we shut it down\. We don't charge usage for a stopped instance, or data transfer fees, but we do charge for the storage for any Amazon EBS volumes\. Each time you start a stopped instance we charge a minimum of one minute for usage\. After one minute, we charge only for the seconds you use\. For example, if you run an instance for 20 seconds and then stop it, we charge for a full one minute\. If you run an instance for 3 minutes and 40 seconds, we charge for exactly 3 minutes and 40 seconds of usage\.
While the instance is stopped, you can treat its root volume like any other volume, and modify it \(for example, repair file system problems or update software\)\. You just detach the volume from the stopped instance, attach it to a running instance, make your changes, detach it from the running instance, and then reattach it to the stopped instance\. Make sure that you reattach it using the storage device name that's specified as the root device in the block device mapping for the instance\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
47580f290f90-1 | If you decide that you no longer need an instance, you can terminate it\. As soon as the state of an instance changes to `shutting-down` or `terminated`, we stop charging for that instance\. For more information, see [Terminate your instance](terminating-instances.md)\. If you'd rather hibernate the instance, see [Hibernate your Linux instance](Hibernate.md)\. For more information, see [Differences between reboot, stop, hibernate, and terminate](ec2-instance-lifecycle.md#lifecycle-differences)\.
**Topics**
+ [Overview](#instance_stop)
+ [What happens when you stop an instance](#what-happens-stop)
+ [Stopping and starting your instances](#starting-stopping-instances)
+ [Modifying a stopped instance](#Using_ChangingAttributesWhileInstanceStopped)
+ [Troubleshooting](#troubleshoot-instance-stop) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
649ff441ff56-0 | You can only stop an Amazon EBS\-backed instance\. To verify the root device type of your instance, describe the instance and check whether the device type of its root volume is `ebs` \(Amazon EBS\-backed instance\) or `instance store` \(instance store\-backed instance\)\. For more information, see [Determining the root device type of your AMI](ComponentsAMIs.md#display-ami-root-device-type)\.
When you stop a running instance, the following happens:
+ The instance performs a normal shutdown and stops running; its status changes to `stopping` and then `stopped`\.
+ Any Amazon EBS volumes remain attached to the instance, and their data persists\.
+ Any data stored in the RAM of the host computer or the instance store volumes of the host computer is gone\.
+ In most cases, the instance is migrated to a new underlying host computer when it's started \(though in some cases, it remains on the current host\)\.
+ The instance retains its private IPv4 addresses and any IPv6 addresses when stopped and started\. We release the public IPv4 address and assign a new one when you start it\.
+ The instance retains its associated Elastic IP addresses\. You're charged for any Elastic IP addresses associated with a stopped instance\. With EC2\-Classic, an Elastic IP address is dissociated from your instance when you stop it\. 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/Stop_Start.md |
649ff441ff56-1 | + When you stop and start a Windows instance, the EC2Config service performs tasks on the instance, such as changing the drive letters for any attached Amazon EBS volumes\. For more information about these defaults and how you can change them, see [Configuring a Windows instance using the EC2Config service](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2config-service.html) in the *Amazon EC2 User Guide for Windows Instances*\.
+ If your instance is in an Auto Scaling group, the Amazon EC2 Auto Scaling service marks the stopped instance as unhealthy, and may terminate it and launch a replacement instance\. For more information, see [Health Checks for Auto Scaling Instances](https://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html) in the *Amazon EC2 Auto Scaling User Guide*\.
+ When you stop a ClassicLink instance, it's unlinked from the VPC to which it was linked\. You must link the instance to the VPC again after starting it\. For more information about ClassicLink, see [ClassicLink](vpc-classiclink.md)\.
For more information, see [Differences between reboot, stop, hibernate, and terminate](ec2-instance-lifecycle.md#lifecycle-differences)\.
You can modify the following attributes of an instance only when it is stopped:
+ Instance type
+ User data
+ Kernel
+ RAM disk | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
649ff441ff56-2 | + Instance type
+ User data
+ Kernel
+ RAM disk
If you try to modify these attributes while the instance is running, Amazon EC2 returns the `IncorrectInstanceState` error\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
d080261144da-0 | When an EC2 instance is stopped using the `stop-instances` command, the following is registered at the OS level:
+ The API request will send a button press event to the guest\.
+ Various system services will be stopped as a result of the button press event\. **systemd** handles a graceful shutdown of the system\. Graceful shutdown is triggered by the ACPI shutdown button press event from the hypervisor\.
+ ACPI shutdown will be initiated\.
+ The instance will shut down when the graceful shutdown process exits\. There is no configurable OS shutdown time\.
+ If the instance OS does not shut down cleanly within a few minutes, a hard shutdown is performed\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
5071aff0b704-0 | You can stop and start your Amazon EBS\-backed instance using the console or the command line\.
By default, when you initiate a shutdown from an Amazon EBS\-backed instance \(using the shutdown or poweroff command\), the instance stops\. You can change this behavior so that it terminates instead\. For more information, see [Changing the instance initiated shutdown behavior](terminating-instances.md#Using_ChangingInstanceInitiatedShutdownBehavior)\.
**Important**
Using the **halt** command from an instance does not initiate a shutdown\. If used, the instance will not terminate; instead, it will place the CPU into `HLT` and the instance will remain running\.
**To stop and start an Amazon EBS\-backed instance using the console**
1. In the navigation pane, choose **Instances**, and select the instance\.
1. Choose **Actions**, **Instance State**, **Stop**\. If **Stop** is disabled, either the instance is already stopped or its root device is an instance store volume\.
**Warning**
When you stop an instance, the data on any instance store volumes is erased\. To keep data from instance store volumes, be sure to back it up to persistent storage\.
1. In the confirmation dialog box, choose **Yes, Stop**\. It can take a few minutes for the instance to stop\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
5071aff0b704-1 | 1. In the confirmation dialog box, choose **Yes, Stop**\. It can take a few minutes for the instance to stop\.
1. While your instance is stopped, you can modify certain instance attributes\. For more information, see [Modifying a stopped instance](#Using_ChangingAttributesWhileInstanceStopped)\.
1. To start the stopped instance, select the instance, and choose **Actions**, **Instance State**, **Start**\.
1. In the confirmation dialog box, choose **Yes, Start**\. It can take a few minutes for the instance to enter the `running` state\.
**To stop and start an Amazon EBS\-backed instance using the command line**
You can use one of the following commands\. For more information about these command line interfaces, see [Accessing Amazon EC2](concepts.md#access-ec2)\.
+ [stop\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/stop-instances.html) and [start\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/start-instances.html) \(AWS CLI\) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
5071aff0b704-2 | + [Stop\-EC2Instance](https://docs.aws.amazon.com/powershell/latest/reference/items/Stop-EC2Instance.html) and [Start\-EC2Instance](https://docs.aws.amazon.com/powershell/latest/reference/items/Start-EC2Instance.html) \(AWS Tools for Windows PowerShell\) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
7993dd584c4e-0 | You can change the instance type, user data, and EBS\-optimization attributes of a stopped instance using the AWS Management Console or the command line interface\. You can't use the AWS Management Console to modify the `DeleteOnTermination`, kernel, or RAM disk attributes\.
**To modify an instance attribute**
+ To change the instance type, see [Changing the instance type](ec2-instance-resize.md)\.
+ To change the user data for your instance, see [Working with instance user data](instancedata-add-user-data.md)\.
+ To enable or disable EBS–optimization for your instance, see [Modifying EBS–Optimization](ebs-optimized.md#modify-ebs-optimized-attribute)\.
+ To change the `DeleteOnTermination` attribute of the root volume for your instance, see [Updating the block device mapping of a running instance](block-device-mapping-concepts.md#update-instance-bdm)\. You are not required to stop the instance to change this attribute\.
**To modify an instance attribute using the command line**
You can use one of the following commands\. For more information about these command line interfaces, see [Accessing Amazon EC2](concepts.md#access-ec2)\.
+ [modify\-instance\-attribute](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-attribute.html) \(AWS CLI\) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
7993dd584c4e-1 | + [Edit\-EC2InstanceAttribute](https://docs.aws.amazon.com/powershell/latest/reference/items/Edit-EC2InstanceAttribute.html) \(AWS Tools for Windows PowerShell\) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
a9e346de4296-0 | If you have stopped your Amazon EBS\-backed instance and it appears "stuck" in the `stopping` state, you can forcibly stop it\. For more information, see [Troubleshooting stopping your instance](TroubleshootingInstancesStopping.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/Stop_Start.md |
6c21c457c34a-0 | You can access instance metadata from a running instance using one of the following methods:
+ Instance Metadata Service Version 1 \(IMDSv1\) – a request/response method
+ Instance Metadata Service Version 2 \(IMDSv2\) – a session\-oriented method
By default, you can use either IMDSv1 or IMDSv2, or both\. The instance metadata service distinguishes between IMDSv1 and IMDSv2 requests based on whether, for any given request, either the `PUT` or `GET` headers, which are unique to IMDSv2, are present in that request\.
You can configure the instance metadata service on each instance such that local code or users must use IMDSv2\. When you specify that IMDSv2 must be used, IMDSv1 no longer works\. For more information, see [Configuring the instance metadata options](#configuring-instance-metadata-options)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
274c0eaa14d3-0 | IMDSv2 uses session\-oriented requests\. With session\-oriented requests, you create a session token that defines the session duration, which can be a minimum of one second and a maximum of six hours\. During the specified duration, you can use the same session token for subsequent requests\. After the specified duration expires, you must create a new session token to use for future requests\.
The following example uses a Linux shell script and IMDSv2 to retrieve the top\-level instance metadata items\. The example command:
+ Creates a session token lasting six hours \(21,600 seconds\) using the `PUT` request
+ Stores the session token header in a variable named `TOKEN`
+ Requests the top\-level metadata items using the token
```
[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/
```
After you've created a token, you can reuse it until it expires\. In the following example command, which gets the ID of the AMI used to launch the instance, the token that is stored in `$TOKEN` in the previous example is reused\.
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
274c0eaa14d3-1 | ```
[ec2-user ~]$ curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/ami-id
```
When you use IMDSv2 to request instance metadata, the request must include the following:
1. Use a `PUT` request to initiate a session to the instance metadata service\. The `PUT` request returns a token that must be included in subsequent `GET` requests to the instance metadata service\. The token is required to access metadata using IMDSv2\.
1. Include the token in all `GET` requests to the instance metadata service\. When token usage is set to `required`, requests without a valid token or with an expired token receive a `401 - Unauthorized` HTTP error code\. For information about changing the token usage requirement, see [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) in the *AWS CLI Command Reference*\.
+ The token is an instance\-specific key\. The token is not valid on other EC2 instances and will be rejected if you attempt to use it outside of the instance on which it was generated\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
274c0eaa14d3-2 | + The `PUT` request must include a header that specifies the time to live \(TTL\) for the token, in seconds, up to a maximum of six hours \(21,600 seconds\)\. The token represents a logical session\. The TTL specifies the length of time that the token is valid and, therefore, the duration of the session\.
+ After a token expires, to continue accessing instance metadata, you must create a new session using another `PUT`\.
+ You can choose to reuse a token or create a new token with every request\. For a small number of requests, it might be easier to generate and immediately use a token each time you need to access the instance metadata service\. But for efficiency, you can specify a longer duration for the token and reuse it rather than having to write a `PUT` request every time you need to request instance metadata\. There is no practical limit on the number of concurrent tokens, each representing its own session\. IMDSv2 is, however, still constrained by normal instance metadata service connection and throttling limits\. For more information, see [Throttling](instancedata-data-retrieval.md#instancedata-throttling)\.
HTTP `GET` and `HEAD` methods are allowed in IMDSv2 instance metadata requests\. `PUT` requests are rejected if they contain an X\-Forwarded\-For header\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
274c0eaa14d3-3 | By default, the response to `PUT` requests has a response hop limit \(time to live\) of `1` at the IP protocol level\. You can adjust the hop limit using the `modify-instance-metadata-options` command if you need to make it larger\. For example, you might need a larger hop limit for backward compatibility with container services running on the instance\. For more information, see [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) in the *AWS CLI Command Reference*\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
3a45e706be44-0 | Use of Instance Metadata Service Version 2 \(IMDSv2\) is optional\. Instance Metadata Service Version 1 \(IMDSv1\) will continue to be supported indefinitely\. If you choose to migrate to using IMDSv2, we recommend that you use the following tools and transition path\.
**Tools for helping with the transition to IMDSv2**
If your software uses IMDSv1, use the following tools to help reconfigure your software to use IMDSv2\.
+ **AWS software:** The latest versions of the AWS SDKs and CLIs support IMDSv2\. To use IMDSv2, make sure that your EC2 instances have the latest versions of the AWS SDKs and CLIs\. For information about updating the CLI, see [Upgrading to the latest version of the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-awscli-upgrade) in the *AWS Command Line Interface User Guide*\.
+ **CloudWatch**: IMDSv2 uses token\-backed sessions, while IMDSv1 does not\. The `MetadataNoToken` CloudWatch metric tracks the number of calls to the instance metadata service that are using IMDSv1\. By tracking this metric to zero, you can determine if and when all of your software has been upgraded to use IMDSv2\. For more information, see [Instance metrics](viewing_metrics_with_cloudwatch.md#ec2-cloudwatch-metrics)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
3a45e706be44-1 | + **Updates to EC2 APIs and CLIs**: For existing instances, you can use the [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) CLI command \(or the [ModifyInstanceMetadataOptions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceMetadataOptions.html) API\) to require the use of IMDSv2\. For new instances, you can use the [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) CLI command \(or the [RunInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) API\) and the `metadata-options` parameter to launch new instances that require the use of IMDSv2\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
3a45e706be44-2 | To require the use of IMDSv2 on all new instances launched by Auto Scaling groups, your Auto Scaling groups can use either a launch template or a launch configuration\. When you [create a launch template](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-launch-template.html) or [create a launch configuration](https://docs.aws.amazon.com/cli/latest/reference/autoscaling/create-launch-configuration.html), you must configure the `MetadataOptions` parameters to require the use IMDSv2\. After you configure the launch template or launch configuration, the Auto Scaling group launches new instances using the new launch template or launch configuration, but existing instances are not affected\.
Use the [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) CLI command \(or the [ModifyInstanceMetadataOptions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceMetadataOptions.html) API\) to require the use of IMDSv2 on the existing instances, or terminate the instances and the Auto Scaling group will launch new replacement instances with the instance metadata options settings that are defined in the launch template or launch configuration\.
For Auto Scaling groups that use launch configurations, you can [replace the launch configurations with launch templates](https://docs.aws.amazon.com/autoscaling/ec2/userguide/replace-launch-config.html)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
3a45e706be44-3 | + **IAM policies and SCPs**: You can use an IAM condition to enforce that IAM users can't launch an instance unless it uses IMDSv2\. You can also use IAM conditions to enforce that IAM users can't modify running instances to re\-enable IMDSv1, and to enforce that the instance metadata service is available on the instance\.
The `ec2:MetadataHttpTokens`, `ec2:MetadataHttpPutResponseHopLimit`, and `ec2:MetadataHttpEndpoint` IAM condition keys can be used to control the use of the [RunInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) and the [ModifyInstanceMetadataOptions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceMetadataOptions.html) API and corresponding CLI\. If a policy is created, and a parameter in the API call does not match the state specified in the policy using the condition key, the API or CLI call fails with an `UnauthorizedOperation` response\. These condition keys can be used either in IAM policies or AWS Organizations service control policies \(SCPs\)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
3a45e706be44-4 | Furthermore, you can choose an additional layer of protection to enforce the change from IMDSv1 to IMDSv2\. At the access management layer with respect to the APIs called via EC2 Role credentials, you can use a new condition key in either IAM policies or AWS Organizations service control policies \(SCPs\)\. Specifically, by using the policy condition key `ec2:RoleDelivery` with a value of `2.0` in your IAM policies, API calls made with EC2 Role credentials obtained from IMDSv1 will receive an `UnauthorizedOperation` response\. The same thing can be achieved more broadly with that condition required by an SCP\. This ensures that credentials delivered via IMDSv1 cannot actually be used to call APIs because any API calls not matching the specified condition will receive an `UnauthorizedOperation` error\. For example IAM policies, see [Working with instance metadata](ExamplePolicies_EC2.md#iam-example-instance-metadata)\. For more information, see [Service Control Policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) in the *AWS Organizations User Guide*\.
**Recommended path to requiring IMDSv2 access**
Using the above tools, we recommend that you follow this path for transitioning to IMDSv2: | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
6698aaa59abb-0 | Update the SDKs, CLIs, and your software that use Role credentials on their EC2 instances to IMDSv2\-compatible versions\. For information about updating the CLI, see [Upgrading to the latest version of the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-awscli-upgrade) in the *AWS Command Line Interface User Guide*\.
Then, change your software that directly accesses instance metadata \(in other words, that does not use an SDK\) using the IMDSv2 requests\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
24675b3d5ebe-0 | Track your transition progress by using the CloudWatch metric `MetadataNoToken`\. This metric shows the number of calls to the instance metadata service that are using IMDSv1 on your instances\. For more information, see [Instance metrics](viewing_metrics_with_cloudwatch.md#ec2-cloudwatch-metrics)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
95aec8eb5c44-0 | Everything is ready on all instances when the CloudWatch metric `MetadataNoToken` records zero IMDSv1 usage\. At this stage, you can do the following:
+ For existing instances: You can require IMDSv2 use through the [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) command\. You can make these changes on running instances; you do not need to restart your instances\.
+ For new instances: When launching a new instance, you can use the [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) command to specify that only IMDSv2 is to be used\.
Specifying instance metadata options is available only through the API or AWS CLI; it is currently not available via the AWS Management Console\. For more information, see [Configuring the instance metadata options](#configuring-instance-metadata-options)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
984a2349a9c9-0 | The `ec2:MetadataHttpTokens`, `ec2:MetadataHttpPutResponseHopLimit`, and `ec2:MetadataHttpEndpoint` IAM condition keys can be used to control the use of the [RunInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) and the [ModifyInstanceMetadataOptions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceMetadataOptions.html) API and corresponding CLI\. If a policy is created, and a parameter in the API call does not match the state specified in the policy using the condition key, the API or CLI | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
984a2349a9c9-1 | using the condition key, the API or CLI call fails with an `UnauthorizedOperation` response\. For example IAM policies, see [Working with instance metadata](ExamplePolicies_EC2.md#iam-example-instance-metadata)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
b2c221e36c51-0 | Instance metadata options allow you to configure new or existing instances to do the following:
+ Require the use of IMDSv2 when requesting instance metadata
+ Specify the `PUT` response hop limit
+ Turn off access to instance metadata
You can also use IAM condition keys in an IAM policy or SCP to do the following:
+ Allow an instance to launch only if it's configured to require the use of IMDSv2
+ Restrict the number of allowed hops
+ Turn off access to instance metadata
To configure the instance metadata options on new or existing instances, you use the AWS SDK or CLI\. For more information, see [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) and [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) in the *AWS CLI Command Reference*\.
**Note**
You should proceed cautiously and conduct careful testing before making any changes\. Take note of the following:
If you enforce the use of IMDSv2, applications or agents that use IMDSv1 for instance metadata access will break\.
If you turn off all access to instance metadata, applications or agents that rely on instance metadata access to function will break\.
**Topics** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
b2c221e36c51-1 | If you turn off all access to instance metadata, applications or agents that rely on instance metadata access to function will break\.
**Topics**
+ [Configuring instance metadata options for new instances](#configuring-IMDS-new-instances)
+ [Configuring instance metadata options for existing instances](#configuring-IMDS-existing-instances) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
f1b4c6358b36-0 | You can require the use IMDSv2 on an instance when you launch it\. You can also create an IAM policy that prevents users from launching new instances unless they require IMDSv2 on the new instance\.
**To require the use of IMDSv2 on a new instance**
The following [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) example launches a `c3.large` instance with `--metadata-options` set to `HttpTokens=required`\. When you specify a value for `HttpTokens`, you must also set `HttpEndpoint` to `enabled`\. Because the secure token header is set to `required` for metadata retrieval requests, this opts in the instance to require using IMDSv2 when requesting instance metadata\.
```
aws ec2 run-instances
--image-id ami-0abcdef1234567890
--instance-type c3.large
...
--metadata-options "HttpEndpoint=enabled,HttpTokens=required"
```
**To enforce the use of IMDSv2 on all new instances**
To ensure that IAM users can only launch instances that require the use of IMDSv2 when requesting instance metadata, you can specify that the condition to require IMDSv2 must be met before an instance can be launched\. For the example IAM policy, see [Working with instance metadata](ExamplePolicies_EC2.md#iam-example-instance-metadata)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
f1b4c6358b36-1 | **To turn off access to instance metadata**
To ensure that access to your instance metadata is turned off, regardless of which version of the instance metadata service you are using, launch the instance with `--metadata-options` set to `HttpEndpoint=disabled`\. You can turn on access later on using the [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/modify-instance-metadata-options.html) command\.
```
aws ec2 run-instances
--image-id ami-0abcdef1234567890
--instance-type c3.large
...
--metadata-options "HttpEndpoint=disabled"
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
e380deb107e5-0 | You can require the use IMDSv2 on an existing instance\. You can also change the PUT response hop limit and turn off access to instance metadata on an existing instance\. You can also create an IAM policy that prevents users from modifying the instance metadata options on an existing instance\.
**To require the use of IMDSv2**
You can opt in to require that IMDSv2 is used when requesting instance metadata\. Use the [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) CLI command and set the `http-tokens` parameter to `required`\. When you specify a value for `http-tokens`, you must also set `http-endpoint` to `enabled`\.
```
aws ec2 modify-instance-metadata-options \
--instance-id i-1234567898abcdef0 \
--http-tokens required \
--http-endpoint enabled
```
**To change the PUT response hop limit** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
e380deb107e5-1 | --http-endpoint enabled
```
**To change the PUT response hop limit**
For existing instances, you can change the settings of the `PUT` response hop limit\. Use the [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) CLI command and set the `http-put-response-hop-limit` parameter to the required number of hops\. In the following example, the hop limit is set to `3`\. Note that when specifying a value for `http-put-response-hop-limit`, you must also set `http-endpoint` to `enabled`\.
```
aws ec2 modify-instance-metadata-options \
--instance-id i-1234567898abcdef0 \
--http-put-response-hop-limit 3 \
--http-endpoint enabled
```
**To restore the use of IMDSv1 on an instance using IMDSv2**
You can use the [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) CLI command with `http-tokens` set to `optional` to restore the use of IMDSv1 when requesting instance metadata\.
```
aws ec2 modify-instance-metadata-options \ | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
e380deb107e5-2 | ```
aws ec2 modify-instance-metadata-options \
--instance-id i-1234567898abcdef0 \
--http-tokens optional \
--http-endpoint enabled
```
**To turn off access to instance metadata**
You can turn off access to your instance metadata by disabling the HTTP endpoint of the instance metadata service, regardless of which version of the instance metadata service you are using\. You can reverse this change at any time by enabling the HTTP endpoint\. Use the [modify\-instance\-metadata\-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) CLI command and set the `http-endpoint` parameter to `disabled`\.
```
aws ec2 modify-instance-metadata-options \
--instance-id i-1234567898abcdef0 \
--http-endpoint disabled
```
**To control the use of modify\-instance\-metadata\-options** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
e380deb107e5-3 | --http-endpoint disabled
```
**To control the use of modify\-instance\-metadata\-options**
To control which IAM users can modify the instance metadata options, specify a policy that prevents all users other than users with a specified role to use the [ModifyInstanceMetadataOptions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceMetadataOptions.html) API\. For the example IAM policy, see [Working with instance metadata](ExamplePolicies_EC2.md#iam-example-instance-metadata)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/configuring-instance-metadata-service.md |
192f5bf2e293-0 | You are not billed for any instance usage while an instance is not in the `running` state\. In other words, when you terminate an instance, you stop incurring charges for that instance as soon as its state changes to `shutting-down`\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesShuttingDown.md |
0995135e0b93-0 | If your instance remains in the `shutting-down` state longer than a few minutes, it might be delayed due to shutdown scripts being run by the instance\.
Another possible cause is a problem with the underlying host computer\. If your instance remains in the `shutting-down` state for several hours, Amazon EC2 treats it as a stuck instance and forcibly terminates it\.
If it appears that your instance is stuck terminating and it has been longer than several hours, post a request for help to the [Amazon EC2 forum](https://forums.aws.amazon.com/forum.jspa?forumID=30)\. To help expedite a resolution, include the instance ID and describe the steps that you've already taken\. Alternatively, if you have a support plan, create a technical support case in the [Support Center](https://console.aws.amazon.com/support/home#/)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesShuttingDown.md |
44c4b4eb85a0-0 | After you terminate an instance, it remains visible for a short while before being deleted\. The state shows as `terminated`\. If the entry is not deleted after several hours, contact Support\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesShuttingDown.md |
acbcc47d0cc5-0 | Generally, the following behaviors mean that you've used Amazon EC2 Auto Scaling or EC2 Fleet to scale your computing resources automatically based on criteria that you've defined:
+ You terminate an instance and a new instance launches automatically\.
+ You launch an instance and one of your instances terminates automatically\.
+ You stop an instance and it terminates and a new instance launches automatically\.
To stop automatic scaling, see the [Amazon EC2 Auto Scaling User Guide](https://docs.aws.amazon.com/autoscaling/latest/userguide/) or [Launching instances using an EC2 Fleet](ec2-fleet.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesShuttingDown.md |
2f62080077c4-0 | Scheduled Reserved Instances \(Scheduled Instances\) enable you to purchase capacity reservations that recur on a daily, weekly, or monthly basis, with a specified start time and duration, for a one\-year term\. You reserve the capacity in advance, so that you know it is available when you need it\. You pay for the time that the instances are scheduled, even if you do not use them\.
Scheduled Instances are a good choice for workloads that do not run continuously, but do run on a regular schedule\. For example, you can use Scheduled Instances for an application that runs during business hours or for batch processing that runs at the end of the week\.
If you require a capacity reservation on a continuous basis, Reserved Instances might meet your needs and decrease costs\. For more information, see [Reserved Instances](ec2-reserved-instances.md)\. If you are flexible about when your instances run, Spot Instances might meet your needs and decrease costs\. For more information, see [Spot Instances](using-spot-instances.md)\.
**Topics**
+ [How Scheduled Instances work](#how-scheduled-instances-work)
+ [Service\-linked roles for Scheduled Instances](#service-linked-roles-scheduled-instances)
+ [Purchasing a Scheduled Instance](#purchasing-scheduled-instances)
+ [Launching a Scheduled Instance](#launching-scheduled-instances)
+ [Scheduled Instance limits](#scheduled-instances-limits) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-scheduled-instances.md |
c8a1359decae-0 | Amazon EC2 sets aside pools of EC2 instances in each Availability Zone for use as Scheduled Instances\. Each pool supports a specific combination of instance type, operating system, and network\.
To get started, you must search for an available schedule\. You can search across multiple pools or a single pool\. After you locate a suitable schedule, purchase it\.
You must launch your Scheduled Instances during their scheduled time periods, using a launch configuration that matches the following attributes of the schedule that you purchased: instance type, Availability Zone, network, and platform\. When you do so, Amazon EC2 launches EC2 instances on your behalf, based on the specified launch specification\. Amazon EC2 must ensure that the EC2 instances have terminated by the end of the current scheduled time period so that the capacity is available for any other Scheduled Instances it is reserved for\. Therefore, Amazon EC2 terminates the EC2 instances three minutes before the end of the current scheduled time period\.
You can't stop or reboot Scheduled Instances, but you can terminate them manually as needed\. If you terminate a Scheduled Instance before its current scheduled time period ends, you can launch it again after a few minutes\. Otherwise, you must wait until the next scheduled time period\.
The following diagram illustrates the lifecycle of a Scheduled Instance\.
![\[The Scheduled Instance lifecycle\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/images/Scheduled_instances_lifecycle.png) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-scheduled-instances.md |
770ff1724efe-0 | Amazon EC2 creates a service\-linked role when you purchase a Scheduled Instance\. A service\-linked role includes all the permissions that Amazon EC2 requires to call other AWS services on your behalf\. For more information, see [Using Service\-Linked Roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) in the *IAM User Guide*\.
Amazon EC2 uses the service\-linked role named **AWSServiceRoleForEC2ScheduledInstances** to complete the following actions:
+ `ec2:TerminateInstances` \- Terminate Scheduled Instances after their schedules complete
+ `ec2:CreateTags` \- Add system tags to Scheduled Instances
If you purchased Scheduled Instances before October 2017, when Amazon EC2 began supporting this service\-linked role, Amazon EC2 created the **AWSServiceRoleForEC2ScheduledInstances** role in your AWS account\. For more information, see [A New Role Appeared in My Account](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_roles.html#troubleshoot_roles_new-role-appeared) in the *IAM User Guide*\.
If you no longer need to use Scheduled Instances, we recommend that you delete the **AWSServiceRoleForEC2ScheduledInstances** role\. After this role is deleted from your account, Amazon EC2 will create the role again if you purchase Scheduled Instances\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-scheduled-instances.md |
f4df48ad5c40-0 | To purchase a Scheduled Instance, you can use the Scheduled Reserved Instances Reservation Wizard\.
**Warning**
After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase\.
**To purchase a Scheduled Instance \(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, under **INSTANCES**, choose **Scheduled Instances**\. If the currently selected Region does not support Scheduled Instances, the page is unavailable\. [Learn more](#scheduled-instances-limits)
1. Choose **Purchase Scheduled Instances**\.
1. On the **Find available schedules** page, do the following:
1. Under **Create a schedule**, select the starting date from **Starting on**, the schedule recurrence \(daily, weekly, or monthly\) from **Recurring**, and the minimum duration from **for duration**\. Note that the console ensures that you specify a value for the minimum duration that meets the minimum required utilization for your Scheduled Instance \(1,200 hours per year\)\.
![\[The schedule for a Scheduled Instance\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/images/scheduled_instances_create_schedule.png) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-scheduled-instances.md |
f4df48ad5c40-1 | 1. Under **Instance details**, select the operating system and network from **Platform**\. To narrow the results, select one or more instance types from **Instance type** or one or more Availability Zones from **Availability Zone**\.
![\[Instance details for a Scheduled Instance\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/images/scheduled_instances_details.png)
1. Choose **Find schedules**\.
1. Under **Available schedules**, select one or more schedules\. For each schedule that you select, set the quantity of instances and choose **Add to Cart**\.
1. Your cart is displayed at the bottom of the page\. When you are finished adding and removing schedules from your cart, choose **Review and purchase**\.
1. On the **Review and purchase** page, verify your selections and edit them as needed\. When you are finished, choose **Purchase**\.
**To purchase a Scheduled Instance \(AWS CLI\)**
Use the [describe\-scheduled\-instance\-availability](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-scheduled-instance-availability.html) command to list the available schedules that meet your needs, and then use the [purchase\-scheduled\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/purchase-scheduled-instances.html) command to complete the purchase\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-scheduled-instances.md |
540b4f4096a8-0 | After you purchase a Scheduled Instance, it is available for you to launch during its scheduled time periods\.
**To launch a Scheduled Instance \(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, under **INSTANCES**, choose **Scheduled Instances**\. If the currently selected Region does not support Scheduled Instances, the page is unavailable\. [Learn more](#scheduled-instances-limits)
1. Select the Scheduled Instance and choose **Launch Scheduled Instances**\.
1. On the **Configure** page, complete the launch specification for your Scheduled Instances and choose **Review**\.
**Important**
The launch specification must match the instance type, Availability Zone, network, and platform of the schedule that you purchased\.
1. On the **Review** page, verify the launch configuration and modify it as needed\. When you are finished, choose **Launch**\.
**To launch a Scheduled Instance \(AWS CLI\)** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-scheduled-instances.md |
540b4f4096a8-1 | **To launch a Scheduled Instance \(AWS CLI\)**
Use the [describe\-scheduled\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-scheduled-instances.html) command to list your Scheduled Instances, and then use the [run\-scheduled\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-scheduled-instances.html) command to launch each Scheduled Instance during its scheduled time periods\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-scheduled-instances.md |
1322cd1866ce-0 | Scheduled Instances are subject to the following limits:
+ The following are the only supported instance types: C3, C4, M4, and R3\.
+ The required term is 365 days \(one year\)\.
+ The minimum required utilization is 1,200 hours per year\.
+ You can purchase a Scheduled Instance up to three months in advance\.
+ They are available in the following Regions: US East \(N\. Virginia\), US West \(Oregon\), and Europe \(Ireland\)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-scheduled-instances.md |
fe9036615712-0 | The following information can help you troubleshoot issues with connecting to your instance\. For additional help with Windows instances, see [Troubleshooting Windows Instances](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/troubleshooting-windows-instances.html) in the *Amazon EC2 User Guide for Windows Instances*\.
**Topics**
+ [Common causes for connection issues](#TroubleshootingInstancesCommonCauses)
+ [Error connecting to your instance: Connection timed out](#TroubleshootingInstancesConnectionTimeout)
+ [Error: unable to load key … Expecting: ANY PRIVATE KEY](#troubleshoot-instance-connect-key-file)
+ [Error: User key not recognized by server](#TroubleshootingInstancesServerError)
+ [Error: Permission denied or connection closed by \[instance\] port 22](#TroubleshootingInstancesConnectingSSH)
+ [Error: Unprotected private key file](#troubleshoot-unprotected-key)
+ [Error: Private key must begin with "\-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\-" and end with "\-\-\-\-\-END RSA PRIVATE KEY\-\-\-\-\-"](#troubleshoot-private-key-file-format)
+ [Error: Server refused our key *or* No supported authentication methods available](#TroubleshootingInstancesConnectingPuTTY) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
fe9036615712-1 | + [Error: Server refused our key *or* No supported authentication methods available](#TroubleshootingInstancesConnectingPuTTY)
+ [Cannot ping instance](#troubleshoot-instance-ping)
+ [Error: Server unexpectedly closed network connection](#troubleshoot-ssh) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
acd32253061e-0 | We recommend that you begin troubleshooting by checking some common causes for issues connecting to your instance\.
**Verify the user name for your instance**
You can connect to your instance using the user name for your user account or the default user name for the AMI that you used to launch your instance\.
+ **Get the user name for your user account\.**
For more information about how to create a user account, see [Managing user accounts on your Amazon Linux instance](managing-users.md)\.
+ **Get the default user name for the AMI that you used to launch your instance:**
+ For Amazon Linux 2 or the Amazon Linux AMI, the user name is `ec2-user`\.
+ For a CentOS AMI, the user name is `centos`\.
+ For a Debian AMI, the user name is `admin`\.
+ For a Fedora AMI, the user name is `ec2-user` or `fedora`\.
+ For a RHEL AMI, the user name is `ec2-user` or `root`\.
+ For a SUSE AMI, the user name is `ec2-user` or `root`\.
+ For an Ubuntu AMI, the user name is `ubuntu`\.
+ Otherwise, if `ec2-user` and `root` don't work, check with the AMI provider\.
**Verify that your security group rules allow traffic** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
acd32253061e-1 | **Verify that your security group rules allow traffic**
Make sure your security group rules allow inbound traffic from your public IPv4 address on the proper port\. For steps to verify, see [Error connecting to your instance: Connection timed out](#TroubleshootingInstancesConnectionTimeout)
**Verify that your instance is ready**
After you launch an instance, it can take a few minutes for the instance to be ready so that you can connect to it\. Check your instance to make sure it is running and has passed its status checks\.
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**, and then select your instance\.
1. Verify that your **Instance State** is running and your **Status Checks** have passed\.
**Verify the general prerequisites for connecting to your instance**
For more information, see [General prerequisites for connecting to your instance](connection-prereqs.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
b5849e183cf6-0 | If you try to connect to your instance and get an error message `Network error: Connection timed out` or `Error connecting to [instance], reason: -> Connection timed out: connect`, try the following:
+ Check your security group rules\. You need a security group rule that allows inbound traffic from your public IPv4 address on the proper port\.
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**, and then select your instance\.
1. In the **Description** tab at the bottom of the console page, next to **Security groups**, select **view inbound rules** to display the list of rules that are in effect for the selected instance\.
1. For Linux instances: When you select **view inbound rules**, a window will appear that displays the port\(s\) to which traffic is allowed\. Verify that there is a rule that allows traffic from your computer to port 22 \(SSH\)\.
For Windows instances: When you select **view inbound rules**, a window will appear that displays the port\(s\) to which traffic is allowed\. Verify that there is a rule that allows traffic from your computer to port 3389 \(RDP\)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
b5849e183cf6-1 | Each time you restart your instance, a new IP address \(and host name\) will be assigned\. If your security group has a rule that allows inbound traffic from a single IP address, this address may not be static if your computer is on a corporate network or if you are connecting through an internet service provider \(ISP\)\. Instead, specify the range of IP addresses used by client computers\. If your security group does not have a rule that allows inbound traffic as described in the previous step, add a rule to your security group\. For more information, see [Authorizing Network Access to Your Instances](authorizing-access-to-an-instance.md)\.
For more information about Security Group rules, see [Security Group Rules](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#SecurityGroupRules) in the *Amazon VPC User Guide*\.
+ Check the route table for the subnet\. You need a route that sends all traffic destined outside the VPC to the internet gateway for the VPC\.
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**, and then select your instance\.
1. In the **Description** tab, write down the values of **VPC ID** and **Subnet ID**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
b5849e183cf6-2 | 1. In the **Description** tab, write down the values of **VPC ID** and **Subnet ID**\.
1. Open the Amazon VPC console at [https://console\.aws\.amazon\.com/vpc/](https://console.aws.amazon.com/vpc/)\.
1. In the navigation pane, choose **Internet Gateways**\. Verify that there is an internet gateway attached to your VPC\. Otherwise, choose **Create Internet Gateway** to create an internet gateway\. Select the internet gateway, and then choose **Attach to VPC** and follow the directions to attach it to your VPC\.
1. In the navigation pane, choose **Subnets**, and then select your subnet\.
1. On the **Route Table** tab, verify that there is a route with `0.0.0.0/0` as the destination and the internet gateway for your VPC as the target\. If you're connecting to your instance using its IPv6 address, verify that there is a route for all IPv6 traffic \(`::/0`\) that points to the internet gateway\. Otherwise, do the following:
1. Choose the ID of the route table \(rtb\-*xxxxxxxx*\) to navigate to the route table\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
b5849e183cf6-3 | 1. Choose the ID of the route table \(rtb\-*xxxxxxxx*\) to navigate to the route table\.
1. On the **Routes** tab, choose **Edit routes**\. Choose **Add route**, use `0.0.0.0/0` as the destination and the internet gateway as the target\. For IPv6, choose **Add route**, use `::/0` as the destination and the internet gateway as the target\.
1. Choose **Save routes**\.
+ Check the network access control list \(ACL\) for the subnet\. The network ACLs must allow inbound and outbound traffic from your local IP address on the proper port\. The default network ACL allows all inbound and outbound traffic\.
1. Open the Amazon VPC console at [https://console\.aws\.amazon\.com/vpc/](https://console.aws.amazon.com/vpc/)\.
1. In the navigation pane, choose **Subnets** and select your subnet\.
1. On the **Description** tab, find **Network ACL**, and choose its ID \(acl\-*xxxxxxxx*\)\.
1. Select the network ACL\. For **Inbound Rules**, verify that the rules allow traffic from your computer\. Otherwise, delete or modify the rule that is blocking traffic from your computer\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
b5849e183cf6-4 | 1. For **Outbound Rules**, verify that the rules allow traffic to your computer\. Otherwise, delete or modify the rule that is blocking traffic to your computer\.
+ If your computer is on a corporate network, ask your network administrator whether the internal firewall allows inbound and outbound traffic from your computer on port 22 \(for Linux instances\) or port 3389 \(for Windows instances\)\.
If you have a firewall on your computer, verify that it allows inbound and outbound traffic from your computer on port 22 \(for Linux instances\) or port 3389 \(for Windows instances\)\.
+ Check that your instance has a public IPv4 address\. If not, you can associate an Elastic IP address with your instance\. For more information, see [Elastic IP addresses](elastic-ip-addresses-eip.md)\.
+ Check the CPU load on your instance; the server may be overloaded\. AWS automatically provides data such as Amazon CloudWatch metrics and instance status, which you can use to see how much CPU load is on your instance and, if necessary, adjust how your loads are handled\. For more information, see [Monitoring your instances using CloudWatch](using-cloudwatch.md)\.
+ If your load is variable, you can automatically scale your instances up or down using [Auto Scaling](https://aws.amazon.com/autoscaling/) and [Elastic Load Balancing](https://aws.amazon.com/elasticloadbalancing/)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
b5849e183cf6-5 | + If your load is steadily growing, you can move to a larger instance type\. For more information, see [Changing the instance type](ec2-instance-resize.md)\.
To connect to your instance using an IPv6 address, check the following:
+ Your subnet must be associated with a route table that has a route for IPv6 traffic \(`::/0`\) to an internet gateway\.
+ Your security group rules must allow inbound traffic from your local IPv6 address on the proper port \(22 for Linux and 3389 for Windows\)\.
+ Your network ACL rules must allow inbound and outbound IPv6 traffic\.
+ If you launched your instance from an older AMI, it may not be configured for DHCPv6 \(IPv6 addresses are not automatically recognized on the network interface\)\. For more information, see [Configure IPv6 on Your Instances](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-migrate-ipv6.html#vpc-migrate-ipv6-dhcpv6) in the *Amazon VPC User Guide*\.
+ Your local computer must have an IPv6 address, and must be configured to use IPv6\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
ac7d714385d7-0 | If you try to connect to your instance and get the error message, `unable to load key ... Expecting: ANY PRIVATE KEY`, the file in which the private key is stored is incorrectly configured\. If the private key file ends in `.pem`, it might still be incorrectly configured\. A possible cause for an incorrectly configured private key file is a missing certificate\.
**If the private key file is incorrectly configured, follow these steps to resolve the error**
1. Create a new key pair\. For more information, see [Option 1: Create a key pair using Amazon EC2](ec2-key-pairs.md#having-ec2-create-your-key-pair)\.
1. Add the new key pair to your instance\. For more information, see [Connecting to your Linux instance if you lose your private key](replacing-lost-key-pair.md)\.
1. Connect to your instance using the new key pair\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
44620c5f13a4-0 | **If you use SSH to connect to your instance**
+ Use `ssh -vvv` to get triple verbose debugging information while connecting:
```
ssh -vvv -i path/my-key-pair.pem [email protected]
```
The following sample output demonstrates what you might see if you were trying to connect to your instance with a key that was not recognized by the server:
```
open/ANT/myusername/.ssh/known_hosts).
debug2: bits set: 504/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
44620c5f13a4-1 | debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: boguspem.pem ((nil))
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: boguspem.pem
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA 9c:4c:bc:0c:d0:5c:c7:92:6c:8e:9b:16:e4:43:d8:b2
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
44620c5f13a4-2 | debug1: No more authentication methods to try.
Permission denied (publickey).
```
**If you use PuTTY to connect to your instance**
+ Verify that your private key \(\.pem\) file has been converted to the format recognized by PuTTY \(\.ppk\)\. For more information about converting your private key, see [Connecting to your Linux instance from Windows using PuTTY](putty.md)\.
**Note**
In PuTTYgen, load your private key file and select **Save Private Key** rather than **Generate**\.
+ Verify that you are connecting with the appropriate user name for your AMI\. Enter the user name in the **Host name** box in the **PuTTY Configuration** window\.
+ For Amazon Linux 2 or the Amazon Linux AMI, the user name is `ec2-user`\.
+ For a CentOS AMI, the user name is `centos`\.
+ For a Debian AMI, the user name is `admin`\.
+ For a Fedora AMI, the user name is `ec2-user` or `fedora`\.
+ For a RHEL AMI, the user name is `ec2-user` or `root`\.
+ For a SUSE AMI, the user name is `ec2-user` or `root`\.
+ For an Ubuntu AMI, the user name is `ubuntu`\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
44620c5f13a4-3 | + For an Ubuntu AMI, the user name is `ubuntu`\.
+ Otherwise, if `ec2-user` and `root` don't work, check with the AMI provider\.
+ Verify that you have an inbound security group rule to allow inbound traffic to the appropriate port\. For more information, see [Authorizing Network Access to Your Instances](authorizing-access-to-an-instance.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
3811c76583e2-0 | If you connect to your instance using SSH and get any of the following errors, `Host key not found in [directory]`, `Permission denied (publickey)`, `Authentication failed, permission denied`, or `Connection closed by [instance] port 22`, verify that you are connecting with the appropriate user name for your AMI *and* that you have specified the proper private key \(`.pem)` file for your instance\.
The appropriate user names are as follows:
+ For Amazon Linux 2 or the Amazon Linux AMI, the user name is `ec2-user`\.
+ For a CentOS AMI, the user name is `centos`\.
+ For a Debian AMI, the user name is `admin`\.
+ For a Fedora AMI, the user name is `ec2-user` or `fedora`\.
+ For a RHEL AMI, the user name is `ec2-user` or `root`\.
+ For a SUSE AMI, the user name is `ec2-user` or `root`\.
+ For an Ubuntu AMI, the user name is `ubuntu`\.
+ Otherwise, if `ec2-user` and `root` don't work, check with the AMI provider\.
For example, to use an SSH client to connect to an Amazon Linux instance, use the following command:
```
ssh -i /path/my-key-pair.pem [email protected] | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
3811c76583e2-1 | ```
Confirm that you are using the private key file that corresponds to the key pair that you selected when you launched the instance\.
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. Select your instance\. In the **Description** tab, verify the value of **Key pair name**\.
1. If you did not specify a key pair when you launched the instance, you can terminate the instance and launch a new instance, ensuring that you specify a key pair\. If this is an instance that you have been using but you no longer have the `.pem` file for your key pair, you can replace the key pair with a new one\. For more information, see [Connecting to your Linux instance if you lose your private key](replacing-lost-key-pair.md)\.
If you generated your own key pair, ensure that your key generator is set up to create RSA keys\. DSA keys are not accepted\.
If you get a `Permission denied (publickey)` error and none of the above applies \(for example, you were able to connect previously\), the permissions on the home directory of your instance may have been changed\. Permissions for `/home/my-instance-user-name/.ssh/authorized_keys` must be limited to the owner only\.
**To verify the permissions on your instance** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
3811c76583e2-2 | **To verify the permissions on your instance**
1. Stop your instance and detach the root volume\. For more information, see [Stop and start your instance](Stop_Start.md) and [Detaching an Amazon EBS volume from a Linux instance](ebs-detaching-volume.md)\.
1. Launch a temporary instance in the same Availability Zone as your current instance \(use a similar or the same AMI as you used for your current instance\), and attach the root volume to the temporary instance\. For more information, see [Attaching an Amazon EBS volume to an instance](ebs-attaching-volume.md)\.
1. Connect to the temporary instance, create a mount point, and mount the volume that you attached\. For more information, see [Making an Amazon EBS volume available for use on Linux](ebs-using-volumes.md)\.
1. From the temporary instance, check the permissions of the `/home/my-instance-user-name/` directory of the attached volume\. If necessary, adjust the permissions as follows:
```
[ec2-user ~]$ chmod 600 mount_point/home/my-instance-user-name/.ssh/authorized_keys
```
```
[ec2-user ~]$ chmod 700 mount_point/home/my-instance-user-name/.ssh
```
```
[ec2-user ~]$ chmod 700 mount_point/home/my-instance-user-name | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
3811c76583e2-3 | ```
[ec2-user ~]$ chmod 700 mount_point/home/my-instance-user-name
```
1. Unmount the volume, detach it from the temporary instance, and re\-attach it to the original instance\. Ensure that you specify the correct device name for the root volume; for example, `/dev/xvda`\.
1. Start your instance\. If you no longer require the temporary instance, you can terminate it\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
34f2cc67660b-0 | Your private key file must be protected from read and write operations from any other users\. If your private key can be read or written to by anyone but you, then SSH ignores your key and you see the following warning message below\.
```
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '.ssh/my_private_key.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: .ssh/my_private_key.pem
Permission denied (publickey).
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
34f2cc67660b-1 | bad permissions: ignore key: .ssh/my_private_key.pem
Permission denied (publickey).
```
If you see a similar message when you try to log in to your instance, examine the first line of the error message to verify that you are using the correct public key for your instance\. The above example uses the private key `.ssh/my_private_key.pem` with file permissions of `0777`, which allow anyone to read or write to this file\. This permission level is very insecure, and so SSH ignores this key\. To fix the error, execute the following command, substituting the path for your private key file\.
```
[ec2-user ~]$ chmod 0400 .ssh/my_private_key.pem
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
e4cd2a452d5f-0 | If you use a third\-party tool, such as ssh\-keygen, to create an RSA key pair, it generates the private key in the OpenSSH key format\. When you connect to your instance, if you use the private key in the OpenSSH format to decrypt the password, you'll get the error `Private key must begin with "-----BEGIN RSA PRIVATE KEY-----" and end with "-----END RSA PRIVATE KEY-----"`\.
To resolve the error, the private key must be in the PEM format\. Use the following command to create the private key in the PEM format:
```
ssh-keygen -m PEM
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
77c7956063e0-0 | If you use PuTTY to connect to your instance and get either of the following errors, Error: Server refused our key or Error: No supported authentication methods available, verify that you are connecting with the appropriate user name for your AMI\. Type the user name in **User name** in the **PuTTY Configuration** window\.
The appropriate user names are as follows:
+ For Amazon Linux 2 or the Amazon Linux AMI, the user name is `ec2-user`\.
+ For a CentOS AMI, the user name is `centos`\.
+ For a Debian AMI, the user name is `admin`\.
+ For a Fedora AMI, the user name is `ec2-user` or `fedora`\.
+ For a RHEL AMI, the user name is `ec2-user` or `root`\.
+ For a SUSE AMI, the user name is `ec2-user` or `root`\.
+ For an Ubuntu AMI, the user name is `ubuntu`\.
+ Otherwise, if `ec2-user` and `root` don't work, check with the AMI provider\.
You should also verify that your private key \(\.pem\) file has been correctly converted to the format recognized by PuTTY \(\.ppk\)\. For more information about converting your private key, see [Connecting to your Linux instance from Windows using PuTTY](putty.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
552609e29c19-0 | The `ping` command is a type of ICMP traffic — if you are unable to ping your instance, ensure that your inbound security group rules allow ICMP traffic for the `Echo Request` message from all sources, or from the computer or instance from which you are issuing the command\.
If you are unable to issue a `ping` command from your instance, ensure that your outbound security group rules allow ICMP traffic for the `Echo Request` message to all destinations, or to the host that you are attempting to ping\.
`Ping` commands can also be blocked by a firewall or time out due to network latency or hardware issues\. You should consult your local network or system administrator for help with further troubleshooting\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
49b84fc02a9c-0 | If you are connecting to your instance with PuTTY and you receive the error "Server unexpectedly closed network connection," verify that you have enabled keepalives on the Connection page of the PuTTY Configuration to avoid being disconnected\. Some servers disconnect clients when they do not receive any data within a specified period of time\. Set the Seconds between keepalives to 59 seconds\.
If you still experience issues after enabling keepalives, try to disable Nagle's algorithm on the Connection page of the PuTTY Configuration\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/TroubleshootingInstancesConnecting.md |
ced864a8af67-0 | Suppose that you start out running your app or website on a single EC2 instance, and over time, traffic increases to the point that you require more than one instance to meet the demand\. You can launch multiple EC2 instances from your AMI and then use Elastic Load Balancing to distribute incoming traffic for your application across these EC2 instances\. This increases the availability of your application\. Placing your instances in multiple Availability Zones also improves the fault tolerance in your application\. If one Availability Zone experiences an outage, traffic is routed to the other Availability Zone\.
You can use Amazon EC2 Auto Scaling to maintain a minimum number of running instances for your application at all times\. Amazon EC2 Auto Scaling can detect when your instance or application is unhealthy and replace it automatically to maintain the availability of your application\. You can also use Amazon EC2 Auto Scaling to scale your Amazon EC2 capacity up or down automatically based on demand, using criteria that you specify\.
In this tutorial, we use Amazon EC2 Auto Scaling with Elastic Load Balancing to ensure that you maintain a specified number of healthy EC2 instances behind your load balancer\. Note that these instances do not need public IP addresses, because traffic goes to the load balancer and is then routed to the instances\. For more information, see [Amazon EC2 Auto Scaling](https://aws.amazon.com/ec2/autoscaling/) and [Elastic Load Balancing](https://aws.amazon.com/elasticloadbalancing/)\.
![\[Architecture with Auto Scaling and Elastic Load Balancing\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/images/tutorial_as_elb_architecture.png)
**Topics** | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-increase-availability.md |
ced864a8af67-1 | **Topics**
+ [Prerequisites](#scale-and-load-balance-prerequisites)
+ [Scale and load balance your application](#scale-and-load-balance)
+ [Test your load balancer](#test-load-balancer) | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-increase-availability.md |
26e7ab9adee0-0 | This tutorial assumes that you have already done the following:
1. Created a virtual private cloud \(VPC\) with one public subnet in two or more Availability Zones\.
1. Launched an instance in the VPC\.
1. Connected to the instance and customized it\. For example, installing software and applications, copying data, and attaching additional EBS volumes\. For information about setting up a web server on your instance, see [Tutorial: Install a LAMP web server with the Amazon Linux AMI](install-LAMP.md)\.
1. Tested your application on your instance to ensure that your instance is configured correctly\.
1. Created a custom Amazon Machine Image \(AMI\) from your instance\. For more information, see [Creating an Amazon EBS\-backed Linux AMI](creating-an-ami-ebs.md) or [Creating an instance store\-backed Linux AMI](creating-an-ami-instance-store.md)\.
1. \(Optional\) Terminated the instance if you no longer need it\.
1. Created an IAM role that grants your application the access to AWS it needs\. For more information, see [To create an IAM role using the IAM console](iam-roles-for-amazon-ec2.md#create-iam-role-console)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-increase-availability.md |
3e40b4ef279c-0 | Use the following procedure to create a load balancer, create a launch configuration for your instances, create an Auto Scaling group with two or more instances, and associate the load balancer with the Auto Scaling group\.
**To scale and load\-balance your application**
1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
1. On the navigation pane, under **LOAD BALANCING**, choose **Load Balancers**\.
1. Choose **Create Load Balancer**\.
1. For **Application Load Balancer**, choose **Create**\.
1. On the **Configure Load Balancer** page, do the following:
1. For **Name**, type a name for your load balancer\. For example, **my\-lb**\.
1. For **Scheme**, keep the default value, **internet\-facing**\.
1. For **Listeners**, keep the default, which is a listener that accepts HTTP traffic on port 80\.
1. For **Availability Zones**, select the VPC that you used for your instances\. Select an Availability Zone and then select the public subnet for that Availability Zone\. Repeat for a second Availability Zone\.
1. Choose **Next: Configure Security Settings**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-increase-availability.md |
3e40b4ef279c-1 | 1. Choose **Next: Configure Security Settings**\.
1. For this tutorial, you are not using a secure listener\. Choose **Next: Configure Security Groups**\.
1. On the **Configure Security Groups** page, do the following:
1. Choose **Create a new security group**\.
1. Type a name and description for the security group, or keep the default name and description\. This new security group contains a rule that allows traffic to the port configured for the listener\.
1. Choose **Next: Configure Routing**\.
1. On the **Configure Routing** page, do the following:
1. For **Target group**, keep the default, **New target group**\.
1. For **Name**, type a name for the target group\.
1. Keep **Protocol** as HTTP, **Port** as 80, and **Target type** as instance\.
1. For **Health checks**, keep the default protocol and path\.
1. Choose **Next: Register Targets**\.
1. On the **Register Targets** page, choose **Next: Review** to continue to the next page, as we'll use Amazon EC2 Auto Scaling to add EC2 instances to the target group\.
1. On the **Review** page, choose **Create**\. After the load balancer is created, choose **Close**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-increase-availability.md |
Subsets and Splits