id
stringlengths
14
16
text
stringlengths
1
2.43k
source
stringlengths
99
229
d2b344071747-0
A Reserved Instance has four instance attributes that determine its price\. + **Instance type**: For example, `m4.large`\. This is composed of the instance family \(for example, `m4`\) and the instance size \(for example, `large`\)\. + **Region**: The Region in which the Reserved Instance is purchased\. + **Tenancy**: Whether your instance runs on shared \(default\) or single\-tenant \(dedicated\) hardware\. For more information, see [Dedicated Instances](dedicated-instance.md)\. + **Platform**: The operating system; for example, Windows or Linux/Unix\. For more information, see [Choosing a platform](ri-market-concepts-buying.md#ri-choosing-platform)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-reserved-instances.md
7220084c7b17-0
You can purchase a Reserved Instance for a one\-year or three\-year commitment, with the three\-year commitment offering a bigger discount\. + **One\-year**: A year is defined as 31536000 seconds \(365 days\)\. + **Three\-year**: Three years is defined as 94608000 seconds \(1095 days\)\. Reserved Instances do not renew automatically; when they expire, you can continue using the EC2 instance without interruption, but you are charged On\-Demand rates\. In the above example, when the Reserved Instances that cover the T2 and C4 instances expire, you go back to paying the On\-Demand rates until you terminate the instances or purchase new Reserved Instances that match the instance attributes\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-reserved-instances.md
d5a35b50ed89-0
The following payment options are available for Reserved Instances: + **All Upfront**: Full payment is made at the start of the term, with no other costs or additional hourly charges incurred for the remainder of the term, regardless of hours used\. + **Partial Upfront**: A portion of the cost must be paid upfront and the remaining hours in the term are billed at a discounted hourly rate, regardless of whether the Reserved Instance is being used\. + **No Upfront**: You are billed a discounted hourly rate for every hour within the term, regardless of whether the Reserved Instance is being used\. No upfront payment is required\. **Note** No Upfront Reserved Instances are based on a contractual obligation to pay monthly for the entire term of the reservation\. For this reason, a successful billing history is required before you can purchase No Upfront Reserved Instances\. Generally speaking, you can save more money making a higher upfront payment for Reserved Instances\. You can also find Reserved Instances offered by third\-party sellers at lower prices and shorter term lengths on the Reserved Instance Marketplace\. For more information, see [Reserved Instance Marketplace](ri-market-general.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-reserved-instances.md
56045c4a8e33-0
If your computing needs change, you may be able to modify or exchange your Reserved Instance, depending on the offering class\. + **Standard**: These provide the most significant discount, but can only be modified\. + **Convertible**: These provide a lower discount than Standard Reserved Instances, but can be exchanged for another Convertible Reserved Instance with different instance attributes\. Convertible Reserved Instances can also be modified\. For more information, see [Types of Reserved Instances \(offering classes\)](reserved-instances-types.md)\. After you purchase a Reserved Instance, you cannot cancel your purchase\. However, you may be able to [modify](ri-modifying.md), [exchange](ri-convertible-exchange.md), or [sell](ri-market-general.md) your Reserved Instance if your needs change\. For more information, see the [Amazon EC2 Reserved Instances Pricing page](http://aws.amazon.com/ec2/pricing/reserved-instances/pricing)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-reserved-instances.md
33846cd586ff-0
There is a limit to the number of Reserved Instances that you can purchase per month\. For each Region you can purchase 20 [regional](apply_ri.md#apply-regional-ri) Reserved Instances per month plus an additional 20 [zonal](apply_ri.md#apply-zonal-ri) Reserved Instances per month for each Availability Zone\. For example, in a Region with three Availability Zones, the limit is 80 Reserved Instances per month: 20 regional Reserved Instances for the Region plus 20 zonal Reserved Instances for each of the three Availability Zones \(20x3=60\)\. A regional Reserved Instance applies a discount to a running On\-Demand Instance\. The default On\-Demand Instance limit is 20\. You cannot exceed your running On\-Demand Instance limit by purchasing regional Reserved Instances\. For example, if you already have 20 running On\-Demand Instances, and you purchase 20 regional Reserved Instances, the 20 regional Reserved Instances are used to apply a discount to the 20 running On\-Demand Instances\. If you purchase more regional Reserved Instances, you will not be able to launch more instances because you have reached your On\-Demand Instance limit\. Before purchasing regional Reserved Instances, make sure your On\-Demand Instance limit matches or exceeds the number of regional Reserved Instances you intend to own\. If required, make sure you request an increase to your On\-Demand Instance limit *before* purchasing more regional Reserved Instances\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-reserved-instances.md
33846cd586ff-1
A zonal Reserved Instance—a Reserved Instance that is purchased for a specific Availability Zone— provides capacity reservation as well as a discount\. You *can exceed* your running On\-Demand Instance limit by purchasing zonal Reserved Instances\. For example, if you already have 20 running On\-Demand Instances, and you purchase 20 zonal Reserved Instances, you can launch a further 20 On\-Demand Instances that match the specifications of your zonal Reserved Instances, giving you a total of 40 running instances\. The Amazon EC2 console provides limit information\. For more information, see [Viewing your current limits](ec2-resource-limits.md#view-limits)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-reserved-instances.md
48690cbbdc4c-0
Cloud security at AWS is the highest priority\. As an AWS customer, you benefit from a data center and network architecture that are built to meet the requirements of the most security\-sensitive organizations\. Security is a shared responsibility between AWS and you\. The [shared responsibility model](http://aws.amazon.com/compliance/shared-responsibility-model/) describes this as security of the cloud and security in the cloud: + **Security of the cloud** – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud\. AWS also provides you with services that you can use securely\. Third\-party auditors regularly test and verify the effectiveness of our security as part of the [AWS Compliance Programs](http://aws.amazon.com/compliance/programs/)\. To learn about the compliance programs that apply to Amazon EC2, see [AWS Services in Scope by Compliance Program](http://aws.amazon.com/compliance/services-in-scope/)\. + **Security in the cloud** – Your responsibility is determined by the AWS service that you use\. You are also responsible for other factors including the sensitivity of your data, your company’s requirements, and applicable laws and regulations\. This documentation helps you understand how to apply the shared responsibility model when using Amazon EC2\. It shows you how to configure Amazon EC2 to meet your security and compliance objectives\. You also learn how to use other AWS services that help you to monitor and secure your Amazon EC2 resources\. **Topics** + [Infrastructure security in Amazon EC2](infrastructure-security.md)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-security.md
48690cbbdc4c-1
**Topics** + [Infrastructure security in Amazon EC2](infrastructure-security.md) + [Amazon EC2 and interface VPC endpoints](interface-vpc-endpoints.md) + [Resilience in Amazon EC2](disaster-recovery-resiliency.md) + [Data protection in Amazon EC2](data-protection.md) + [Identity and access management for Amazon EC2](security-iam.md) + [Amazon EC2 key pairs and Linux instances](ec2-key-pairs.md) + [Amazon EC2 security groups for Linux instances](ec2-security-groups.md) + [Update management in Amazon EC2](update-management.md) + [Compliance validation for Amazon EC2](compliance-validation.md)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ec2-security.md
17ab17e8ff54-0
You can view detailed information about your snapshots\. **To view snapshot information using the console** 1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\. 1. Choose **Snapshots** in the navigation pane\. 1. To reduce the list, choose an option from the **Filter** list\. For example, to view only your snapshots, choose **Owned By Me**\. You can also filter your snapshots using tags and snapshot attributes\. Choose the search bar to view the available tags and attributes\. 1. To view more information about a snapshot, select it\. **To view snapshot information 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)\. + [describe\-snapshots](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-snapshots.html) \(AWS CLI\) + [Get\-EC2Snapshot](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2Snapshot.html) \(AWS Tools for Windows PowerShell\) **Example: Filter based on tags**
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-describing-snapshots.md
17ab17e8ff54-1
**Example: Filter based on tags** The following command describes the snapshots with the tag Stack=production\. ``` aws ec2 describe-snapshots --filters Name=tag:Stack,Values=production ``` **Example: Filter based on volume** The following command describes the snapshots created from the specified volume\. ``` aws ec2 describe-snapshots --filters Name=volume-id,Values=vol-049df61146c4d7901 ``` **Example: Filter based on snapshot age** With the AWS CLI, you can use JMESPath to filter results using expressions\. For example, the following command displays the IDs of all snapshots created by your AWS account \(represented by *123456789012*\) before the specified date \(represented by *2020\-03\-31*\)\. If you do not specify the owner, the results include all public snapshots\. ``` aws ec2 describe-snapshots --filters Name=owner-id,Values=123456789012 --query "Snapshots[?(StartTime<=`2020-03-31`)].[SnapshotId]" --output text ``` The following command displays the IDs of all snapshots created in the specified date range\. ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-describing-snapshots.md
17ab17e8ff54-2
``` The following command displays the IDs of all snapshots created in the specified date range\. ``` aws ec2 describe-snapshots --filters Name=owner-id,Values=123456789012 --query "Snapshots[?(StartTime>=`2019-01-01`) && (StartTime<=`2019-12-31`)].[SnapshotId]" --output text ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-describing-snapshots.md
3f66906b2dfb-0
You specify the EBS volumes and instance store volumes for your instance using a block device mapping\. Each entry in a block device mapping includes a device name and the volume that it maps to\. The default block device mapping is specified by the AMI you use\. Alternatively, you can specify a block device mapping for the instance when you launch it\. All the NVMe instance store volumes supported by an instance type are automatically enumerated and assigned a device name on instance launch; including them in the block device mapping for the AMI or the instance has no effect\. For more information, see [Block device mapping](block-device-mapping-concepts.md)\. A block device mapping always specifies the root volume for the instance\. The root volume is either an Amazon EBS volume or an instance store volume\. For more information, see [Storage for the root device](ComponentsAMIs.md#storage-for-the-root-device)\. The root volume is mounted automatically\. For instances with an instance store volume for the root volume, the size of this volume varies by AMI, but the maximum size is 10 GB\. You can use a block device mapping to specify additional EBS volumes when you launch your instance, or you can attach additional EBS volumes after your instance is running\. For more information, see [Amazon EBS volumes](ebs-volumes.md)\. You can specify the instance store volumes for your instance only when you launch it\. You can't attach instance store volumes to an instance after you've launched it\. If you change the instance type, an instance store will not be attached to the new instance type\. For more information, see [Changing the instance type](ec2-instance-resize.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/add-instance-store-volumes.md
3f66906b2dfb-1
The number and size of available instance store volumes for your instance varies by instance type\. Some instance types do not support instance store volumes\. If the number of instance store volumes in a block device mapping exceeds the number of instance store volumes available to an instance, the additional volumes are ignored\. For more information about the instance store volumes support by each instance type, see [Instance store volumes](InstanceStorage.md#instance-store-volumes)\. If the instance type you choose for your instance supports non\-NVMe instance store volumes, you must add them to the block device mapping for the instance when you launch it\. NVMe instance store volumes are available by default\. After you launch an instance, you must ensure that the instance store volumes for your instance are formatted and mounted before you can use them\. The root volume of an instance store\-backed instance is mounted automatically\. **Topics** + [Adding instance store volumes to an AMI](#adding-instance-storage-ami) + [Adding instance store volumes to an instance](#adding-instance-storage-instance) + [Making instance store volumes available on your instance](#making-instance-stores-available-on-your-instances)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/add-instance-store-volumes.md
f826167ee212-0
You can create an AMI with a block device mapping that includes instance store volumes\. If you launch an instance with an instance type that supports instance store volumes and an AMI that specifies instance store volumes in its block device mapping, the instance includes these instance store volumes\. If the number of instance store volumes in the block device mapping exceeds the number of instance store volumes available to the instance, the additional instance store volumes are ignored\. **Considerations** + For M3 instances, specify instance store volumes in the block device mapping of the instance, not the AMI\. Amazon EC2 might ignore instance store volumes that are specified only in the block device mapping of the AMI\. + When you launch an instance, you can omit non\-NVMe instance store volumes specified in the AMI block device mapping or add instance store volumes\. **To add instance store volumes to an Amazon EBS\-backed AMI 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. Choose **Actions**, **Image**, **Create Image**\. 1. In the **Create Image** dialog box, type a meaningful name and description for your image\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/add-instance-store-volumes.md
f826167ee212-1
1. In the **Create Image** dialog box, type a meaningful name and description for your image\. 1. For each instance store volume to add, choose **Add New Volume**, from **Volume Type** select an instance store volume, and from **Device** select a device name\. \(For more information, see [Device naming on Linux instances](device_naming.md)\.\) The number of available instance store volumes depends on the instance type\. For instances with NVMe instance store volumes, the device mapping of these volumes depends on the order in which the operating system enumerates the volumes\. 1. Choose **Create Image**\. **To add instance store volumes to an AMI 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)\. + [create\-image](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-image.html) or [register\-image](https://docs.aws.amazon.com/cli/latest/reference/ec2/register-image.html) \(AWS CLI\)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/add-instance-store-volumes.md
f826167ee212-2
+ [New\-EC2Image](https://docs.aws.amazon.com/powershell/latest/reference/items/New-EC2Image.html) and [Register\-EC2Image](https://docs.aws.amazon.com/powershell/latest/reference/items/Register-EC2Image.html) \(AWS Tools for Windows PowerShell\)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/add-instance-store-volumes.md
d79387dc7f80-0
When you launch an instance, the default block device mapping is provided by the specified AMI\. If you need additional instance store volumes, you must add them to the instance as you launch it\. You can also omit devices specified in the AMI block device mapping\. **Considerations** + For M3 instances, you might receive instance store volumes even if you do not specify them in the block device mapping for the instance\. + For HS1 instances, no matter how many instance store volumes you specify in the block device mapping of an AMI, the block device mapping for an instance launched from the AMI automatically includes the maximum number of supported instance store volumes\. You must explicitly remove the instance store volumes that you don't want from the block device mapping for the instance before you launch it\. **To update the block device mapping for an instance using the console** 1. Open the Amazon EC2 console\. 1. From the dashboard, choose **Launch instance**\. 1. In **Step 1: Choose an Amazon Machine Image \(AMI\)**, select the AMI to use and choose **Select**\. 1. Follow the wizard to complete **Step 1: Choose an Amazon Machine Image \(AMI\)**, **Step 2: Choose an Instance Type**, and **Step 3: Configure Instance Details**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/add-instance-store-volumes.md
d79387dc7f80-1
1. In **Step 4: Add Storage**, modify the existing entries as needed\. For each instance store volume to add, choose **Add New Volume**, from **Volume Type** select an instance store volume, and from **Device** select a device name\. The number of available instance store volumes depends on the instance type\. 1. Complete the wizard and launch the instance\. 1. \(Optional\) To view the instance store volumes available on your instance, run the lsblk command\. **To update the block device mapping for an instance using the command line** You can use one of the following options commands with the corresponding command\. For more information about these command line interfaces, see [Accessing Amazon EC2](concepts.md#access-ec2)\. + `--block-device-mappings` with [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) \(AWS CLI\) + `-BlockDeviceMapping` with [New\-EC2Instance](https://docs.aws.amazon.com/powershell/latest/reference/items/New-EC2Instance.html) \(AWS Tools for Windows PowerShell\)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/add-instance-store-volumes.md
eef5a97fff0f-0
After you launch an instance, the instance store volumes are available to the instance, but you can't access them until they are mounted\. For Linux instances, the instance type determines which instance store volumes are mounted for you and which are available for you to mount yourself\. For Windows instances, the EC2Config service mounts the instance store volumes for an instance\. The block device driver for the instance assigns the actual volume name when mounting the volume, and the name assigned can be different than the name that Amazon EC2 recommends\. Many instance store volumes are pre\-formatted with the ext3 file system\. SSD\-based instance store volumes that support TRIM instruction are not pre\-formatted with any file system\. However, you can format volumes with the file system of your choice after you launch your instance\. For more information, see [Instance store volume TRIM support](ssd-instance-store.md#InstanceStoreTrimSupport)\. For Windows instances, the EC2Config service reformats the instance store volumes with the NTFS file system\. You can confirm that the instance store devices are available from within the instance itself using instance metadata\. For more information, see [Viewing the instance block device mapping for instance store volumes](block-device-mapping-concepts.md#bdm-instance-metadata)\. For Windows instances, you can also view the instance store volumes using Windows Disk Management\. For more information, see [Listing disks using Windows Disk Management](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-volumes.html#windows-disks)\. For Linux instances, you can view and mount the instance store volumes as described in the following procedure\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/add-instance-store-volumes.md
eef5a97fff0f-1
For Linux instances, you can view and mount the instance store volumes as described in the following procedure\. **To make an instance store volume available on Linux** 1. Connect to the instance using an SSH client\. For more information, see [Connect to your Linux instance](AccessingInstances.md)\. 1. Use the `df -h` command to view the volumes that are formatted and mounted\. ``` [ec2-user ~]$ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 3.8G 72K 3.8G 1% /dev tmpfs 3.8G 0 3.8G 0% /dev/shm /dev/nvme0n1p1 7.9G 1.2G 6.6G 15% / ``` 1. Use the `lsblk` to view any volumes that were mapped at launch but not formatted and mounted\. ``` [ec2-user ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1 259:1 0 8G 0 disk ├─nvme0n1p1 259:2 0 8G 0 part / └─nvme0n1p128 259:3 0 1M 0 part nvme1n1 259:0 0 69.9G 0 disk ``` 1. To format and mount an instance store volume that was mapped only, do the following:
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/add-instance-store-volumes.md
eef5a97fff0f-2
``` 1. To format and mount an instance store volume that was mapped only, do the following: 1. Create a file system on the device using the `mkfs` command\. ``` [ec2-user ~]$ sudo mkfs -t xfs /dev/nvme1n1 ``` 1. Create a directory on which to mount the device using the `mkdir` command\. ``` [ec2-user ~]$ sudo mkdir /data ``` 1. Mount the device on the newly created directory using the `mount` command\. ``` [ec2-user ~]$ sudo mount /dev/nvme1n1 /data ``` For instructions on how to mount an attached volume automatically after reboot, see [Automatically mount an attached volume after reboot](ebs-using-volumes.md#ebs-mount-after-reboot)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/add-instance-store-volumes.md
17e0274d66f4-0
Amazon EBS fast snapshot restore enables you to create a volume from a snapshot that is fully initialized at creation\. This eliminates the latency of I/O operations on a block when it is accessed for the first time\. Volumes that are created using fast snapshot restore instantly deliver all of their provisioned performance\. To get started, enable fast snapshot restore for specific snapshots in specific Availability Zones\. Each snapshot and Availability Zone pair refers to one fast snapshot restore\. When you create a volume from one of these snapshots in one of its enabled Availability Zones, the volume is restored using fast snapshot restore\. You can enable fast snapshot restore for snapshots that you own and for public and private snapshots that are shared with you\. **Topics** + [Fast snapshot restore quotas](#limits) + [Fast snapshot restore states](#fsr-states) + [Volume creation credits](#volume-creation-credits) + [Managing fast snapshot restore](#manage-fsr) + [View snapshots with fast snapshot restore enabled](#view-fsr-enabled-snapshots) + [View volumes restored using fast snapshot restore](#view-fast-restored-volumes) + [Monitoring fast snapshot restore](#monitor) + [Pricing and Billing](#fsr-pricing)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
cb3e684c0a08-0
You can enable up to 50 snapshots for fast snapshot restore per Region\. The quota applies to snapshots that you own and snapshots that are shared with you\. If you enable fast snapshot restore for a snapshot that is shared with you, it counts towards your fast snapshot restore quota\. It does not count towards the snapshot owner's fast snapshot restore quota\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
7c1428b3c659-0
After you enable fast snapshot restore for a snapshot, it can be in one of the following states\. + `enabling` — A request was made to enable fast snapshot restore\. + `optimizing` — Fast snapshot restore is being enabled\. It takes 60 minutes per TiB to optimize a snapshot\. + `enabled` — Fast snapshot restore is enabled\. + `disabling` — A request was made to disable fast snapshot restore, or a request to enable fast snapshot restore failed\. + `disabled` — Fast snapshot restore is disabled\. You can enable fast snapshot restore again as needed\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
8a3d54b9fe52-0
The number of volumes that receive the full performance benefit of fast snapshot restore is determined by the volume creation credits for the snapshot\. There is one credit bucket per snapshot per Availability Zone\. Each volume that you create from a snapshot with fast snapshot restore enabled consumes one credit from the credit bucket\. When you enable fast snapshot restore for a snapshot that is shared with you, you get a separate credit bucket for the shared snapshot in your account\. If you create volumes from the shared snapshot, the credits are consumed from your credit bucket; they are not consumed from the snapshot owner's credit bucket\. The size of a credit bucket depends on the size of the snapshot, not the size of the volumes created from the snapshot\. The size of the credit bucket for each snapshot is calculated as follows: ``` MAX (1, MIN (10, FLOOR(1024/snapshot_size_gib))) ``` As you consume credits, the credit bucket is refilled over time\. The refill rate for each credit bucket is calculated as follows: ``` MIN (10, 1024/snapshot_size_gib) ``` For example, if you enable fast snapshot restore for a snapshot with a size of 100 GiB, the maximum size of its credit bucket is 10 credits and the refill rate is 10 credits per hour\. When the credit bucket is full, you can create 10 initialized volumes from this snapshot simultaneously\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
8a3d54b9fe52-1
You can use Cloudwatch metrics to monitor the size of your credit buckets and the number of credits available in each bucket\. For more information, see [Fast snapshot restore metrics](using_cloudwatch_ebs.md#fast-snapshot-restore-metrics)\. After you create a volume from a snapshot with fast snapshot restore enabled, you can describe the volume using [describe\-volumes](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-volumes.html) and check the `fastRestored` field in the output to determine whether the volume was created as an initialized volume using fast snapshot restore\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
04eed470330e-0
Fast snapshot restore is disabled for a snapshot by default\. You can enable or disable fast snapshot restore for snapshots that you own and for snapshots that are shared with you\. When you enable or disable fast snapshot restore for a snapshot, the changes apply to your account only\. **Note** When you enable fast snapshot restore for a snapshot, your account is billed for each minute that fast snapshot restore is enabled in a particular Availability Zone\. Charges are pro\-rated and have a minimum of one hour\. When you delete a snapshot that you own, fast snapshot restore is automatically disabled for that snapshot in your account\. If you enabled fast snapshot restore for a snapshot that is shared with you, and the snapshot owner deletes or unshares it, fast snapshot restore is automatically disabled for the shared snapshot in your account\. If you enabled fast snapshot restore for a snapshot that is shared with you, and it's encrypted using a custom CMK, fast snapshot restore is not automatically disabled for the snapshot when the snapshot owner revokes your access to the custom CMK\. You must manually disable fast snapshot restore for that snapshot\. Use the following procedure to enable or disable fast snapshot restore for a snapshot that you own or for a snapshot that is shared with you\. **To enable or disable fast snapshot restore** 1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
04eed470330e-1
1. In the navigation pane, choose **Snapshots**\. 1. Select the snapshot\. 1. Choose **Actions**, **Manage Fast Snapshot Restore**\. 1. Select or deselect Availability Zones, and then choose **Save**\. 1. To track the state of fast snapshot restore as it is enabled, see **Fast Snapshot Restore** on the **Description** tab\. **To manage fast snapshot restore using the AWS CLI** + [enable\-fast\-snapshot\-restores](https://docs.aws.amazon.com/cli/latest/reference/ec2/enable-fast-snapshot-restores.html) + [disable\-fast\-snapshot\-restores](https://docs.aws.amazon.com/cli/latest/reference/ec2/disable-fast-snapshot-restores.html) + [describe\-fast\-snapshot\-restores](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-fast-snapshot-restores.html)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
89a231298c68-0
Use the following procedure to view the state of fast snapshot restore for a snapshot that you own or for a snapshot that is shared with you\. **To view the state of fast snapshot restore 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 **Snapshots**\. 1. Select the snapshot\. 1. On the **Description** tab, see **Fast Snapshot Restore**, which indicates the state of fast snapshot restore\. For example, it might show a state of "2 Availability Zones optimizing" or "2 Availability Zones enabled"\. **To view snapshots with fast snapshot restore enabled using the AWS CLI** Use the [describe\-fast\-snapshot\-restores](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-fast-snapshot-restores.html) command to describe the snapshots that are enabled for fast snapshot restore\. ``` aws ec2 describe-fast-snapshot-restores --filters Name=state,Values=enabled ``` The following is example output\. ``` { "FastSnapshotRestores": [ {
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
89a231298c68-1
``` { "FastSnapshotRestores": [ { "SnapshotId": "snap-0e946653493cb0447", "AvailabilityZone": "us-east-2a", "State": "enabled", "StateTransitionReason": "Client.UserInitiated - Lifecycle state transition", "OwnerId": "123456789012", "EnablingTime": "2020-01-25T23:57:49.596Z", "OptimizingTime": "2020-01-25T23:58:25.573Z", "EnabledTime": "2020-01-25T23:59:29.852Z" }, { "SnapshotId": "snap-0e946653493cb0447", "AvailabilityZone": "us-east-2b", "State": "enabled", "StateTransitionReason": "Client.UserInitiated - Lifecycle state transition", "OwnerId": "123456789012", "EnablingTime": "2020-01-25T23:57:49.596Z", "OptimizingTime": "2020-01-25T23:58:25.573Z",
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
89a231298c68-2
"OptimizingTime": "2020-01-25T23:58:25.573Z", "EnabledTime": "2020-01-25T23:59:29.852Z" } ] } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
068ba3ceaaf8-0
When you create a volume from a snapshot that is enabled for fast snapshot restore in the Availability Zone for the volume, it is restored using fast snapshot restore\. Use the [describe\-volumes](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-volumes.html) command to view volumes that were created from a snapshot that is enabled for fast snapshot restore\. ``` aws ec2 describe-volumes --filters Name=fast-restored,Values=true ``` The following is example output\. ``` { "Volumes": [ { "Attachments": [], "AvailabilityZone": "us-east-2a", "CreateTime": "2020-01-26T00:34:11.093Z", "Encrypted": true, "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/8c5b2c63-b9bc-45a3-a87a-5513e232e843", "Size": 20, "SnapshotId": "snap-0e946653493cb0447", "State": "available", "VolumeId": "vol-0d371921d4ca797b0", "Iops": 100,
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
068ba3ceaaf8-1
"VolumeId": "vol-0d371921d4ca797b0", "Iops": 100, "VolumeType": "gp2", "FastRestored": true } ] } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
d56457c33386-0
Amazon EBS emits Amazon CloudWatch events when the fast snapshot restore state for a snapshot changes\. For more information, see [EBS fast snapshot restore events](ebs-cloud-watch-events.md#fast-snapshot-restore-events)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
2797d1b95a14-0
You are billed for each minute that fast snapshot restore is enabled for a snapshot in a particular Availability Zone\. Charges are pro\-rated with a minimum of one hour\. For example, if you enable fast snapshot restore for one snapshot in `US-East-1a` for one month \(30 days\), you are billed **$540** \(`1` snapshot x `1` AZ x `720` hours x `$0.75` per hour\)\. If you enable fast snapshot restore for two snapshots in `us-east-1a`, `us-east-1b`, and `us-east-1c` for the same period, you are billed **$3240** \(`2` snapshot x `3` AZs x `720` hours x `$0.75` per hour\)\. If you enable fast snapshot restore for a public or private snapshot that is shared with you, your account is billed; the snapshot owner is not billed\. When a snapshot that is shared with you is deleted or unshared by the snapshot owner, fast snapshot restore is disabled for the snapshot in your account and billing is stopped\. For more information, see [Amazon EBS pricing](http://aws.amazon.com/ebs/pricing/)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ebs-fast-snapshot-restore.md
dd2e5645d3e1-0
The Reserved Instance Marketplace is a platform that supports the sale of third\-party and AWS customers' unused Standard Reserved Instances, which vary in term lengths and pricing options\. For example, you may want to sell Reserved Instances after moving instances to a new AWS Region, changing to a new instance type, ending projects before the term expiration, when your business needs change, or if you have unneeded capacity\. If you want to sell your unused Reserved Instances on the Reserved Instance Marketplace, you must meet certain eligibility criteria\. **Topics** + [Selling on the Reserved Instance Marketplace](#ri-market-selling-guide) + [Buying from the Reserved Instance Marketplace](#ri-market-buying-guide)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
b8f2c4c4b9f8-0
As soon as you list your Reserved Instances in the Reserved Instance Marketplace, they are available for potential buyers to find\. All Reserved Instances are grouped according to the duration of the term remaining and the hourly price\. To fulfill a buyer's request, AWS first sells the Reserved Instance with the lowest upfront price in the specified grouping\. Then, we sell the Reserved Instance with the next lowest price, until the buyer's entire order is fulfilled\. AWS then processes the transactions and transfers ownership of the Reserved Instances to the buyer\. You own your Reserved Instance until it's sold\. After the sale, you've given up the capacity reservation and the discounted recurring fees\. If you continue to use your instance, AWS charges you the On\-Demand price starting from the time that your Reserved Instance was sold\. **Topics** + [Restrictions and limitations](#ri-seller-limits) + [Registering as a seller](#ri-market-seller-profile) + [Bank account for disbursement](#ri-market-concepts-bank) + [Tax information](#ri-market-concepts-taxinfo) + [Pricing your Reserved Instances](#ri-market-concepts-pricing) + [Listing your Reserved Instances](#ri-market-selling-listing) + [Reserved Instance listing states](#ri-listing-states) + [Lifecycle of a listing](#ri-market-concepts-sold-partial) + [After your Reserved Instance is sold](#ri-market-concepts-sold)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
b8f2c4c4b9f8-1
+ [After your Reserved Instance is sold](#ri-market-concepts-sold) + [Getting paid](#ri-market-sold-gettingpaid) + [Information shared with the buyer](#ri-market-seller-disclosure)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
6964c250badf-0
Before you can sell your unused reservations, you must register as a seller in the Reserved Instance Marketplace\. For information, see [Registering as a seller](#ri-market-seller-profile)\. The following limitations and restrictions apply when selling Reserved Instances: + Only Amazon EC2 Standard Reserved Instances can be sold in the Reserved Instance Marketplace\. Amazon EC2 Convertible Reserved Instances cannot be sold\. Reserved Instances for other AWS services, such as Amazon RDS and Amazon ElastiCache, cannot be sold\. + There must be at least one month remaining in the term of the Standard Reserved Instance\. + You cannot sell a Standard Reserved Instance in a Region that is [disabled by default](using-regions-availability-zones.md#concepts-available-regions)\. + The minimum price allowed in the Reserved Instance Marketplace is $0\.00\. + You can sell No Upfront, Partial Upfront, or All Upfront Reserved Instances in the Reserved Instance Marketplace\. If there is an upfront payment on a Reserved Instance, it can be sold only after AWS has received the upfront payment and the reservation has been active \(you've owned it\) for at least 30 days\. + You cannot modify your listing in the Reserved Instance Marketplace directly\. However, you can change your listing by first canceling it and then creating another listing with new parameters\. For information, see [Pricing your Reserved Instances](#ri-market-concepts-pricing)\. You can also modify your Reserved Instances before listing them\. For information, see [Modifying Reserved Instances](ri-modifying.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
6964c250badf-1
+ AWS charges a service fee of 12 percent of the total upfront price of each Standard Reserved Instance you sell in the Reserved Instance Marketplace\. The upfront price is the price the seller is charging for the Standard Reserved Instance\. + When you register as a seller, the bank you specify must have a US address\. For more information, see [Additional seller requirements for paid products](https://docs.aws.amazon.com/marketplace/latest/userguide/user-guide-for-sellers.html#additional-seller-requirements-for-paid-products) in the *AWS Marketplace Seller Guide*\. + Amazon Internet Services Private Limited \(AISPL\) customers can't sell Reserved Instances in the Reserved Instance Marketplace even if they have a US bank account\. For more information, see [What are the differences between AWS accounts and AISPL accounts?](http://aws.amazon.com/premiumsupport/knowledge-center/aws-aispl-differences/)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
da895a2f80eb-0
**Note** Only the AWS account root user can register an account as a seller\. To sell in the Reserved Instance Marketplace, you must first register as a seller\. During registration, you provide the following information: + **Bank information**—AWS must have your bank information in order to disburse funds collected when you sell your reservations\. The bank you specify must have a US address\. For more information, see [Bank account for disbursement](#ri-market-concepts-bank)\. + **Tax information**—All sellers are required to complete a tax information interview to determine any necessary tax reporting obligations\. For more information, see [Tax information](#ri-market-concepts-taxinfo)\. After AWS receives your completed seller registration, you receive an email confirming your registration and informing you that you can get started selling in the Reserved Instance Marketplace\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
c9c1f0b5c274-0
AWS must have your bank information in order to disburse funds collected when you sell your Reserved Instance\. The bank you specify must have a US address\. For more information, see [Additional seller requirements for paid products](https://docs.aws.amazon.com/marketplace/latest/userguide/user-guide-for-sellers.html#additional-seller-requirements-for-paid-products) in the *AWS Marketplace Seller Guide*\. **To register a default bank account for disbursements** 1. Open the [Reserved Instance Marketplace Seller Registration](https://portal.aws.amazon.com/ec2/ri/seller_registration) page and sign in using your AWS credentials\. 1. On the **Manage Bank Account** page, provide the following information about the bank through to receive payment: + Bank account holder name + Routing number + Account number + Bank account type **Note** If you are using a corporate bank account, you are prompted to send the information about the bank account via fax \(1\-206\-765\-3424\)\. After registration, the bank account provided is set as the default, pending verification with the bank\. It can take up to two weeks to verify a new bank account, during which time you can't receive disbursements\. For an established account, it usually takes about two days for disbursements to complete\. **To change the default bank account for disbursement**
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
c9c1f0b5c274-1
**To change the default bank account for disbursement** 1. On the [Reserved Instance Marketplace Seller Registration](https://portal.aws.amazon.com/ec2/ri/seller_registration) page, sign in with the account that you used when you registered\. 1. On the **Manage Bank Account** page, add a new bank account or modify the default bank account as needed\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
ef59b47f92ac-0
Your sale of Reserved Instances might be subject to a transaction\-based tax, such as sales tax or value\-added tax\. You should check with your business's tax, legal, finance, or accounting department to determine if transaction\-based taxes are applicable\. You are responsible for collecting and sending the transaction\-based taxes to the appropriate tax authority\. As part of the seller registration process, you must complete a tax interview in the [Seller Registration Portal](https://portal.aws.amazon.com/ec2/ri/seller_registration?action=taxInterview)\. The interview collects your tax information and populates an IRS form W\-9, W\-8BEN, or W\-8BEN\-E, which is used to determine any necessary tax reporting obligations\. The tax information you enter as part of the tax interview might differ depending on whether you operate as an individual or business, and whether you or your business are a US or non\-US person or entity\. As you fill out the tax interview, keep in mind the following: + Information provided by AWS, including the information in this topic, does not constitute tax, legal, or other professional advice\. To find out how the IRS reporting requirements might affect your business, or if you have other questions, contact your tax, legal, or other professional advisor\. + To fulfill the IRS reporting requirements as efficiently as possible, answer all questions and enter all information requested during the interview\. + Check your answers\. Avoid misspellings or entering incorrect tax identification numbers\. They can result in an invalidated tax form\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
ef59b47f92ac-1
+ Check your answers\. Avoid misspellings or entering incorrect tax identification numbers\. They can result in an invalidated tax form\. Based on your tax interview responses and IRS reporting thresholds, Amazon might file Form 1099\-K\. Amazon mails a copy of your Form 1099\-K on or before January 31 in the year following the year that your tax account reaches the threshold levels\. For example, if your account reaches the threshold in 2018, your Form 1099\-K is mailed on or before January 31, 2019\. For more information about IRS requirements and Form 1099\-K, see the [IRS](http://www.irs.gov/uac/FAQs-on-New-Payment-Card-Reporting-Requirements) website\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
c9d54f01e4b7-0
The upfront fee is the only fee that you can specify for the Reserved Instance that you're selling\. The upfront fee is the one\-time fee that the buyer pays when they purchase a Reserved Instance\. The following are important limits to note: + **You can sell up to $50,000 in Reserved Instances**\. To increase this limit, complete the [EC2 Reserved Instance Sales](https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-ec2-reserved-instance-sales) form\. + **You can sell up to 5,000 Reserved Instances**\. To increase this limit, complete the [EC2 Reserved Instance Sales](https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-ec2-reserved-instance-sales) form\. + **The minimum price is $0**\. The minimum allowed price in the Reserved Instance Marketplace is $0\.00\. You cannot modify your listing directly\. However, you can change your listing by first canceling it and then creating another listing with new parameters\. You can cancel your listing at any time, as long as it's in the `active` state\. You cannot cancel the listing if it's already matched or being processed for a sale\. If some of the instances in your listing are matched and you cancel the listing, only the remaining unmatched instances are removed from the listing\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
c9d54f01e4b7-1
Because the value of Reserved Instances decreases over time, by default, AWS can set prices to decrease in equal increments month over month\. However, you can set different upfront prices based on when your reservation sells\. For example, if your Reserved Instance has nine months of its term remaining, you can specify the amount that you would accept if a customer were to purchase that Reserved Instance with nine months remaining\. You could set another price with five months remaining, and yet another price with one month remaining\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
d41468b01371-0
As a registered seller, you can choose to sell one or more of your Reserved Instances\. You can choose to sell all of them in one listing or in portions\. In addition, you can list Reserved Instances with any configuration of instance type, platform, and scope\. The console determines a suggested price\. It checks for offerings that match your Reserved Instance and matches the one with the lowest price\. Otherwise, it calculates a suggested price based on the cost of the Reserved Instance for its remaining time\. If the calculated value is less than $1\.01, the suggested price is $1\.01\. If you cancel your listing and a portion of that listing has already been sold, the cancellation is not effective on the portion that has been sold\. Only the unsold portion of the listing is no longer available in the Reserved Instance Marketplace\. **To list a Reserved Instance in the Reserved Instance Marketplace using the AWS Management 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 **Reserved Instances**\. 1. Select the Reserved Instances to list, and choose **Sell Reserved Instances**\. 1. On the **Configure Your Reserved Instance Listing** page, set the number of instances to sell and the upfront price for the remaining term in the relevant columns\. See how the value of your reservation changes over the remainder of the term by selecting the arrow next to the **Months Remaining** column\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
d41468b01371-1
1. If you are an advanced user and you want to customize the pricing, you can enter different values for the subsequent months\. To return to the default linear price drop, choose **Reset**\. 1. Choose **Continue** when you are finished configuring your listing\. 1. Confirm the details of your listing, on the **Confirm Your Reserved Instance Listing** page and if you're satisfied, choose **List Reserved Instance**\. **To view your listings in 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 **Reserved Instances**\. 1. Select the Reserved Instance that you've listed and choose **My Listings**\. **To manage Reserved Instances in the Reserved Instance Marketplace using the AWS CLI** 1. Get a list of your Reserved Instances by using the [describe\-reserved\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-reserved-instances.html) command\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
d41468b01371-2
1. Note the ID of the Reserved Instance you want to list and call [create\-reserved\-instances\-listing](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-reserved-instances-listing.html)\. You must specify the ID of the Reserved Instance, the number of instances, and the pricing schedule\. 1. To view your listing, use the [describe\-reserved\-instances\-listings](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-reserved-instances-listings.html) command\. 1. To cancel your listing, use the [cancel\-reserved\-instances\-listings](https://docs.aws.amazon.com/cli/latest/reference/ec2/cancel-reserved-instances-listings.html) command\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
9b4f018c1816-0
**Listing State** on the **My Listings** tab of the Reserved Instances page displays the current status of your listings: The information displayed by **Listing State** is about the status of your listing in the Reserved Instance Marketplace\. It is different from the status information that is displayed by the **State** column in the **Reserved Instances** page\. This **State** information is about your reservation\. + **active**—The listing is available for purchase\. + **canceled**—The listing is canceled and isn't available for purchase in the Reserved Instance Marketplace\. + **closed**—The Reserved Instance is not listed\. A Reserved Instance might be `closed` because the sale of the listing was completed\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
3b5b550a086d-0
When all the instances in your listing are matched and sold, the **My Listings** tab shows that the **Total instance count** matches the count listed under **Sold**\. Also, there are no **Available** instances left for your listing, and its **Status** is `closed`\. When only a portion of your listing is sold, AWS retires the Reserved Instances in the listing and creates the number of Reserved Instances equal to the Reserved Instances remaining in the count\. So, the listing ID and the listing that it represents, which now has fewer reservations for sale, is still active\. Any future sales of Reserved Instances in this listing are processed this way\. When all the Reserved Instances in the listing are sold, AWS marks the listing as `closed`\. For example, you create a listing *Reserved Instances listing ID 5ec28771\-05ff\-4b9b\-aa31\-9e57dexample* with a listing count of 5\. The **My Listings** tab in the **Reserved Instance** console page displays the listing this way: *Reserved Instance listing ID 5ec28771\-05ff\-4b9b\-aa31\-9e57dexample* + Total reservation count = 5 + Sold = 0 + Available = 5 + Status = active A buyer purchases two of the reservations, which leaves a count of three reservations still available for sale\. Because of this partial sale, AWS creates a new reservation with a count of three to represent the remaining reservations that are still for sale\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
3b5b550a086d-1
This is how your listing looks in the **My Listings** tab: *Reserved Instance listing ID 5ec28771\-05ff\-4b9b\-aa31\-9e57dexample* + Total reservation count = 5 + Sold = 2 + Available = 3 + Status = active If you cancel your listing and a portion of that listing has already sold, the cancelation is not effective on the portion that has been sold\. Only the unsold portion of the listing is no longer available in the Reserved Instance Marketplace\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
fd32395c895e-0
When your Reserved Instance is sold, AWS sends you an email notification\. Each day that there is any kind of activity, you receive one email notification capturing all the activities of the day\. For example, you create or sell a listing, or AWS sends funds to your account\. To track the status of a Reserved Instance listing in the console, choose **Reserved Instance**, **My Listings**\. The **My Listings** tab contains the **Listing State** value\. It also contains information about the term, listing price, and a breakdown of how many instances in the listing are available, pending, sold, and canceled\. You can also use the [describe\-reserved\-instances\-listings](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-reserved-instances-listings.html) command with the appropriate filter to obtain information about your listings\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
5aba486063fd-0
As soon as AWS receives funds from the buyer, a message is sent to the registered owner account email for the sold Reserved Instance\. AWS sends an Automated Clearing House \(ACH\) wire transfer to your specified bank account\. Typically, this transfer occurs between one to three days after your Reserved Instance has been sold\. Disbursements take place once a day\. You will receive an email with a disbursement report after the funds are released\. Keep in mind that you can't receive disbursements until AWS receives verification from your bank\. This can take up to two weeks\. The Reserved Instance that you sold continues to appear when you describe your Reserved Instances\. You receive a cash disbursement for your Reserved Instances through a wire transfer directly into your bank account\. AWS charges a service fee of 12 percent of the total upfront price of each Reserved Instance you sell in the Reserved Instance Marketplace\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
ec01f1aff3d3-0
When you sell in the Reserved Instance Marketplace, AWS shares your company’s legal name on the buyer’s statement in accordance with US regulations\. In addition, if the buyer calls AWS Support because the buyer needs to contact you for an invoice or for some other tax\-related reason, AWS may need to provide the buyer with your email address so that the buyer can contact you directly\. For similar reasons, the buyer's ZIP code and country information are provided to the seller in the disbursement report\. As a seller, you might need this information to accompany any necessary transaction taxes that you remit to the government \(such as sales tax and value\-added tax\)\. AWS cannot offer tax advice, but if your tax specialist determines that you need specific additional information, [contact AWS Support](https://aws.amazon.com/contact-us/)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
18238edd8633-0
You can purchase Reserved Instances from third\-party sellers who own Reserved Instances that they no longer need from the Reserved Instance Marketplace\. You can do this using the Amazon EC2 console or a command line tool\. The process is similar to purchasing Reserved Instances from AWS\. For more information, see [Buying Reserved Instances](ri-market-concepts-buying.md)\. There are a few differences between Reserved Instances purchased in the Reserved Instance Marketplace and Reserved Instances purchased directly from AWS: + **Term**—Reserved Instances that you purchase from third\-party sellers have less than a full standard term remaining\. Full standard terms from AWS run for one year or three years\. + **Upfront price**—Third\-party Reserved Instances can be sold at different upfront prices\. The usage or recurring fees remain the same as the fees set when the Reserved Instances were originally purchased from AWS\. + **Types of Reserved Instances**—Only Amazon EC2 Standard Reserved Instances can be purchased from the Reserved Instance Marketplace\. Convertible Reserved Instances, Amazon RDS and Amazon ElastiCache Reserved Instances are not available for purchase on the Reserved Instance Marketplace\. Basic information about you is shared with the seller, for example, your ZIP code and country information\. This information enables sellers to calculate any necessary transaction taxes that they have to remit to the government \(such as sales tax or value\-added tax\) and is provided as a disbursement report\. In rare circumstances, AWS might have to provide the seller with your email address, so that they can contact you regarding questions related to the sale \(for example, tax questions\)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
18238edd8633-1
For similar reasons, AWS shares the legal entity name of the seller on the buyer's purchase invoice\. If you need additional information about the seller for tax or related reasons, contact [AWS Support](https://aws.amazon.com/contact-us/)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/ri-market-general.md
03ac0c704baf-0
To use Spot Instances, you create a Spot Instance request that includes the desired number of instances, the instance type, the Availability Zone, and the maximum price that you are willing to pay per instance hour\. If your maximum price exceeds the current Spot price, Amazon EC2 fulfills your request immediately if capacity is available\. Otherwise, Amazon EC2 waits until your request can be fulfilled or until you cancel the request\. The following illustration shows how Spot requests work\. Notice that the request type \(one\-time or persistent\) determines whether the request is opened again when Amazon EC2 interrupts a Spot Instance or if you stop a Spot Instance\. If the request is persistent, the request is opened again after your Spot Instance is interrupted\. If the request is persistent and you stop your Spot Instance, the request only opens after you start your Spot Instance\. ![\[How Spot Instance requests work\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/images/spot_lifecycle.png) **Topics** + [Spot Instance request states](#creating-spot-request-status) + [Defining a duration for your Spot Instances](#fixed-duration-spot-instances) + [Specifying a tenancy for your Spot Instances](#spot-instance-tenancy) + [Service\-linked role for Spot Instance requests](#service-linked-roles-spot-instance-requests) + [Creating a Spot Instance request](#using-spot-instances-request) + [Finding running Spot Instances](#using-spot-instances-running)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
03ac0c704baf-1
+ [Finding running Spot Instances](#using-spot-instances-running) + [Tagging Spot Instance requests](#concepts-spot-instances-request-tags) + [Canceling a Spot Instance request](#using-spot-instances-cancel) + [Stopping a Spot Instance](#stopping-a-spot-instance) + [Starting a Spot Instance](#starting-a-spot-instance) + [Terminating a Spot Instance](#terminating-a-spot-instance) + [Spot Instance request example launch specifications](spot-request-examples.md)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
1a2ba2810151-0
A Spot Instance request can be in one of the following states: + `open` – The request is waiting to be fulfilled\. + `active` – The request is fulfilled and has an associated Spot Instance\. + `failed` – The request has one or more bad parameters\. + `closed` – The Spot Instance was interrupted or terminated\. + `disabled` – You stopped the Spot Instance\. + `cancelled` – You canceled the request, or the request expired\. The following illustration represents the transitions between the request states\. Notice that the transitions depend on the request type \(one\-time or persistent\)\. ![\[Spot Instance request states\]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/images/spot_request_states.png) A one\-time Spot Instance request remains active until Amazon EC2 launches the Spot Instance, the request expires, or you cancel the request\. If the Spot price exceeds your maximum price or capacity is not available, your Spot Instance is terminated and the Spot Instance request is closed\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
1a2ba2810151-1
A persistent Spot Instance request remains active until it expires or you cancel it, even if the request is fulfilled\. If the Spot price exceeds your maximum price or capacity is not available, your Spot Instance is interrupted\. After your instance is interrupted, when your maximum price exceeds the Spot price or capacity becomes available again, the Spot Instance is started if stopped or resumed if hibernated\. You can stop a Spot Instance and start it again if capacity is available and your maximum price exceeds the current Spot price\. If the Spot Instance is terminated \(irrespective of whether the Spot Instance is in a stopped or running state\), the Spot Instance request is opened again and Amazon EC2 launches a new Spot Instance\. For more information, see [Stopping a Spot Instance](#stopping-a-spot-instance), [Starting a Spot Instance](#starting-a-spot-instance), and [Terminating a Spot Instance](#terminating-a-spot-instance)\. You can track the status of your Spot Instance requests, as well as the status of the Spot Instances launched, through the status\. For more information, see [Spot request status](spot-request-status.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
a7f8d6c16324-0
Spot Instances with a defined duration \(also known as Spot blocks\) are designed not to be interrupted and will run continuously for the duration you select\. This makes them ideal for jobs that take a finite time to complete, such as batch processing, encoding and rendering, modeling and analysis, and continuous integration\. You can use a duration of 1, 2, 3, 4, 5, or 6 hours\. The price that you pay depends on the specified duration\. To view the current prices for a 1\-hour duration or a 6\-hour duration, see [Spot Instance Prices](https://aws.amazon.com/ec2/spot/pricing/#Spot_Instance_Prices)\. You can use these prices to estimate the cost of the 2, 3, 4, and 5\-hour durations\. When a request with a duration is fulfilled, the price for your Spot Instance is fixed, and this price remains in effect until the instance terminates\. You are billed at this price for each hour or partial hour that the instance is running\. A partial instance hour is billed to the nearest second\. When you define a duration in your Spot request, the duration period for each Spot Instance starts as soon as the instance receives its instance ID\. The Spot Instance runs until you terminate it or the duration period ends\. At the end of the duration period, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two\-minute warning before it terminates\. In rare situations, Spot blocks may be interrupted due to Amazon EC2 capacity needs\. In these cases, we provide a two\-minute warning before we terminate an instance, and you are not charged for the terminated instances even if you used them\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
a7f8d6c16324-1
**To launch Spot Instances with a defined duration \(console\)** Follow the [Creating a Spot Fleet request](spot-fleet-requests.md#create-spot-fleet) procedure\. To launch Spot Instances with a defined duration, for **Tell us your application or task need**, choose **Defined duration workloads**\. **To launch Spot Instances with a defined duration \(AWS CLI\)** To specify a duration for your Spot Instances, include the `--block-duration-minutes` option with the [request\-spot\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/request-spot-instances.html) command\. For example, the following command creates a Spot request that launches Spot Instances that run for two hours\. ``` aws ec2 request-spot-instances \ --instance-count 5 \ --block-duration-minutes 120 \ --type "one-time" \ --launch-specification file://specification.json ``` **To retrieve the cost for Spot Instances with a defined duration \(AWS CLI\)** Use the [describe\-spot\-instance\-requests](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-spot-instance-requests.html) command to retrieve the fixed cost for your Spot Instances with a specified duration\. The information is in the `actualBlockHourlyPrice` field\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
af4a57e9573b-0
You can run a Spot Instance on single\-tenant hardware\. Dedicated Spot Instances are physically isolated from instances that belong to other AWS accounts\. For more information, see [Dedicated Instances](dedicated-instance.md) and the [Amazon EC2 Dedicated Instances](https://aws.amazon.com/ec2/purchasing-options/dedicated-instances/) product page\. To run a Dedicated Spot Instance, do one of the following: + Specify a tenancy of `dedicated` when you create the Spot Instance request\. For more information, see [Creating a Spot Instance request](#using-spot-instances-request)\. + Request a Spot Instance in a VPC with an instance tenancy of `dedicated`\. For more information, see [Creating a VPC with an Instance Tenancy of Dedicated](dedicated-instance.md#creatingdedicatedvpc)\. You cannot request a Spot Instance with a tenancy of `default` if you request it in a VPC with an instance tenancy of `dedicated`\. The following instance types support Dedicated Spot Instances\. **Current generation** + `c4.8xlarge` + `d2.8xlarge` + `i3.16xlarge` + `m4.10xlarge` + `m4.16xlarge` + `p2.16xlarge` + `r4.16xlarge` + `x1.32xlarge` **Previous generation** + `c3.8xlarge`
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
af4a57e9573b-1
+ `x1.32xlarge` **Previous generation** + `c3.8xlarge` + `cc2.8xlarge` + `cr1.8xlarge` + `g2.8xlarge` + `i2.8xlarge` + `r3.8xlarge`
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
723268446c30-0
Amazon EC2 uses service\-linked roles for the permissions that it requires to call other AWS services on your behalf\. A service\-linked role is a unique type of IAM role that is linked directly to an AWS service\. Service\-linked roles provide a secure way to delegate permissions to AWS services because only the linked service can assume a service\-linked role\. 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 **AWSServiceRoleForEC2Spot** to launch and manage Spot Instances on your behalf\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
0cf93a936ec4-0
Amazon EC2 uses **AWSServiceRoleForEC2Spot** to complete the following actions: + `ec2:DescribeInstances` – Describe Spot Instances + `ec2:StopInstances` – Stop Spot Instances + `ec2:StartInstances` – Start Spot Instances
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
59f85ab96631-0
Under most circumstances, you don't need to manually create a service\-linked role\. Amazon EC2 creates the **AWSServiceRoleForEC2Spot** service\-linked role the first time you request a Spot Instance using the console\. If you had an active Spot Instance request before October 2017, when Amazon EC2 began supporting this service\-linked role, Amazon EC2 created the **AWSServiceRoleForEC2Spot** 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*\. Ensure that this role exists before you use the AWS CLI or an API to request a Spot Instance\. To create the role, use the IAM console as follows\. **To manually create the AWSServiceRoleForEC2Spot service\-linked role** 1. Open the IAM console at [https://console\.aws\.amazon\.com/iam/](https://console.aws.amazon.com/iam/)\. 1. In the navigation pane, choose **Roles**\. 1. Choose **Create role**\. 1. On the **Select type of trusted entity** page, choose **EC2**, **EC2 \- Spot Instances**, **Next: Permissions**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
59f85ab96631-1
1. On the next page, choose **Next:Review**\. 1. On the **Review** page, choose **Create role**\. If you no longer need to use Spot Instances, we recommend that you delete the **AWSServiceRoleForEC2Spot** role\. After this role is deleted from your account, Amazon EC2 will create the role again if you request Spot Instances\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
c4fe22f7dfce-0
If you specify an [encrypted AMI](AMIEncryption.md) or an [encrypted Amazon EBS snapshot](EBSEncryption.md) for your Spot Instances and you use a customer managed customer master key \(CMK\) for encryption, you must grant the **AWSServiceRoleForEC2Spot** role permission to use the CMK so that Amazon EC2 can launch Spot Instances on your behalf\. To do this, you must add a grant to the CMK, as shown in the following procedure\. When providing permissions, grants are an alternative to key policies\. For more information, see [Using Grants](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html) and [Using Key Policies in AWS KMS](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) in the *AWS Key Management Service Developer Guide*\. **To grant the AWSServiceRoleForEC2Spot role permissions to use the CMK**
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
c4fe22f7dfce-1
**To grant the AWSServiceRoleForEC2Spot role permissions to use the CMK** + Use the [create\-grant](https://docs.aws.amazon.com/cli/latest/reference/kms/create-grant.html) command to add a grant to the CMK and to specify the principal \(the **AWSServiceRoleForEC2Spot** service\-linked role\) that is given permission to perform the operations that the grant permits\. The CMK is specified by the `key-id` parameter and the ARN of the CMK\. The principal is specified by the `grantee-principal` parameter and the ARN of the **AWSServiceRoleForEC2Spot** service\-linked role\. ``` aws kms create-grant \ --region us-east-1 \ --key-id arn:aws:kms:us-east-1:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab \ --grantee-principal arn:aws:iam::111122223333:role/AWSServiceRoleForEC2Spot \ --operations "Decrypt" "Encrypt" "GenerateDataKey" "GenerateDataKeyWithoutPlaintext" "CreateGrant" "DescribeKey" "ReEncryptFrom" "ReEncryptTo" ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
d4d30d6df035-0
The procedure for requesting a Spot Instance is similar to the procedure for launching an On\-Demand Instance\. You can request a Spot Instance in the following ways: + To request a Spot Instance using the console, use the launch instance wizard\. For more information, see [To create a Spot Instance request \(console\)](#create-spot-instance-request-console-procedure)\. + To request a Spot Instance using the CLI, use the [request\-spot\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/request-spot-instances.html) command or the [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) command\. For more information, see [To create a Spot Instance request using request-spot-instances (AWS CLI)](#create-spot-request-request-spot-instances) and [To create a Spot Instance request using run-instances (AWS CLI)](#create-spot-request-run-instances)\. + To request a Spot Instance with a defined duration using the console, follow the [Creating a Spot Fleet request](spot-fleet-requests.md#create-spot-fleet) procedure\. For **Tell us your application or task need**, choose **Defined duration workloads**\. For more information, see [Defining a duration for your Spot Instances](#fixed-duration-spot-instances)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
d4d30d6df035-1
+ To request a Spot Instance with a defined duration using the CLI, use the [request\-spot\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/request-spot-instances.html) command and specify the `--block-duration-minutes` parameter\. For more information, see [Defining a duration for your Spot Instances](#fixed-duration-spot-instances)\. After you've submitted your Spot Instance request, you can't change the parameters of the request\. This means that you can't make changes to the maximum price that you're willing to pay\. If you request multiple Spot Instances at one time, Amazon EC2 creates separate Spot Instance requests so that you can track the status of each request separately\. For more information about tracking Spot Instance requests, see [Spot request status](spot-request-status.md)\. To launch a fleet that includes Spot Instances and On\-Demand Instances, see [Creating a Spot Fleet request](spot-fleet-requests.md#create-spot-fleet)\. **Note** You can't launch a Spot Instance and an On\-Demand Instance in the same call using the launch instance wizard or the [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) command\. **Prerequisites**
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
d4d30d6df035-2
**Prerequisites** Before you begin, decide on your maximum price, how many Spot Instances you'd like, and what instance type to use\. To review Spot price trends, see [Spot Instance pricing history](using-spot-instances-history.md)\.<a name="create-spot-instance-request-console-procedure"></a> **To create a Spot Instance request \(console\)** 1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\. 1. In the navigation bar at the top of the screen, select a Region\. 1. From the Amazon EC2 console dashboard, choose **Launch Instance**\. 1. On the **Choose an Amazon Machine Image \(AMI\)** page, choose an AMI\. For more information, see [Step 1: Choose an Amazon Machine Image \(AMI\)](launching-instance.md#step-1-AMI)\. 1. On the **Choose an Instance Type** page, select the hardware configuration and size of the instance to launch, and then choose **Next: Configure Instance Details**\. For more information, see [Step 2: Choose an Instance Type](launching-instance.md#choose-an-instance-type-page)\. 1. On the **Configure Instance Details** page, configure the Spot Instance request as follows:
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
d4d30d6df035-3
1. On the **Configure Instance Details** page, configure the Spot Instance request as follows: + **Number of instances**: Enter the number of instances to launch\. **Note** Amazon EC2 creates a separate request for each Spot Instance\. + \(Optional\) To help ensure that you maintain the correct number of instances to handle demand on your application, you can choose **Launch into Auto Scaling Group** to create a launch configuration and an Auto Scaling group\. Auto Scaling scales the number of instances in the group according to your specifications\. For more information, see the [Amazon EC2 Auto Scaling User Guide](https://docs.aws.amazon.com/autoscaling/ec2/userguide/)\. + **Purchasing option**: Choose **Request Spot instances** to launch a Spot Instance\. When you choose this option, the following fields appear\. + **Current price**: The current Spot price in each Availability Zone is displayed for the instance type that you selected\. + \(Optional\) **Maximum price**: You can leave the field empty, or you can specify the maximum amount you're willing to pay\. + If you leave the field empty, then the maximum price defaults to the current On\-Demand price\. Your Spot Instance launches at the current Spot price, not exceeding the On\-Demand price\. + If you specify a maximum price that is more than the current Spot Price, your Spot Instance launches and is charged at the current Spot price\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
d4d30d6df035-4
+ If you specify a maximum price that is more than the current Spot Price, your Spot Instance launches and is charged at the current Spot price\. + If you specify a maximum price that is lower than the Spot price, your Spot Instance is not launched\. + **Persistent request**: Choose **Persistent request** to resubmit the Spot Instance request if your Spot Instance is interrupted\. + **Interruption behavior**: By default, the Spot service terminates a Spot Instance when it is interrupted\. If you choose **Persistent request**, you can then specify that the Spot service stops or hibernates your Spot Instance when it's interrupted\. For more information, see [Interruption behaviors](spot-interruptions.md#interruption-behavior)\. + \(Optional\) **Request valid to**: Choose **Edit** to specify when the Spot Instance request expires\. For more information about configuring your Spot Instance, see [Step 3: Configure Instance Details](launching-instance.md#configure_instance_details_step)\. 1. The AMI you selected includes one or more volumes of storage, including the root device volume\. On the **Add Storage** page, you can specify additional volumes to attach to the instance by choosing **Add New Volume**\. For more information, see [Step 4: Add Storage](launching-instance.md#step-4-add-storage)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
d4d30d6df035-5
1. On the **Add Tags** page, specify [tags](Using_Tags.md) by providing key and value combinations\. For more information, see [Step 5: Add Tags](launching-instance.md#step-5-add-tags)\. 1. On the **Configure Security Group** page, use a security group to define firewall rules for your instance\. These rules specify which incoming network traffic is delivered to your instance\. All other traffic is ignored\. \(For more information about security groups, see [Amazon EC2 security groups for Linux instances](ec2-security-groups.md)\.\) Select or create a security group, and then choose **Review and Launch**\. For more information, see [Step 6: Configure Security Group](launching-instance.md#step-6-configure-security-group)\. 1. On the **Review Instance Launch** page, check the details of your instance, and make any necessary changes by choosing the appropriate **Edit** link\. When you are ready, choose **Launch**\. For more information, see [Step 7: Review Instance Launch and Select Key Pair](launching-instance.md#step-7-review-instance-launch)\. 1. In the **Select an existing key pair or create a new key pair** dialog box, you can choose an existing key pair, or create a new one\. For example, choose **Choose an existing key pair**, then select the key pair that you created when getting set up\. For more information, see [Amazon EC2 key pairs and Linux instances](ec2-key-pairs.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
d4d30d6df035-6
**Important** If you choose the **Proceed without key pair** option, you won't be able to connect to the instance unless you choose an AMI that is configured to allow users another way to log in\. 1. To launch your instance, select the acknowledgment check box, then choose **Launch Instances**\. If the instance fails to launch or the state immediately goes to `terminated` instead of `running`, see [Troubleshooting instance launch issues](troubleshooting-launch.md)\. **To create a Spot Instance request using [request\-spot\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/request-spot-instances.html) \(AWS CLI\)** Use the [request\-spot\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/request-spot-instances.html) command to create a one\-time request\. ``` aws ec2 request-spot-instances \ --instance-count 5 \ --type "one-time" \ --launch-specification file://specification.json ``` Use the [request\-spot\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/request-spot-instances.html) command to create a persistent request\. ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
d4d30d6df035-7
``` aws ec2 request-spot-instances \ --instance-count 5 \ --type "persistent" \ --launch-specification file://specification.json ``` For example launch specification files to use with these commands, see [Spot Instance request example launch specifications](spot-request-examples.md)\. If you download a launch specification file from the console, you must use the [request\-spot\-fleet](https://docs.aws.amazon.com/cli/latest/reference/ec2/request-spot-fleet.html) command instead \(the console specifies a Spot request using a Spot Fleet\)\. **To create a Spot Instance request using [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) \(AWS CLI\)** Use the [run\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/request-spot-instances.html) command and specify the Spot Instance options in the `--instance-market-options` parameter\. ``` aws ec2 run-instances \ --image-id ami-0abcdef1234567890 \ --instance-type t2.micro \ --instance-count 5 \ --subnet-id subnet-08fc749671b2d077c \
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
d4d30d6df035-8
--instance-count 5 \ --subnet-id subnet-08fc749671b2d077c \ --key-name MyKeyPair \ --security-group-ids sg-0b0384b66d7d692f9 \ --instance-market-options file://spot-options.json ``` The following is the data structure to specify in the JSON file for `--instance-market-options`\. You can also specify `BlockDurationMinutes`, `ValidUntil`, and `InstanceInterruptionBehavior`\. If you do not specify a field in the data structure, the default value is used\. This example creates a `one-time` request and specifies `0.02` as the maximum price you're willing to pay for the Spot Instance\. ``` { "MarketType": "spot", "SpotOptions": { "MaxPrice": "0.02", "SpotInstanceType": "one-time" } } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
3c7eaf13d472-0
Amazon EC2 launches a Spot Instance when the maximum price exceeds the Spot price and capacity is available\. A Spot Instance runs until it is interrupted or you terminate it yourself\. If your maximum price is exactly equal to the Spot price, there is a chance that your Spot Instance remains running, depending on demand\. **To find running Spot Instances \(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 **Spot Requests**\. You can see both Spot Instance requests and Spot Fleet requests\. If a Spot Instance request has been fulfilled, **Capacity** is the ID of the Spot Instance\. For a Spot Fleet, **Capacity** indicates how much of the requested capacity has been fulfilled\. To view the IDs of the instances in a Spot Fleet, choose the expand arrow, or select the fleet and choose **Instances**\. **Note** For Spot Instance requests that are created by a Spot Fleet, the requests are not tagged instantly with the system tag that indicates the Spot Fleet to which they belong, and for a period of time may appear separate from Spot Fleet request\. Alternatively, in the navigation pane, choose **Instances**\. In the top right corner, choose the **Show/Hide** icon, and then under **Instance Attributes**, select **Lifecycle**\. For each instance, **Lifecycle** is either `normal`, `spot`, or `scheduled`\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
3c7eaf13d472-1
**To find running Spot Instances \(AWS CLI\)** To enumerate your Spot Instances, use the [describe\-spot\-instance\-requests](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-spot-instance-requests.html) command with the `--query` option\. ``` aws ec2 describe-spot-instance-requests \ --query "SpotInstanceRequests[*].{ID:InstanceId}" ``` The following is example output: ``` [ { "ID": "i-1234567890abcdef0" }, { "ID": "i-0598c7d356eba48d7" } ] ``` Alternatively, you can enumerate your Spot Instances using the [describe\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html) command with the `--filters` option\. ``` aws ec2 describe-instances \ --filters "Name=instance-lifecycle,Values=spot" ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
3c7eaf13d472-2
aws ec2 describe-instances \ --filters "Name=instance-lifecycle,Values=spot" ``` To describe a single Spot Instance instance, use the [describe\-spot\-instance\-requests](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-spot-instance-requests.html) command with the `--spot-instance-request-ids` option\. ``` aws ec2 describe-spot-instance-requests \ --spot-instance-request-ids sir-08b93456 ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
2e8f0ca75dde-0
To help categorize and manage your Spot Instance requests, you can tag them with custom metadata\. You can assign a tag to a Spot Instance request when you create it, or afterward\. You can assign tags using the Amazon EC2 console or a command line tool\. When you tag a Spot Instance request, the instances and volumes that are launched by the Spot Instance request are not automatically tagged\. You need to explicitly tag the instances and volumes launched by the Spot Instance request\. You can assign a tag to a Spot Instance and volumes during launch, or afterward\. For more information about how tags work, see [Tagging your Amazon EC2 resources](Using_Tags.md)\. **Topics** + [Prerequisites](#tag-spot-request-prereqs) + [Tagging a new Spot Instance request](#tag-new-spot-instance-request) + [Tagging an existing Spot Instance request](#tag-existing-spot-instance-request) + [Viewing Spot Instance request tags](#view-spot-instance-request-tags)
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
03466f2c47de-0
Grant the IAM user the permission to tag resources\. For more information about IAM policies and example policies, see [Example: Tagging resources](ExamplePolicies_EC2.md#iam-example-taggingresources)\. The IAM policy you create is determined by which method you use for creating a Spot Instance request\. + If you use the launch instance wizard or `run-instances` to request Spot Instances, see [To grant an IAM user the permission to tag resources when using the launch instance wizard or run-instances](#iam-run-instances)\. + If you use the Spot console to request Spot Instances with a defined duration or use the `request-spot-instances` command to request Spot Instances, see [To grant an IAM user the permission to tag resources when using request-spot-instances](#iam-request-spot-instances)\. **To grant an IAM user the permission to tag resources when using the launch instance wizard or run\-instances** Create a IAM policy that includes the following: + The `ec2:RunInstances` action\. This grants the IAM user permission to launch an instance\. + For `Resource`, specify `spot-instances-request`\. This allows users to create Spot Instance requests, which request Spot Instances\. + The `ec2:CreateTags` action\. This grants the IAM user permission to create tags\. + For `Resource`, specify `*`\. This allows users to tag all resources that are created during instance launch\. ``` {
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
03466f2c47de-1
``` { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLaunchInstances", "Effect": "Allow", "Action": [ "ec2:RunInstances" ], "Resource": [ "arn:aws:ec2:us-east-1::image/*", "arn:aws:ec2:us-east-1:*:subnet/*", "arn:aws:ec2:us-east-1:*:network-interface/*", "arn:aws:ec2:us-east-1:*:security-group/*", "arn:aws:ec2:us-east-1:*:key-pair/*", "arn:aws:ec2:us-east-1:*:volume/*", "arn:aws:ec2:us-east-1:*:instance/*", "arn:aws:ec2:us-east-1:*:spot-instances-request/*" ] }, { "Sid": "TagSpotInstanceRequests", "Effect": "Allow", "Action": "ec2:CreateTags",
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
03466f2c47de-2
"Effect": "Allow", "Action": "ec2:CreateTags", "Resource": "*" } ] } ``` **Note** When you use the RunInstances action to create Spot Instance requests and tag the Spot Instance requests on create, you need to be aware of how Amazon EC2 evaluates the `spot-instances-request` resource in the RunInstances statement\. The `spot-instances-request` resource is evaluated in the IAM policy as follows: If you don't tag a Spot Instance request on create, Amazon EC2 does not evaluate the `spot-instances-request` resource in the RunInstances statement\. If you tag a Spot Instance request on create, Amazon EC2 evaluates the `spot-instances-request` resource in the RunInstances statement\. Therefore, for the `spot-instances-request` resource, the following rules apply to the IAM policy: If you use RunInstances to create a Spot Instance request and you don't intend to tag the Spot Instance request on create, you don’t need to explicitly allow the `spot-instances-request` resource; the call will succeed\. If you use RunInstances to create a Spot Instance request and intend to tag the Spot Instance request on create, you must include the `spot-instances-request` resource in the RunInstances allow statement, otherwise the call will fail\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
03466f2c47de-3
If you use RunInstances to create a Spot Instance request and intend to tag the Spot Instance request on create, you must specify the `spot-instances-request` resource or include a `*` wildcard in the CreateTags allow statement, otherwise the call will fail\. For example IAM policies, including policies that are not supported for Spot Instance requests, see [Working with Spot Instances](ExamplePolicies_EC2.md#iam-example-spot-instances)\. **To grant an IAM user the permission to tag resources when using request\-spot\-instances** Create a IAM policy that includes the following: + The `ec2:RequestSpotInstances` action\. This grants the IAM user permission to create a Spot Instance request\. + The `ec2:CreateTags` action\. This grants the IAM user permission to create tags\. + For `Resource`, specify `spot-instances-request`\. This allows users to tag only the Spot Instance request\. ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "TagSpotInstanceRequest", "Effect": "Allow", "Action": [ "ec2:RequestSpotInstances", "ec2:CreateTags" ], "Resource": "arn:aws:ec2:us-east-1:111122223333:spot-instances-request/*"
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
03466f2c47de-4
"Resource": "arn:aws:ec2:us-east-1:111122223333:spot-instances-request/*" } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
f77293e12c0a-0
**To tag a new Spot Instance request using the console** 1. Follow the [Creating a Spot Instance request](#using-spot-instances-request) procedure\. 1. To add a tag, on the **Add Tags** page, choose **Add Tag**, and enter the key and value for the tag\. Choose **Add another tag** for each additional tag\. For each tag, you can tag the Spot Instance request, the Spot Instances, and the volumes with the same tag\. To tag all three, ensure that **Instances**, **Volumes**, and **Spot Instance Requests** are selected\. To tag only one or two, ensure that the resources you want to tag are selected, and the other resources are cleared\. 1. Complete the required fields to create a Spot Instance request, and then choose **Launch**\. For more information, see [Creating a Spot Instance request](#using-spot-instances-request)\. **To tag a new Spot Instance request using the AWS CLI** To tag a Spot Instance request when you create it, configure the Spot Instance request configuration as follows: + Specify the tags for the Spot Instance request using the `--tag-specification` parameter\. + For `ResourceType`, specify `spot-instances-request`\. If you specify another value, the Spot Instance request will fail\. + For `Tags`, specify the key\-value pair\. You can specify more than one key\-value pair\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
f77293e12c0a-1
+ For `Tags`, specify the key\-value pair\. You can specify more than one key\-value pair\. In the following example, the Spot Instance request is tagged with two tags: Key=Environment and Value=Production, and Key=Cost\-Center and Value=123\. ``` aws ec2 request-spot-instances \ --instance-count 5 \ --type "one-time" \ --launch-specification file://specification.json \ --tag-specification 'ResourceType=spot-instances-request,Tags=[{Key=Environment,Value=Production},{Key=Cost-Center,Value=123}]' ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
38d015cd3a73-0
**To tag an existing Spot Instance request using the console** After you have created a Spot Instance request, you can add tags to the Spot Instance request using the console\. 1. Open the Spot console at [https://console\.aws\.amazon\.com/ec2spot](https://console.aws.amazon.com/ec2spot)\. 1. Select your Spot Instance request\. 1. Choose the **Tags** tab and choose **Create Tag**\. **To tag an existing Spot Instance using the console** After your Spot Instance request has launched your Spot Instance, you can add tags to the instance using the console\. For more information, see [Adding and deleting tags on an individual resource](Using_Tags.md#adding-or-deleting-tags)\. **To tag an existing Spot Instance request or Spot Instance using the AWS CLI** Use the [create\-tags](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-tags.html) command to tag existing resources\. In the following example, the existing Spot Instance request and the Spot Instance are tagged with Key=purpose and Value=test\. ``` aws ec2 create-tags \ --resources sir-08b93456 i-1234567890abcdef0 \ --tags Key=purpose,Value=test ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
ba6fd3807b75-0
**To view Spot Instance request tags using the console** 1. Open the Spot console at [https://console\.aws\.amazon\.com/ec2spot](https://console.aws.amazon.com/ec2spot)\. 1. Select your Spot Instance request and choose the **Tags** tab\. **To describe Spot Instance request tags** Use the [describe\-tags](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-tags.html) command to view the tags for the specified resource\. In the following example, you describe the tags for the specified request\. ``` aws ec2 describe-tags \ --filters "Name=resource-id,Values=sir-11112222-3333-4444-5555-66666EXAMPLE" ``` ``` { "Tags": [ { "Key": "Environment", "ResourceId": "sir-11112222-3333-4444-5555-66666EXAMPLE", "ResourceType": "spot-instances-request", "Value": "Production" }, { "Key": "Another key", "ResourceId": "sir-11112222-3333-4444-5555-66666EXAMPLE",
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
ba6fd3807b75-1
"ResourceId": "sir-11112222-3333-4444-5555-66666EXAMPLE", "ResourceType": "spot-instances-request", "Value": "Another value" } ] } ``` You can also view the tags of a Spot Instance request by describing the Spot Instance request\. Use the [describe\-spot\-instance\-requests](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-spot-instance-requests.html) command to view the configuration of the specified Spot Instance request, which includes any tags that were specified for the request\. ``` aws ec2 describe-spot-instance-requests \ --spot-instance-request-ids sir-11112222-3333-4444-5555-66666EXAMPLE ``` ``` { "SpotInstanceRequests": [ { "CreateTime": "2020-06-24T14:22:11+00:00", "InstanceId": "i-1234567890EXAMPLE", "LaunchSpecification": { "SecurityGroups": [ { "GroupName": "launch-wizard-6", "GroupId": "sg-1234567890EXAMPLE"
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
ba6fd3807b75-2
"GroupName": "launch-wizard-6", "GroupId": "sg-1234567890EXAMPLE" } ], "BlockDeviceMappings": [ { "DeviceName": "/dev/xvda", "Ebs": { "DeleteOnTermination": true, "VolumeSize": 8, "VolumeType": "gp2" } } ], "ImageId": "ami-1234567890EXAMPLE", "InstanceType": "t2.micro", "KeyName": "my-key-pair", "NetworkInterfaces": [ { "DeleteOnTermination": true, "DeviceIndex": 0, "SubnetId": "subnet-11122233" } ], "Placement": { "AvailabilityZone": "eu-west-1c", "Tenancy": "default" }, "Monitoring": { "Enabled": false } }, "LaunchedAvailabilityZone": "eu-west-1c", "ProductDescription": "Linux/UNIX",
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
ba6fd3807b75-3
"LaunchedAvailabilityZone": "eu-west-1c", "ProductDescription": "Linux/UNIX", "SpotInstanceRequestId": "sir-1234567890EXAMPLE", "SpotPrice": "0.012600", "State": "active", "Status": { "Code": "fulfilled", "Message": "Your spot request is fulfilled.", "UpdateTime": "2020-06-25T18:30:21+00:00" }, "Tags": [ { "Key": "Environment", "Value": "Production" }, { "Key": "Another key", "Value": "Another value" } ], "Type": "one-time", "InstanceInterruptionBehavior": "terminate" } ] } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
47bf79b04b5f-0
If you no longer want your Spot Instance request, you can cancel it\. You can only cancel Spot Instance requests that are `open`, `active`, or `disabled`\. + Your Spot Instance request is `open` when your request has not yet been fulfilled and no instances have been launched\. + Your Spot Instance request is `active` when your request has been fulfilled and Spot Instances have launched as a result\. + Your Spot Instance request is `disabled` when you stop your Spot Instance\. If your Spot Instance request is `active` and has an associated running Spot Instance, canceling the request does not terminate the instance\. For more information about terminating a Spot Instance, see [Terminating a Spot Instance](#terminating-a-spot-instance)\. **To cancel a Spot Instance request \(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 **Spot Requests** and select the Spot request\. 1. Choose **Actions**, **Cancel request**\. 1. \(Optional\) If you are finished with the associated Spot Instances, you can terminate them\. In the **Cancel Spot request** dialog box, select **Terminate instances**, and then choose **Confirm**\. **To cancel a Spot Instance request \(AWS CLI\)**
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
47bf79b04b5f-1
**To cancel a Spot Instance request \(AWS CLI\)** + Use the [cancel\-spot\-instance\-requests](https://docs.aws.amazon.com/cli/latest/reference/ec2/cancel-spot-instance-requests.html) command to cancel the specified Spot request\. ``` aws ec2 cancel-spot-instance-requests --spot-instance-request-ids sir-08b93456 ```
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md
ec69281896e3-0
If you don’t need your Spot Instances now, but you want to restart them later without losing the data persisted in the Amazon EBS volume, you can stop them\. The steps for stopping a Spot Instance are similar to the steps for stopping an On\-Demand Instance\. You can only stop a Spot Instance if the Spot Instance was launched from a `persistent` Spot Instance request\. **Note** While a Spot Instance is stopped, you can modify some of its instance attributes, but not the instance type\. We don't charge usage for a stopped Spot Instance, or data transfer fees, but we do charge for the storage for any Amazon EBS volumes\. **Limitations** + You can't stop a Spot Instance if it is part of a fleet or launch group, Availability Zone group, or Spot block\. **To stop a Spot 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, choose **Instances** and select the Spot Instance\. 1. Choose **Actions**, **Instance State**, **Stop**\. **To stop a Spot Instance \(AWS CLI\)** + Use the [stop\-instances](https://docs.aws.amazon.com/cli/latest/reference/ec2/stop-instances.html) command to manually stop one or more Spot Instances\.
https://github.com/siagholami/aws-documentation/tree/main/documents/amazon-ec2-user-guide/doc_source/spot-requests.md