

# Snapshots in Amazon Lightsail
<a name="understanding-snapshots-in-amazon-lightsail"></a>

You can create point-in-time snapshots of instances, databases, and block storage disks in Amazon Lightsail, and use them as baselines to create new resources or for data backup. A snapshot contains all of the data that is needed to restore your resource (from the moment when the snapshot was taken). When you restore a resource by creating it from a snapshot, the new resource begins as an exact replica of the original resource that was used to create the snapshot. You will be billed a [snapshot storage fee](https://aws.amazon.com/lightsail/pricing/) for snapshots on your Lightsail account; whether they are manual snapshots, automatic snapshots, copied snapshots, or system disk snapshots. If you experience data corruption or a disk failure, you can create a disk from a snapshot that you have taken and replace the old disk. You can also use snapshots to provision new disks and attach them during a new instance launch.

*Contents*
+ [Manual snapshots](#manual-snapshots)
+ [Automatic snapshots](#automatic-snapshots)
+ [System disk snapshots](#system-disk-snapshots)
+ [Create new resources from snapshots](#rehydrating-snapshots)
+ [Copy snapshots](#copying-snapshots)
+ [Export snapshots to Amazon EC2](#exporting-snapshots)
+ [Delete snapshots](#deleting-snapshots)

## Manual snapshots
<a name="manual-snapshots"></a>

Create manual snapshots of instances, managed databases, and block storage disks at any time. Manual snapshots are stored indefinitely until you delete them.

For more information about creating manual snapshots, see the following guides:
+ [Create a snapshot of your Linux or Unix instance](lightsail-how-to-create-a-snapshot-of-your-instance.md)
+ [Create a snapshot of your Windows Server instance](prepare-windows-based-instance-and-create-snapshot.md)
+ [Create a snapshot of your database](amazon-lightsail-creating-a-database-snapshot.md)
+ [Create a block storage disk snapshot](create-block-storage-disk-snapshot.md)

## Automatic snapshots
<a name="automatic-snapshots"></a>

If you're hosting critical information on your Lightsail instance or block storage disk, you should back them up often by creating manual snapshots. However, it's not always easy to find the time to perform frequent administrative tasks. If that's the case for you, then use automatic snapshots to have Lightsail create daily backups of your instance or block storage disk on your behalf, without manual interaction. The latest seven daily automatic snapshots are stored before the oldest one is replaced with the newest one.

For more information about automatic snapshots, see the following guides:
+ [Enable or disable automatic instance snapshots](amazon-lightsail-configuring-automatic-snapshots.md)
+ [Change the automatic snapshot time for instances or disks](amazon-lightsail-changing-automatic-snapshot-time.md)
+ [Delete automatic snapshots](amazon-lightsail-deleting-automatic-snapshots.md)

**Important**  
All automatic snapshots associated with a resource are deleted when you delete the source resource. This behavior differs from manual snapshots, which are kept in your Lightsail account even after you delete the source resource. To keep your automatic snapshots when you delete the source resource, see [Keep automatic snapshots](amazon-lightsail-keeping-automatic-snapshots.md).

## System disk snapshots
<a name="system-disk-snapshots"></a>

If your instance becomes unresponsive and you need to access the files on the system disk, you can back up the instance root volume by creating a snapshot of it. Then, you can access the files in the system disk by creating a new block storage disk from the snapshot and attaching it to another instance. For more information, see [Create a snapshot of an instance root volume](amazon-lightsail-create-an-instance-root-volume-snapshot.md).

## Create new resources from snapshots
<a name="rehydrating-snapshots"></a>

Use snapshots to create new Lightsail resources using the same plan, or larger plan, than the original resource. Snapshots can't be used to create new resources using a smaller Lightsail plan. When you create a resource based on a snapshot, the new resource begins as a replica of the original resource that was used to create the snapshot.

For more information, see the following guides:
+ [Create an instance from a snapshot](lightsail-how-to-create-instance-from-snapshot.md)
+ [Create a database from a snapshot](amazon-lightsail-creating-a-database-from-snapshot.md)
+ [Create a block storage disk from a snapshot](create-new-block-storage-disk-from-snapshot.md)
+ [Create a larger instance, block storage disk, or database from a snapshot](how-to-create-larger-instance-from-snapshot-using-console.md)

## Copy snapshots
<a name="copying-snapshots"></a>

Instance and block storage disk snapshots can be copied from one Amazon Web Services (AWS) Region to another within the same Lightsail account. Database snapshots cannot be copied between regions. For more information, see [Copy snapshots from one AWS Region to another](amazon-lightsail-copying-snapshots-from-one-region-to-another.md).

## Export snapshots to Amazon EC2
<a name="exporting-snapshots"></a>

Lightsail is the easiest way to get started with AWS. However, there are limitations with Lightsail that are not present in Amazon EC2 or other AWS services. Export your Lightsail instance and block storage disk snapshots to Amazon EC2 to take advantage of the wider range of instance types available, and use the full range of services in AWS. For more information, see [Export snapshots to Amazon EC2](amazon-lightsail-exporting-snapshots.md).

**Note**  
Snapshots of cPanel & WHM (CentOS 7) instances cannot be exported to Amazon EC2.

## Delete snapshots
<a name="deleting-snapshots"></a>

Delete Lightsail snapshots when you no longer need them to avoid incurring a monthly [snapshot storage fee](https://aws.amazon.com/lightsail/pricing/). For more information, see [Delete snapshots](amazon-lightsail-deleting-snapshots.md).

# Configure automatic snapshots for Lightsail instances and disks
<a name="amazon-lightsail-configuring-automatic-snapshots"></a>

When you enable the automatic snapshots feature of your instance or block storage disk, Amazon Lightsail creates daily snapshots of your resource during the default automatic snapshot time, or during a [time you specify](amazon-lightsail-changing-automatic-snapshot-time.md). Just like a manual snapshot, you can use an automatic snapshot as a baseline to create new resources or for data backup. 

When automatic snapshots are created, you are billed the [snapshot storage fee](https://aws.amazon.com/lightsail/pricing/) for the automatic snapshots stored on your Lightsail account.

**Contents**
+ [Automatic snapshot restrictions](#automnatic-snapshot-restrictions)
+ [Automatic snapshot retention](#automatic-snapshot-retention)
+ [Enable or disable automatic instance snapshots using the Lightsail console](#configuring-automatic-snapshots-using-console)
+ [Enable or disable automatic snapshots for instances or block storage disks using the AWS CLI](#configuring-automatic-snapshots-using-cli)

## Automatic snapshot restrictions
<a name="automnatic-snapshot-restrictions"></a>

The following restrictions apply to automatic snapshots:
+ Automatic snapshots cannot be enabled or disabled for block storage disks using the Lightsail console. To enable or disable automatic snapshots for block storage disks, you must use the Lightsail API, AWS Command Line Interface (AWS CLI), or SDKs. For more information, see [Enable or disable automatic snapshots using the AWS CLI](#configuring-automatic-snapshots-using-cli).
+ Automatic snapshot is currently not supported for Windows instances, or managed databases. Instead, you must create manual snapshots of your Windows instances or managed databases to back them up. For more information, see [Create a snapshot of your Windows Server instance](prepare-windows-based-instance-and-create-snapshot.md) and [Create a database snapshot](amazon-lightsail-creating-a-database-snapshot.md). Managed databases also have the point-in-time backup feature enabled by default, which you can use to restore your data to a new database. For more information, see [Create a database from a point-in-time backup](amazon-lightsail-creating-a-database-from-point-in-time-backup.md).
+ Automatic snapshots don't retain tags from the source resource. To keep a tag from the source resource on a new resource created from an automatic snapshot, you must manually add the tag when you create the new resource from the automatic snapshot. For more information, see [Add tags to a resource](amazon-lightsail-adding-tags-to-a-resource.md).

## Automatic snapshot retention
<a name="automatic-snapshot-retention"></a>

The latest seven daily automatic snapshots are stored before the oldest one is replaced with the newest one. Additionally, all automatic snapshots associated with a resource are deleted when you delete the source resource. This behavior differs from manual snapshots, which are kept in your Lightsail account even after you delete the source resource. To keep automatic snapshots from being replaced, or from being deleted when you delete the source resource, you can [copy automatic snapshots as a manual snapshot](amazon-lightsail-keeping-automatic-snapshots.md).

When you disable the automatic snapshot feature for a resource, the existing automatic snapshots of the resource are kept with the source resource until you do one of the following:
+ Re-enable automatic snapshots and the existing automatic snapshots are replaced by newer snapshots.
+ [Manually delete the existing automatic snapshots](amazon-lightsail-deleting-automatic-snapshots.md).
+ Delete the source resource, which deletes the associated automatic snapshots.

## Enable or disable automatic instance snapshots using the Lightsail console
<a name="configuring-automatic-snapshots-using-console"></a>

Complete the following steps to enable or disable automatic snapshots for an instance using the Lightsail console.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Instances**.  
![\[The Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-home-page-instances-storage.png)

1. Choose the name of the instance for which you want to enable or disable automatic snapshots.

1. On the instance management page, choose the **Snapshots** tab.  
![\[The instance management page in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-instance-management-snapshots.png)

1. Under the **Automatic snapshots** section, choose the toggle to enable it. Likewise, choose the toggle to disable it if it's enabled.

1. At the prompt, choose **Yes, enable** to enable automatic snapshots, or **Yes, disable** to disable the feature.

   The automatic snapshot is enabled or disabled after a few moments.
   + If you *enabled* the automatic snapshots feature, you may want to also change the automatic snapshot time. For more information, see [Change the automatic snapshot time for instances or block storage disks](amazon-lightsail-changing-automatic-snapshot-time.md).
   + If you *disabled* the automatic snapshots feature, the existing automatic snapshots of the resource are kept until you re-enable the feature and they are replaced by new snapshots, or until you delete them. You will be billed the [snapshot storage fee](https://aws.amazon.com/lightsail/pricing/) for the automatic snapshots stored on your Lightsail account. For more information about deleting automatic snapshots, see [Delete automatic instance snapshots](amazon-lightsail-deleting-automatic-snapshots.md).

## Enable or disable automatic snapshots for instances or block storage disks using the AWS CLI
<a name="configuring-automatic-snapshots-using-cli"></a>

Complete the following steps to enable or disable automatic snapshots for an instance or block storage disk using the AWS CLI.

1. Open a Terminal or Command Prompt window.

   If you haven't already, [install the AWS CLI and configure it to work with Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Enter one of the commands described in this step depending on whether you want to enable or disable automatic snapshots:
**Note**  
The `autoSnapshotAddOnRequest={snapshotTimeOfDay=HH:00}` parameter is optional in these commands. If you don't specify a daily automatic snapshot time when you enable automatic snapshots, Lightsail assigns a default snapshot time for your resource. For more information, see [Change the automatic snapshot time for instances or block storage disks](amazon-lightsail-changing-automatic-snapshot-time.md).
   + Enter the following command to enable automatic snapshots for an existing resource:

     ```
     aws lightsail enable-add-on --region Region --resource-name ResourceName --add-on-request addOnType=AutoSnapshot,autoSnapshotAddOnRequest={snapshotTimeOfDay=HH:00}
     ```

     In the command, replace:
     + *Region* with the AWS Region in which the resource is located.
     + *ResourceName* with the name of the resource.
     + *HH:00* with the daily automatic snapshot time in an hourly increment, and in Coordinated Universal Time (UTC).

     **Example:**

     ```
     aws lightsail enable-add-on --region us-west-2 --resource-name WordPress-1 --add-on-request addOnType=AutoSnapshot,autoSnapshotAddOnRequest={snapshotTimeOfDay=18:00}
     ```
   + Enter the following command to enable automatic snapshots when creating a new instance:

     ```
     aws lightsail create-instances --region Region --availability-zone AvailabilityZone --blueprint-id BlueprintID --bundle-id BundleID --instance-name InstanceName --add-ons addOnType=AutoSnapshot,autoSnapshotAddOnRequest={snapshotTimeOfDay=HH:00}
     ```

     In the command, replace:
     + *Region* with the AWS Region in which the instance should be created.
     + *AvailabilityZone* with the availability zone in which the instance should be created.
     + *BlueprintID* with the blueprint ID to use for the instance.
     + *BundleID* with the bundle ID to use for the instance.
     + *InstanceName* with the name to use for the instance.
     + *HH:00* with the daily automatic snapshot time in an hourly increment, and in Coordinated Universal Time (UTC).

     **Example:**

     ```
     aws lightsail create-instances --region us-west-2 --availability-zone us-west-2a --blueprint-id wordpress_5_1_1_2 --bundle-id medium_2_0 --instance-name WordPressInstance --add-ons addOnType=AutoSnapshot,autoSnapshotAddOnRequest={snapshotTimeOfDay=20:00}
     ```
   + Enter the following command to enable automatic snapshots when creating a new disk:

     ```
     aws lightsail create-disk --region Region --availability-zone AvailabilityZone --size-in-gb Size --disk-name DiskName --add-ons addOnType=AutoSnapshot,autoSnapshotAddOnRequest={snapshotTimeOfDay=HH:00}
     ```

     In the command, replace:
     + *Region* with the AWS Region in which the disk should be created.
     + *AvailabilityZone* with the availability zone in which the disk should be created.
     + *Size* with the desired size of the disk in GB.
     + *DiskName* with the name to use for the disk.
     + *HH:00* with the daily automatic snapshot time in an hourly increment, and in Coordinated Universal Time (UTC).

     **Example:**

     ```
     aws lightsail create-disk --region us-west-2 --availability-zone us-west-2a --size-in-gb 32 --disk-name Disk01 --add-ons addOnType=AutoSnapshot,autoSnapshotAddOnRequest={snapshotTimeOfDay=18:59}
     ```
   + Enter the following command to disable automatic snapshots for a resource:

     ```
     aws lightsail disable-add-on --region Region --resource-name ResourceName --add-on-type AutoSnapshot
     ```

     In the command, replace:
     + *Region* with the AWS Region in which the resource is located.
     + *ResourceName* with the name of the resource.

     **Example:**

     ```
     aws lightsail disable-add-on --region us-west-1 --resource-name MyFirstWordPressWebsite01 --add-on-type AutoSnapshot
     ```

   You should see a result similar to the following example:  
![\[Enable auto snapshot operation result.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-enable-auto-backup-operation.png)

   The automatic snapshot is enabled or disabled after a few moments.
   + If you *enabled* automatic snapshots, you may want to also change the automatic snapshot time. For more information, see [Change the automatic snapshot time for instances or block storage disks](amazon-lightsail-changing-automatic-snapshot-time.md).
   + If you *disabled* automatic snapshots, the existing automatic snapshots are kept until you re-enable the feature and they are replaced by new snapshots, or until you delete them. You will be billed the [snapshot storage fee](https://aws.amazon.com/lightsail/pricing/) for the automatic snapshots stored on your Lightsail account. For more information about deleting automatic snapshots, see [Delete automatic instance snapshots](amazon-lightsail-deleting-automatic-snapshots.md).
**Note**  
For more information about the EnableAddOn and DisableAddOn API operations in these commands, see [EnableAddOn](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_EnableAddOn.html) and [DisableAddOn](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_DisableAddOn.html) in the Lightsail API documentation.

# Adjust automatic snapshot schedule for Lightsail instances and disks
<a name="amazon-lightsail-changing-automatic-snapshot-time"></a>

When you [enable the automatic snapshots feature](amazon-lightsail-configuring-automatic-snapshots.md) for an instance or block storage disk, Lightsail creates daily snapshots of the resource during the [default automatic snapshot time](#default-automatic-snapshot-times), or a time you specify. Follow the steps in this guide to change the automatic snapshot time for your resource.

**Contents**
+ [Automatic snapshot time restrictions](#automatic-snapshot-time-restrictions)
+ [Default automatic snapshot times for AWS Regions](#default-automatic-snapshot-times)
+ [Change the automatic snapshot time using the Lightsail console](#changing-automatic-snapshot-time-using-console)
+ [Change the automatic snapshot time and block storage disks using the AWS CLI](#changing-automatic-snapshot-time-using-cli)

## Automatic snapshot time restrictions
<a name="automatic-snapshot-time-restrictions"></a>

The following restrictions apply to the automatic snapshot time:
+ The automatic snapshot time cannot be changed for block storage disks using the Lightsail console. To change the automatic snapshot time for block storage disks, you must use the Lightsail API, AWS Command Line Interface (AWS CLI), or SDKs. For more information, see [Change the automatic snapshot time using the AWS CLI](#changing-automatic-snapshot-time-using-cli).
+ The automatic snapshot time can be specified only in hourly increments. It also must be a time that is more than 30 minutes from your current time. Lightsail creates the automatic snapshot between the time you specify and up to 45 minutes after.
**Important**  
You cannot create manual snapshots when an automatic snapshot is being created.
+ When you change the automatic snapshot time for a resource, it is typically effective immediately, except under the following conditions:
  + If an automatic snapshot has been created for the current day, and you change the snapshot time to a later time of day, then the new snapshot time will be effective the following day. This ensures that two snapshots are not created for the current day.
  + If an automatic snapshot has not yet been created for the current day, and you change the snapshot time to an earlier time of day, then the new snapshot time will be effective the following day. Also, a snapshot is automatically created at the previously set time for the current day. This ensures that a snapshot is created for the current day.
  + If an automatic snapshot has not yet been created for the current day, and you change the snapshot time to a time that is within 30 minutes from your current time, then the new snapshot time will be effective the following day. Also, a snapshot is automatically created at the previously set time for the current day. This ensures that a snapshot is created for the current day, because 30 minutes is required between your current time and the new snapshot time that you specify.
  + If an automatic snapshot is scheduled to be created within 30 minutes from your current time and you change the snapshot time, then the new snapshot time will be effective the following day. Also, a snapshot is automatically created at the previously set time for the current day. This ensures that a snapshot is created for the current day, because 30 minutes is required between your current time and the new snapshot time that you specify.

  When any of these conditions are true, a message displays in the Lightsail console to notify you that the new snapshot time may take up to 24 hours to take effect.

## Default automatic snapshot times for AWS Regions
<a name="default-automatic-snapshot-times"></a>

If you don't specify an automatic snapshot time when you enable automatic snapshots, then Lightsail assigns one of the following default automatic snapshot times. The times depend on the AWS Region where your instance or block storage disk is located:
+ US East (N. Virginia) (us-east-1): 06:00 UTC
+ US East (Ohio) (us-east-2): 03:00 UTC
+ US West (Oregon) (us-west-2): 06:00 UTC
+ Asia Pacific (Mumbai) (ap-south-1): 17:00 UTC
+ Asia Pacific (Seoul) (ap-northeast-2): 13:00 UTC
+ Asia Pacific (Singapore) (ap-southeast-1): 14:00 UTC
+ Asia Pacific (Sydney) (ap-southeast-2): 12:00 UTC
+ Asia Pacific (Jakarta) (ap-southeast-3): 08:00 UTC
+ Asia Pacific (Malaysia) (ap-southeast-5): 08:00 UTC
+ Asia Pacific (Tokyo) (ap-northeast-1): 13:00 UTC
+ Canada (Central) (ca-central-1): 06:00 UTC
+ EU (Frankfurt) (eu-central-1): 20:00 UTC
+ EU (Ireland) (eu-west-1): 22:00 UTC
+ EU (London) (eu-west-2): 06:00 UTC
+ EU (Paris) (eu-west-3): 07:00 UTC
+ EU (Stockholm) (eu-north-1): 08:00 UTC

## Change the automatic snapshot time using the Lightsail console
<a name="changing-automatic-snapshot-time-using-console"></a>

Complete the following steps to change the automatic snapshot time for an instance using the Lightsail console.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Instances**.  
![\[The Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-home-page-instances-storage.png)

1. Choose the name of the instance for which you want to change the automatic snapshot time.

1. On the instance management page, choose the **Snapshots** tab.  
![\[The instance management page in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-instance-management-snapshots.png)

1. Under the **Automatic snapshots** section, choose **Change snapshot time**.

1. Choose a time of day when you'd like Lightsail to create an automatic snapshot. The time that you choose must be in Coordinated Universal Time (UTC).

1. Choose **Change** to save the new snapshot time.

   The automatic snapshot time is updated after a few moments. A restriction may apply to the effective date of your new automatic snapshot time. For more information, see [Automatic snapshot time restrictions](#automatic-snapshot-time-restrictions).

## Change the automatic snapshot time for instances and block storage disks using the AWS CLI
<a name="changing-automatic-snapshot-time-using-cli"></a>

Complete the following steps to change the automatic snapshot time for an instance or block storage disk using the AWS CLI.

1. Open a Terminal or Command Prompt window.

   If you haven't already, [install the AWS CLI and configure it to work with Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Enter the following command to change the automatic snapshot time for a resource:

   ```
   aws lightsail enable-add-on --region Region --resource-name ResourceName --add-on-request addOnType=AutoSnapshot,autoSnapshotAddOnRequest={snapshotTimeOfDay=HH:00}
   ```

   In the command, replace:
   + *Region* with the AWS Region in which the resource is located.
   + *ResourceName* with the name of the resource.
   + *HH:00* with the daily automatic snapshot time in an hourly increment, and in Coordinated Universal Time (UTC).

   **Example:**

   ```
   aws lightsail enable-add-on --region us-west-1 --resource-name MyFirstWordPressWebsite01 --add-on-request addOnType=AutoSnapshot,autoSnapshotAddOnRequest={snapshotTimeOfDay=12:00}
   ```

   You should see a result similar to the following example:  
![\[Enable auto snapshot operation result.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-update-auto-snapshot-time-operation.png)

   The automatic snapshot time is updated after a few moments. A restriction may apply to the effective date of your new automatic snapshot time. For more information, see [Automatic snapshot time restrictions](#automatic-snapshot-time-restrictions).
**Note**  
For more information about the EnableAddOn API operation in this command, see [EnableAddOn](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_EnableAddOn.html) in the Lightsail API documentation.

# Delete unused Lightsail instance and disk snapshots
<a name="amazon-lightsail-deleting-automatic-snapshots"></a>

You can delete automatic snapshots of an instance or block storage disk in Amazon Lightsail at any time; whether the feature is enabled, or if it's disabled after it had been enabled. You will be billed the [snapshot storage fee](https://aws.amazon.com/lightsail/pricing/) for the automatic snapshots stored on your Lightsail account. Follow the steps in this guide to delete automatic snapshots if you no longer need them. For example, if you've [copied an automatic snapshot to a manual snapshot](amazon-lightsail-keeping-automatic-snapshots.md) and you no longer need the original, or if you've [disabled the automatic snapshots feature](amazon-lightsail-configuring-automatic-snapshots.md) for your resource and you don't need the existing automatic snapshots that were kept.

**Contents**
+ [Delete automatic snapshots restriction](#deleting-automatic-snapshots-restrictions)
+ [Delete automatic snapshots of an instance using the Lightsail console](#deleting-automatic-snapshots-using-console)
+ [Delete automatic snapshots of an instance or block storage disk using the AWS CLI](#deleting-automatic-snapshots-using-cli)

## Delete automatic snapshots restriction
<a name="deleting-automatic-snapshots-restrictions"></a>

Automatic snapshots of block storage disks cannot be deleted using the Lightsail console. To delete an automatic snapshot of a block storage disk, you must use the Lightsail API, AWS Command Line Interface (AWS CLI), or SDKs. For more information, see [Delete automatic snapshots of an instance or block storage disk using the AWS CLI](#deleting-automatic-snapshots-using-cli).

## Delete automatic snapshots of an instance using the Lightsail console
<a name="deleting-automatic-snapshots-using-console"></a>

Complete the following steps to delete automatic snapshots of an instance using the Lightsail console.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Instances**.  
![\[The Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-home-page-instances-storage.png)

1. Choose the name of the instance for which you want to delete automatic snapshots.

1. On the instance management page, choose the **Snapshots** tab.  
![\[The instance management page in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-instance-management-snapshots.png)

1. Under the **Automatic snapshots** section, choose the ellipsis icon next to the automatic snapshot that you want to delete, then choose **Delete snapshot**.

1. At the prompt, choose **Yes** to confirm that you want to delete the snapshot.

   The automatic snapshot is deleted after a few moments.

## Delete automatic snapshots of an instance or block storage disk using the AWS CLI
<a name="deleting-automatic-snapshots-using-cli"></a>

Complete the following steps to delete automatic snapshots of an instance or block storage disk using the AWS CLI.

1. Open a Terminal or Command Prompt window.

   If you haven't already, [install the AWS CLI and configure it to work with Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Enter the following command to get the dates of the available automatic snapshots for a specific resource. You will need the date of the automatic snapshot to specify as the `date` parameter in the subsequent command.

   ```
   aws lightsail --region Region get-auto-snapshots --resource-name ResourceName
   ```

   In the command, replace:
   + *Region* with the AWS Region in which the resource is located.
   + *ResourceName* with the name of the resource.

   **Example:**

   ```
   aws lightsail --region us-west-2 get-auto-snapshots --resource-name MyFirstWordPressWebsite01
   ```

   You should see a result similar to the following, which lists the available automatic snapshots:  
![\[Get auto snapshots operation results containing the available auto snapshots for an instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-available-auto-backups-operation.png)

1. Enter the following command to delete an automatic snapshot:

   ```
   aws lightsail --region Region delete-auto-snapshot --resource-name ResourceName --date YYYY-MM-DD
   ```

   In the command, replace:
   + *Region* with the AWS Region in which the resource is located.
   + *ResourceName* with the name of the resource.
   + *YYYY-MM-DD* with the date of the available auto snapshot that you obtained using the preceding command.

   **Example:**

   ```
   aws lightsail --region us-west-2 delete-auto-snapshot --resource-name MyFirstWordPressWebsite01 --date 2019-09-16
   ```

   You should see a result similar to the following example:  
![\[Delete auto snapshot operation result.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-delete-auto-backup-operation.png)

   The automatic snapshot is deleted after a few moments.
**Note**  
For more information about the GetAutoSnapshots and DeleteAutoSnapshot API operations in these commands, see [GetAutoSnapshots](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetAutoSnapshots.html) and [DeleteAutoSnapshot](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_DeleteAutoSnapshot.html) in the Lightsail API documentation.

# Keep automatic snapshots from being replaced in Lightsail
<a name="amazon-lightsail-keeping-automatic-snapshots"></a>

When you [enable the automatic snapshots feature](amazon-lightsail-configuring-automatic-snapshots.md) for an instance or block storage disk in Amazon Lightsail, only the latest seven daily automatic snapshots of the resource are stored. Then, the oldest one is replaced with the newest one. Additionally, all automatic snapshots associated with a resource are deleted when you delete the source resource.

If you want to keep a specific automatic snapshot from being replaced, or from being deleted when you delete the source resource, you can copy it as a manual snapshot. Manual snapshots are kept until you manually delete them.

Follow the steps in this guide to keep an automatic snapshot by copying it as a manual snapshot. You will be billed the [snapshot storage fee](https://aws.amazon.com/lightsail/pricing/) for the automatic snapshots stored on your Lightsail account.

**Note**  
If you disable the automatic snapshots feature for a resource, the existing automatic snapshots of the resource are kept until you re-enable the feature and they are replaced by newer snapshots, or you until you [delete the automatic snapshots](amazon-lightsail-deleting-automatic-snapshots.md).

**Contents**
+ [Keep automatic snapshots restriction](#keeping-automatic-snapshots-restrictions)
+ [Keep automatic snapshots of instances using the Lightsail console](#keeping-automatic-snapshots-using-console)
+ [Keep automatic snapshots of instances and block storage disks using the AWS CLI](#keeping-automatic-snapshots-using-cli)

## Keep automatic snapshots restriction
<a name="keeping-automatic-snapshots-restrictions"></a>

Automatic snapshots of block storage disks cannot be copied to manual snapshots using the Lightsail console. To copy an automatic snapshot of a block storage disk, you must use the Lightsail API, AWS Command Line Interface (AWS CLI), or SDKs. For more information, see [Keep automatic snapshots of instances and block storage disks using the AWS CLI](#keeping-automatic-snapshots-using-cli).

## Keep automatic snapshots of instances using the Lightsail console
<a name="keeping-automatic-snapshots-using-console"></a>

Complete the following steps to keep automatic snapshots for an instance using the Lightsail console.

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Instances**.  
![\[The Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-home-page-instances-storage.png)

1. Choose the name of the instance for which you want to keep automatic snapshots.

1. On the instance management page, choose the **Snapshots** tab.  
![\[The instance management page in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-instance-management-snapshots.png)

1. Under the **Automatic snapshots** section, choose the ellipsis icon next to the automatic snapshot that you want to keep, then choose **Keep snapshot**.

1. At the prompt, choose **Yes, save** to confirm that you want to keep the automatic snapshot.

   The automatic snapshot is copied as a manual snapshot after a few moments. Manual snapshots are kept until you delete them.
**Important**  
If you no longer need the automatic snapshot, we recommend that you delete it. Otherwise, you will be billed the [snapshot storage fee](https://aws.amazon.com/lightsail/pricing/) for the automatic snapshot and the duplicate manual snapshot stored on your Lightsail account. For more information, see [Delete automatic instance snapshots](amazon-lightsail-deleting-automatic-snapshots.md).

## Keep automatic snapshots of instances and block storage disks using the AWS CLI
<a name="keeping-automatic-snapshots-using-cli"></a>

Complete the following steps to keep automatic snapshots for an instance or block storage disk using the AWS CLI.

1. Open a Terminal or Command Prompt window.

   If you haven't already, [install the AWS CLI and configure it to work with Lightsail](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. Enter the following command to get the dates of the available automatic snapshots for a specific resource. You need the date of the automatic snapshot to specify as the `restore date` parameter in the subsequent command.

   ```
   aws lightsail get-auto-snapshots --region Region --resource-name ResourceName
   ```

   In the command, replace:
   + *Region* with the AWS Region in which the resource is located.
   + *ResourceName* with the name of the resource.

   **Example:**

   ```
   aws lightsail get-auto-snapshots --region us-west-2 --resource-name MyFirstWordPressWebsite01
   ```

   You should see a result similar to the following, which lists the available automatic snapshots:  
![\[Get auto snapshots operation results containing the available auto snapshots for an instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-available-auto-backups-operation.png)

1. Enter the following command to keep an automatic snapshot for a specific resource:

   ```
   aws lightsail copy-snapshot --region TargetRegion --source-resource-name ResourceName --restore-date YYYY-MM-DD --source-region SourceRegion --target-snapshot-name SnapshotName
   ```

   In the command, replace:
   + *TargetRegion* with the AWS Region in which you want to copy the snapshot to.
   + *ResourceName* with the name of the resource.
   + *YYYY-MM-DD* with the date of the available auto snapshot that you obtained using the preceding command.
   + *SourceRegion* with the AWS Region in which the automatic snapshot is currently in.
   + *SnapshotName* with the name of the new snapshot to be created.

   **Example:**

   ```
   aws lightsail copy-snapshot --region us-west-2 --source-resource-name MyFirstWordPressWebsite01 --restore-date 2019-09-16 --source-region us-west-2 --target-snapshot-name Snapshot-Copied-From-Auto-Snapshot
   ```

   You should see a result similar to the following example:  
![\[Copy snapshot operation result.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-copy-snapshot-operation.png)

   The automatic snapshot is copied as a manual snapshot after a few moments. Manual snapshots are kept until you delete them.
**Important**  
If you no longer need the automatic snapshot, we recommend that you delete it. Otherwise, you will be billed the [snapshot storage fee](https://aws.amazon.com/lightsail/pricing/) for the automatic snapshot and duplicate manual snapshot stored on your Lightsail account. For more information, see [Delete automatic instance snapshots](amazon-lightsail-deleting-automatic-snapshots.md).
**Note**  
For more information about the GetAutoSnapshots and CopySnapshot API operations in these commands, see [GetAutoSnapshots](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetAutoSnapshots.html) and [CopySnapshot](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_CopySnapshot.html) in the Lightsail API documentation.

# Back up Linux/Unix Lightsail instances with snapshots
<a name="lightsail-how-to-create-a-snapshot-of-your-instance"></a>

You can create snapshots of your Linux/Unix-based Amazon Lightsail instances. An *instance snapshot* is a copy of the system disk and matches the original machine configuration (memory, CPU, disk size, and data transfer rate). If you've attached block storage disks to your instance, Lightsail copies those additional disks as part of your snapshot. For more information, see [Snapshots](understanding-snapshots-in-amazon-lightsail.md).

**Note**  
The steps to create a snapshot of a Windows Server-based Lightsail instance are different. For more information, see [Create a snapshot of your Windows Server instance](prepare-windows-based-instance-and-create-snapshot.md).

You must already have an instance in Lightsail to create a snapshot of it. After you have an instance, follow these steps to create a snapshot:

1. On the Lightsail home page, choose the name of your instance for which you want to create a snapshot.

1. Choose the **Snapshots** tab.

1. Under the **Manual snapshots** section of the page, choose **Create snapshot**, then enter a name for your snapshot.

   Resource names:
   + Must be unique within each AWS Region in your Lightsail account.
   + Must contain 2 to 255 characters.
   + Must start and end with an alphanumeric character or number.
   + Can include alphanumeric characters, numbers, periods, dashes, and underscores.

1. Choose **Create**.

   You can see the snapshot you just created with a status of **Snapshotting...**.

   After the snapshot is finished, you can [create another instance from the snapshot](lightsail-how-to-create-instance-from-snapshot.md). For example, you may want to choose a larger size bundle than you had previously.

**Important**  
When you create a new instance from a snapshot, Lightsail lets you create an instance bundle that is either the same size or larger size. We do not currently support creating a *smaller* instance size from a snapshot. The smaller options will be grayed out when you create a new instance from a snapshot.

To create a larger instance size from a snapshot, you can use the Lightsail console, the **create-instances-from-snapshot** CLI command. or the **CreateInstancesFromSnapshot** API operation. For more information, see [Create an instance from a snapshot](lightsail-how-to-create-instance-from-snapshot.md). For more information about Lightsail bundles, see [Lightsail pricing](https://amazonlightsail.com/pricing/).

# Create a snapshot of your Lightsail Windows Server instance
<a name="prepare-windows-based-instance-and-create-snapshot"></a>

A snapshot is a copy of the system disk and original configuration of an instance. The snapshot includes such information as memory, CPU, disk size, and data transfer rate. For more information, see [Snapshots](understanding-snapshots-in-amazon-lightsail.md).

To create a snapshot of your Windows Server instance in Lightsail, first create a backup snapshot. Next, create a second snapshot using a special utility known as System Preparation (Sysprep). Sysprep generalizes the Windows Server installation so that the instance can be backed up as a snapshot. Then, when you create an instance from that snapshot, you have an out-of-box experience as if you were running that Windows instance for the first time.

To create a snapshot of a Linux or Unix instance, see [Create a snapshot of your Linux or Unix instance](lightsail-how-to-create-a-snapshot-of-your-instance.md).

**Contents**
+ [Step 1: Create a backup snapshot before running Sysprep](#lightsail-create-a-backup-snapshot)
+ [Step 2: Connect to your instance and shut it down using Sysprep](#lightsail-connect-and-shutdown-instance-using-sysprep)
+ [Step 3: Create a snapshot after running Sysprep](#lightsail-create-snapshot-after-running-sysprep)

## Step 1: Create a backup snapshot before running Sysprep
<a name="lightsail-create-a-backup-snapshot"></a>

When you run Sysprep to create a snapshot, system-specific information is removed from your instance. This may have unintended consequences for the applications running on the instance. Therefore, you should first create a backup snapshot before running Sysprep to make sure that you have an alternate snapshot if something goes wrong.

When you create a snapshot before running Sysprep, instances that you create using the backup snapshot have the same administrator password as the original instance. You cannot connect to those instances using the browser-based RDP client in the Lightsail console. However, you can connect using your own RDP client and the same administrator password as the original instance. For more information, see [Connecting to your Windows instance in Amazon Lightsail using the Remote Desktop Connection client on a Windows computer](amazon-lightsail-connecting-to-windows-instance-using-rdc.md).

**Important**  
Save the administrator password of the original Windows instance and store it in a safe place. You will need that administrator password later if something goes wrong, and you create an instance from the snapshot you created before running Sysprep.

**To create a backup snapshot before running Sysprep**

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. On the Lightsail home page, choose the name of the Windows Server instance for which you want to create a snapshot.

1. Choose **Stop** at the top of the instance management page to stop your instance.  
![\[Stop your Windows Server instance before creating a snapshot.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-stop-a-windows-instance.png)
**Note**  
Stopping an instance makes any website or service on it unavailable until you start it again.

1. Choose the **Snapshots** tab.

1. Under the **Manual snapshots** section of the page, choose **Create snapshot**, then enter a name for your snapshot.

   Resource names:
   + Must be unique within each AWS Region in your Lightsail account.
   + Must contain 2 to 255 characters.
   + Must start and end with an alphanumeric character or number.
   + Can include alphanumeric characters, numbers, periods, dashes, and underscores.

1. Choose **Create**.

1. At the prompt, choose **Create snapshot** again to confirm.

   The snapshot process takes a few minutes to complete.

1. After the snapshot is created, choose **Start** at the top of the instance management page to start your instance again.

## Step 2: Connect to your instance and shut it down using Sysprep
<a name="lightsail-connect-and-shutdown-instance-using-sysprep"></a>

Now that you have a backup snapshot, it’s time to run Sysprep on your Windows Server instance. This causes the instance to shut down so that you can take a snapshot. For more information about Sysprep, see [Sysprep Overview](https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--system-preparation--overview) in the Microsoft documentation.

In this step, connect to your instance and run Sysprep through a preinstalled application. The application is called **EC2LaunchSettings** on Windows Server 2019 and Windows Server 2016 instances, and **Ec2ConfigService Settings** on Windows Server 2012 instances.

**To connect to your instance and run Sysprep**

1. On the instance management page, choose the **Connect** tab, then choose **Connect using RDP**.

   The browser-based RDP window opens, as shown in the following example:  
![\[The browser-based RDP client in Lightsail.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-web-based-rdp-client.png)

1. On the taskbar, choose the Windows icon, or choose **Win** to open the Start menu.

1. Choose one of these options:
   + On Windows Server 2022, Windows Server 2019, and Windows Server 2016 instances, choose **Start**, then choose **Ec2LaunchSettings**.

1. In the Administrator Password section, choose **Random (Retrieve from console)**, then choose **Shutdown with Sysprep**.  
![\[The Ec2 Launch Settings application on Windows Server 2016 instances.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ec2launchsettings.png)

1. Choose **Yes** to confirm that you want to run Sysprep and shut down the instance.

   Your instance begins running Sysprep, your RDP connection shuts down, and your Lightsail instance stops running after a few minutes.

## Step 3: Create a snapshot after running Sysprep
<a name="lightsail-create-snapshot-after-running-sysprep"></a>

After your instance is in a stopped state, create a snapshot in the Lightsail console. When you create a snapshot of your Windows Server instance after running Sysprep, all instances that you create based on the snapshot have a unique administrator password. You can connect to those instances by using the browser-based RDP client in the Lightsail console.

**To create a snapshot in the Lightsail console**

1. Toggle back to the Lightsail console.

1. On the instance management page for your Windows Server instance, choose the **Snapshots** tab

1. Under the **Manual snapshots** section of the page, choose **Create snapshot**, then enter a name for your snapshot.

   Resource names:
   + Must be unique within each AWS Region in your Lightsail account.
   + Must contain 2 to 255 characters.
   + Must start and end with an alphanumeric character or number.
   + Can include alphanumeric characters, numbers, periods, dashes, and underscores.

1. Choose **Create**.

1. At the prompt, choose **Create snapshot** to confirm that you prepared the instance for the snapshot.

   The snapshot process takes a few minutes to complete.

1. After the snapshot is created, choose **Start** at the top of the instance management page to start your instance again.

   At this point, you should have two snapshots of your Windows Server instance as shown in the following example:  
![\[Recent snapshots in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-recent-windows-snapshots.png)

   Use the Sysprep snapshot to create new instances. Use the backup snapshot only if the original instance doesn’t function as expected after running Sysprep.

## Next steps
<a name="windows-snapshot-next-steps"></a>

Now that you have the Sysprep and backup snapshots, here are some next steps you should complete:
+ Connect to your original instance, and confirm that your applications on it function as expected after running Sysprep. For more information, see [Connect to your Windows Server instance using Amazon Lightsail](connect-to-your-windows-based-instance-using-amazon-lightsail.md).
+ Create a new instance using the Sysprep snapshot, connect to it, and confirm that your applications on the new instance function as expected. For more information, see [Create an instance from a snapshot](lightsail-how-to-create-instance-from-snapshot.md).
+ Delete your backup snapshot after you confirm that the original instance functions as expected after running Sysprep. For more information, see [Delete snapshots](amazon-lightsail-deleting-snapshots.md).
+ If your instance doesn't function as expected after running Sysprep, then follow the steps in [Create an instance from a snapshot](lightsail-how-to-create-instance-from-snapshot.md) to create a new instance from the backup snapshot.

# Create Lightsail block storage disk snapshots for backup or baseline
<a name="create-block-storage-disk-snapshot"></a>

You can create disk snapshots in Amazon Lightsail as backups of your additional block storage disks.

You can use the snapshot of a disk as a baseline for new disks or for data backup. If you make periodic snapshots of a disk, the snapshots are incremental. Only the blocks on the device that have changed after your last snapshot are saved in the new snapshot. Even though snapshots are saved incrementally, the snapshot deletion process is designed so that you need to retain only the most recent snapshot to restore the entire disk.

For more information, see [Snapshots](understanding-snapshots-in-amazon-lightsail.md).

1. In the left navigation pane, choose **Storage**.

1. Choose the name of the block storage disk for which you want to create a snapshot.

1. Choose the **Snapshots** tab.

1. Under the **Manual snapshots** section of the page, choose **Create snapshot**, then enter a name for your snapshot.

   Resource names:
   + Must be unique within each AWS Region in your Lightsail account.
   + Must contain 2 to 255 characters.
   + Must start and end with an alphanumeric character or number.
   + Can include alphanumeric characters, numbers, periods, dashes, and underscores.

1. Choose **Create**.

   You can see the snapshot you just created with a status of **Snapshotting...**.

   After the snapshot is finished, you can [create another disk from the snapshot](create-new-block-storage-disk-from-snapshot.md).

# Create block storage disks from snapshots in Lightsail
<a name="create-new-block-storage-disk-from-snapshot"></a>

You can create a new block storage disk from a disk snapshot. If you're creating an entirely new disk, see one of the following topics instead: [Create additional block storage disks (Linux/Unix)](create-and-attach-additional-block-storage-disks-linux-unix.md) or [Create and attach block storage disks to your Windows Server instance](create-and-attach-additional-block-storage-disks-windows.md).

You can use the snapshot of a block storage disk as a baseline for new disks or for data backup. If you make periodic snapshots of a disk, the snapshots are incremental. Only the blocks on the disk that have changed after your last snapshot are saved in the new snapshot. Even though snapshots are saved incrementally, the snapshot deletion process is designed so that you need to retain only the most recent snapshot to restore the entire disk. To create a snapshot of your block storage disk, see [Create a block storage disk snapshot](create-block-storage-disk-snapshot.md).

## Step 1: Find your disk snapshot and choose to create a new disk
<a name="find-your-snapshot-and-choose-create-new-disk"></a>

You can create a new instance from a disk snapshot in one of two places in Lightsail: on the **Snapshots** tab of the Lightsail home page, or on the **Snapshots** tab of the disk management page.

**From the Lightsail home page**

1. In the left navigation pane, on the left navigation bar, choose **Snapshots**.

1. Find the name of the disk, then expand the node below it to see all of the available snapshots of that disk.  
![\[Expand the disk snapshots in the Snapshots tab of the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-snapshots-tab-available-disk-snapshots.png)

1. Choose the actions menu icon (⋮) next to the snapshot from which you want to create your new disk, and then choose **Create new disk**.  
![\[Create a new disk from a snapshots in the Lightsail home page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-action-menu-create-new-disk.png)

**From the disk management page in Lightsail**

1. In the left navigation pane, on the left navigation bar, choose the **Storage** tab.

1. Choose the name of the disk for which you want to view snapshots.

1. Choose the **Snapshots** tab.  
![\[Choose the Snapshots tab from the disk management page\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-disk-management-snapshots-tab.png)

1. Under the **Manual snapshots** section of the page, choose the actions menu icon (⋮) next to the snapshot from which you want to create a new disk, and choose **Create new disk**.  
![\[Use the actions menu to create a new disk from a snapshot\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/create-new-disk-from-snapshot-disk-management-page.png)

## Step 2: Create a new disk from a disk snapshot
<a name="create-new-disk-from-disk-snapshot"></a>

1. Choose an Availability Zone for your new disk, or accept the default (`us-east-2a`).

   You must create the new disk in the same AWS Region as the source disk.

1. Choose a size for your new disk that is equal to or greater than the source snapshot.

1. Enter a name for your disk.

   Resource names:
   + Must be unique within each AWS Region in your Lightsail account.
   + Must contain 2 to 255 characters.
   + Must start and end with an alphanumeric character or number.
   + Can include alphanumeric characters, numbers, periods, dashes, and underscores.

1. Choose one of the following options to add tags to your disk:
   + **Add key-only tags** or **Manage tags** (if tags have already been added). Enter your new tag into the tag key text box, and press **Enter**. Choose **Save** when you’re done entering your tags to add them, or choose **Cancel** to not add them.  
![\[Key-only tags in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-key-only-tags.png)
   + **Create a key-value tag**, then enter a key into the **Key** text box, and a value into the **Value** text box. Choose **Save** when you’re done entering your tags, or choose **Cancel** to not add them.

     Key-value tags can only be added one at a time before saving. To add more than one key-value tag, repeat the previous steps.  
![\[Key-value tags in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-key-value-tag.png)
**Note**  
For more information about key-only and key-value tags, see [Tags](amazon-lightsail-tags.md).

1. Choose **Create disk**.

# Create a snapshot of a root volume for a Lightsail instance
<a name="amazon-lightsail-create-an-instance-root-volume-snapshot"></a>

Back up an instance root volume in Amazon Lightsail by creating a snapshot of the system disk. Then, access the files in the backup by creating a new block storage disk from the snapshot and attaching it to another instance. Do this if you need to:
+ Recover data from the root volume of a botched instance.
+ Create a backup of your instance's root volume, as you would for a block storage disk.

You create the instance root volume snapshot using the AWS Command Line Interface (AWS CLI) or AWS CloudShell. After you create the snapshot, use the Lightsail console to create a block storage disk from the snapshot. Then, attach it to a running instance, and access it from that instance.

**Contents**
+ [Step 1: Complete the prerequisites](#instance-root-volume-snapshot-prerequisites)
+ [Step 2: Create an instance root volume snapshot](#create-instance-root-volume-snapshot)
+ [Step 3: Create a block storage disk from a snapshot and attach it to an instance](#create-block-storage-disk-from-snapshot)
+ [Step 4: Access a block storage disk from an instance](#access-block-storage-disk-from-an-instance)

## Step 1: Complete the prerequisites
<a name="instance-root-volume-snapshot-prerequisites"></a>

Use the AWS Command Line Interface (AWS CLI), or AWS CloudShell to create an instance root volume snapshot. CloudShell is a browser-based, pre-authenticated shell that you can launch directly from the Lightsail console. For more information, see [Set up and configure the AWS CLI for Lightsail operations](lightsail-how-to-set-up-and-configure-aws-cli.md), and [Manage Lightsail resources with AWS CloudShell](amazon-lightsail-cloudshell.md).

## Step 2: Create an instance root volume snapshot
<a name="create-instance-root-volume-snapshot"></a>

Open a Terminal, CloudShell or Command Prompt window, then type the following command to create an instance root volume snapshot.

```
aws lightsail create-disk-snapshot --region AWSRegion --instance-name InstanceName --disk-snapshot-name DiskSnapshotName
```

In the command, replace:
+ *AWSRegion* with the AWS Region of the instance.
+ *InstanceName* with the name of the instance whose root volume you want to back up.
+ *DiskSnapshotName* with the name of the new disk snapshot to be created.

**Example:**

```
aws lightsail create-disk-snapshot --region us-west-2 --instance-name Amazon_Linux-32GB-Oregon-1 --disk-snapshot-name root-volume-linux
```

If successful, you will see a result similar to the following:

![\[Back up an instance root volume in Lightsail.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-create-root-volume-disk-snapshot.png)


Wait a few minutes for the snapshot to be created. After it’s created, you can view it in the Lightsail home page by choosing **Snapshots** in the left navigation pane and scrolling down to the **Disk snapshots** section, as shown in the following example.

![\[Root volume disk snapshot in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-root-volume-disk-snapshot.png)


## Step 3: Create a block storage disk from a snapshot and attach it to an instance
<a name="create-block-storage-disk-from-snapshot"></a>

Create a new block storage disk from the instance root volume snapshot and attach it to another instance if you must access its contents. Do this if you need to recover data from the root volume of a botched instance.

**Note**  
The new block storage disk is created in the same AWS Region as the source snapshot. To create the block storage disk in a different Region, copy the snapshot to the desired Region, and then create a new disk from the copied snapshot. For more information, see [Copy snapshots from one AWS Region to another](amazon-lightsail-copying-snapshots-from-one-region-to-another.md).

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. In the left navigation pane, choose **Snapshots**.

1. Choose the actions menu icon (⋮) displayed next to the root volume disk snapshot that you want to use, then choose **Create new disk**.

1. Choose an Availability Zone for the disk, or accept the default.

1. Choose a size for the disk that is equal to or greater than the source disk.

1. Enter a name for the disk.

   Resource names:
   + Must be unique within each AWS Region in your Lightsail account.
   + Must contain 2 to 255 characters.
   + Must start and end with an alphanumeric character or number.
   + Can include alphanumeric characters, numbers, periods, dashes, and underscores.

1. Choose one of the following options to add tags to your disk:
   + **Add key-only tags** or **Manage tags** (if tags have already been added). Enter your new tag into the tag key text box, and press **Enter**. Choose **Save** when you’re done entering your tags to add them, or choose **Cancel** to not add them.  
![\[Key-only tags in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-key-only-tags.png)
   + **Create a key-value tag**, then enter a key into the **Key** text box, and a value into the **Value** text box. Choose **Save** when you’re done entering your tags, or choose **Cancel** to not add them.

     Key-value tags can only be added one at a time before saving. To add more than one key-value tag, repeat the previous steps.  
![\[Key-value tags in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-key-value-tag.png)
**Note**  
For more information about key-only and key-value tags, see [Tags](amazon-lightsail-tags.md).

1. Choose **Create disk**.

1. After the disk is created, choose the instance that you want to attach the disk to in the **Select an instance** drop-down menu. This is shown in the following example.  
![\[Attach a snapshot to an instance in Lightsail.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-attach-root-volume-disk.png)

1. Choose **Attach** to attach the disk to the selected instance.

   The disk is now attached to the instance. Next, make it accessible to the applicable operating system by mounting it on Linux, or bringing it online on Windows. For more information, see the following **Access the block storage from an instance** section of this guide.

## Step 4: Access a block storage disk from an instance
<a name="access-block-storage-disk-from-an-instance"></a>

To access a block storage disk after attaching it to an instance, you must mount it on Linux or Unix, or bring it online on Windows.

**Mount and access a block storage disk on a Linux or Unix instance**

1. On the [Lightsail home page](https://lightsail.aws.amazon.com/), choose the browser-based SSH client icon for the Linux or Unix instance to which you attached the block storage disk.  
![\[The browser-based SSH icon in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ssh-quick-connect.png)

1. After the browser-based SSH client is connected, enter the following command to view the block storage disk devices attached to the instance:

   ```
   lsblk
   ```

   You should see a result similar to the following example. In this example, `xvdf1` is the block storage disk attached to the instance that is not yet mounted because it doesn’t have a mount point. Also, the result omits `/dev/` from the device name, so the device name is actually `/dev/xvdf1`.  
![\[Blocked storage devices attached to a Linux or Unix instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-attached-block-storage-devices.png)

1. Enter the following command to create a mount point for the block storage disk.

   ```
   sudo mkdir MountPoint
   ```

   In the command, replace *MountPoint* with the name of the directory where the block storage disk will be mounted and accessible.

   **Example:**

   ```
   sudo mkdir xvdf
   ```

1. Enter the following command to mount the block storage disk to the mount point you created in the previous step.

   ```
   sudo mount /dev/DeviceName MountPoint
   ```

   In the command, replace:
   + *DeviceName* with the name of the block storage disk device.
   + *MountPoint* with the mount point directory that you created in the previous step.

   **Example:**

   ```
   sudo mount /dev/xvdf1 xvdf
   ```

1. Enter the following command to view the block storage disk devices attached to the instance:

   ```
   lsblk
   ```

   You should see a result similar to the following example. In this example, the *xvdf1* device is now mounted and accessible at the */home/ec2-user/xvdf* directory. You can now access block storage disk and its contents by going to the mount point directory.  
![\[Blocked storage devices attached to a Linux or Unix instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-attached-block-storage-devices-mounted.png)

**Bring a block storage disk online and access it on a Windows instance**

1. On the [Lightsail home page](https://lightsail.aws.amazon.com/), choose the browser-based RDP client icon for the Windows instance to which you attached the block storage disk.  
![\[The browser-based RDP icon in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-rdp-quick-connect.png)

1. After the browser-based SSH client is connected, search for **Computer Management** in the Windows taskbar, then choose **Computer Management** from the results.  
![\[Computer Management on a Windows instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-windows-computer-management.png)

1. In the left navigation menu of the **Computer Management** console, choose **Disk Management**, as shown in the following example.  
![\[Disk Management on a Windows instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-windows-disk-management.png)

1. Locate the disk that you recently attached to the instance. It should be labeled as Offline.

1. Right-click the **Offline** label, then choose **Online**.  
![\[Offline disk on a Windows instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-windows-disk-management-offline.png)

   The disk should now be labeled as **Online**, and a drive letter should be associated with it. You can now access the block storage disk and its contents by opening File Explorer and browsing to the designated drive letter.  
![\[Online disk on a Windows instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-windows-disk-management-online.png)

# Create Lightsail instances from snapshots
<a name="lightsail-how-to-create-instance-from-snapshot"></a>

After you create a snapshot in Lightsail, you can create a new instance from that snapshot. You can change attributes of the new instance, such as instance size and networking type – dual-stack or IPv6-only. The new instance includes the system disk and the attached block storage disks that you added.

You must have a snapshot of an instance before you can create another instance from that snapshot. For more information, see [Back up Linux/Unix Lightsail instances with snapshots](lightsail-how-to-create-a-snapshot-of-your-instance.md) or [Create a snapshot of your Lightsail Windows Server instance](prepare-windows-based-instance-and-create-snapshot.md).

1. On the Lightsail console, choose the instance that you want to snapshot to create a new instance.

1. Choose the **Snapshots** tab.

1. In the **Manual snapshots** section, choose the actions menu icon (⋮) next to the snapshot and choose **Create new instance**.  
![\[The Manage snapshots menu showing the cursor choosing Create new instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-create-new-linux-unix-based-lightsail-instance-from-snapshot.png)

1. The **Create an instance from a snapshot** page opens. Choose the optional settings that you want to use. For example, you can change the Availability Zone, [add a launch script](lightsail-how-to-configure-server-additional-data-shell-script.md), or [change the way you connect to your instance](understanding-ssh-in-amazon-lightsail.md).

1. Choose a plan (or *bundle*) for your new instance. You can choose to create an instance that uses a dual-stack (IPv4 and IPv6) instance plan, or an IPv6-only plan. You can also choose a larger bundle size than that of the original instance. For more information about IPv6-only instance plans, see [Configure IPv6-only networking for Lightsail instances](amazon-lightsail-ipv6-only-plans.md).
**Note**  
You can't create an instance that uses a smaller bundle size than that of the original instance.  
![\[The Choose a new instance plan page showing dual stack and IPv6 address types.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-instance-plan-area.png)

1. Enter a name for your instance.

   Resource names:
   + Must be unique within each AWS Region of your Lightsail account.
   + Must contain 2–255 characters.
   + Must start and end with an alphanumeric character.
   + Can include alphanumeric characters, periods, dashes, and underscores.

1. (Optional) Choose **Add new tag** to add a tag to your instance. Repeat this step as needed to add additional tags. For more information on tag usage, see [Tags](amazon-lightsail-tags.md).

   1. For **Key**, enter a tag key.  
![\[A tag with only the tag key specified in the Lightsail create instance workflow.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-instance-key-name-only-tags.png)

   1. (Optional) For **Value**, enter a tag value.  
![\[A tag with the tag key and tag value specified in the Lightsail create instance workflow.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-instance-key-name-and-value-tags.png)

1. Choose **Create instance**.

   Lightsail opens the management page, where you can manage your new instance.
**Important**  
Custom firewall rules from the original instance don't copy over to the new instance that you create from a snapshot. Only the default rules copy over to the new instance. For more information, see [Default instance firewall rules](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-firewall-and-port-mappings-in-amazon-lightsail#default-lightsail-firewall-rules).

# Upsize a Lightsail instance, storage, or database from snapshots
<a name="how-to-create-larger-instance-from-snapshot-using-console"></a>

It happens. Your cloud project is growing and you need more compute power right away\$1 We can help you with that. To upsize your Lightsail instance, block storage disk, or database, create a snapshot of your resource, and then create a new, larger version of that resource using the snapshot.

**Note**  
You cannot create a resource from a snapshot using a smaller plan size than the original resource. For example, you can't go from an 8 GB instance to a 2 GB instance.  
The default public IPv4 address that is assigned to your instance when you create it will change when you stop and start your instance. You can optionally create and attach a static IPv4 address to your instance. By using a static IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account. Alternatively, you can specify the static IP address in a DNS record for your domain, so that your domain points to your instance. For more information, see [IP addresses](understanding-public-ip-and-private-ip-addresses-in-amazon-lightsail.md).

## Prerequisites
<a name="create-larger-instance-from-snapshot-using-console-prerequisites"></a>

You will need a snapshot of your Lightsail instance, block storage disk, or database. For more information, see [Snapshots](understanding-snapshots-in-amazon-lightsail.md).

## Create your resource
<a name="create-larger-resource-from-snapshot"></a>

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. Choose the **Snapshots** tab.

1. Find the Lightsail resource whose snapshot you want to use to create a new, larger resource, and choose the right-arrow to expand the list of snapshots.

1. Choose the ellipsis icon next to the snapshot you want to use, and choose **Create new instance**.  
![\[Create new resource from a snapshot in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-create-resource-from-snapshot-menu-option.png)

1. On the **Create** page, you have a few optional settings to choose from. For example, you can change the Availability Zone. For instances, you can [add a launch script](lightsail-how-to-configure-server-additional-data-shell-script.md), or [change the SSH key you use to connect to it](understanding-ssh-in-amazon-lightsail.md).

   You can accept all the defaults and move on to the next step.

1. Choose the plan (or *bundle*) for your new resource. At this point, you can choose a larger bundle size than the original resource, if you'd like.
**Note**  
You cannot create the resource using a smaller plan size than the original resource. The bundle options that are smaller than the original resource will be unavailable.

1. Enter a name for your instance.

   Resource names:
   + Must be unique within each AWS Region in your Lightsail account.
   + Must contain 2 to 255 characters.
   + Must start and end with an alphanumeric character or number.
   + Can include alphanumeric characters, numbers, periods, dashes, and underscores.

1. Choose **Create**.

   Lightsail takes you to the management page for your new resource, and you can start managing it.

# Create larger instances, block storage disks, or databases from Lightsail snapshots using the AWS CLI
<a name="lightsail-how-to-create-larger-instance-from-snapshot-using-aws-cli"></a>

It happens. Your cloud project is growing and you need more compute power right away\$1 We can help you with that. You can do everything from within the Lightsail console, or you can use the AWS Command Line Interface (AWS CLI) to do it.

We will show you how to take a *snapshot* of your current Lightsail instance and create a new, larger one with the compute power you need based on that snapshot.

**Note**  
At this time, we don't support creating a smaller instance size (or bundle) from a snapshot. You can only create the same size instance or a larger instance.

## Prerequisites
<a name="create-larger-instance-from-snapshot-prerequisites"></a>

1. First, if you haven't already, you need to install the AWS CLI. To learn more, see [Installing the AWS Command Line Interface](http://docs.aws.amazon.com/cli/latest/userguide/installing.html). Be sure [you configure the AWS CLI](lightsail-how-to-set-up-and-configure-aws-cli.md).

1. You also need a snapshot of your instance to work from. To learn more, see [Create a snapshot of your Linux or Unix instance](lightsail-how-to-create-a-snapshot-of-your-instance.md).

## Step 1: Get your snapshot name
<a name="create-larger-instance-from-snapshot-get-your-snapshot-name"></a>

This might seem obvious, but you need to have your snapshot name before you execute this AWS CLI command to create the larger instance. The good news is that it's easy to get.

1. In the AWS CLI, type the following.

   ```
   aws lightsail get-instance-snapshots
   ```

   You should see output similar to the following.

   ```
   {
       "instanceSnapshots": [
           {
               "fromInstanceName": "WordPress-512MB-EXAMPLE",
               "name": "WordPress-512MB-EXAMPLE-system-1234567891011",
               "sizeInGb": 20,
               "resourceType": "InstanceSnapshot",
               "fromInstanceArn":
               "arn:aws:lightsail:us-east-1:123456789101:Instance/86f49ee4-26cc-4802-9b0d-12345EXAMPLE",
               "state": "available",
               "arn": "arn:aws:lightsail:us-east-1:123456789101:InstanceSnapshot/c87acb5f-851e-4fbc-94f1-12345EXAMPLE",
               "fromBundleId": "nano_1_0",
               "fromBlueprintId": "wordpress_4_6_1",
               "createdAt": 1480898073.653,
               "location": {
                   "availabilityZone": "all",
                   "regionName": "us-east-2"
               }
           }
       ]
   }
   ```

1. Copy the **name** value to some place where you can get it later. This is the `--instance-snapshot-name` value you will use in your AWS CLI command.

## Step 2: Choose a bundle
<a name="create-larger-instance-from-snapshot-get-your-snapshot-name"></a>

A *bundle* is really just a pricing plan and a configuration for your instance. For example, **Medium** Linux-based bundles cost \$124 USD per month and have 4.0 GB of RAM, 80 GB SSD storage, and so on.

If you started out with a smaller bundle and need more compute power, you might want to upgrade to a larger bundle. For more information, see [Create a larger instance, block storage disk, or database from a snapshot](how-to-create-larger-instance-from-snapshot-using-console.md).

**Important**  
You cannot resize to a smaller bundle from a snapshot. If you want to create a smaller bundle, you have to start over.

1. Type the following AWS CLI command.

   ```
   aws lightsail get-bundles
   ```

   Your output should be similar to the following.

   ```
   {
       "bundles": [
           {
               "price": 5.0,
               "cpuCount": 2,
               "diskSizeInGb": 20,
               "bundleId": "nano_3_0",
               "instanceType": "nano",
               "isActive": true,
               "name": "Nano",
               "power": 298,
               "ramSizeInGb": 0.5,
               "transferPerMonthInGb": 1024,
               "supportedPlatforms": [
                   "LINUX_UNIX"
               ],
               },
           {
               "price": 7.0,
               "cpuCount": 2,
               "diskSizeInGb": 40,
               "bundleId": "micro_3_0",
               "instanceType": "micro",
               "isActive": true,
               "name": "Micro",
               "power": 500,
               "ramSizeInGb": 1.0,
               "transferPerMonthInGb": 2048,
               "supportedPlatforms": [
                   "LINUX_UNIX"
               ],
               },
           {
               "price": 12.0,
               "cpuCount": 2,
               "diskSizeInGb": 60,
               "bundleId": "small_3_0",
               "instanceType": "small",
               "isActive": true,
               "name": "Small",
               "power": 1000,
               "ramSizeInGb": 2.0,
               "transferPerMonthInGb": 3072,
               "supportedPlatforms": [
                   "LINUX_UNIX"
               ],
               },
           {
               "price": 24.0,
               "cpuCount": 2,
               "diskSizeInGb": 80,
               "bundleId": "medium_3_0",
               "instanceType": "medium",
               "isActive": true,
               "name": "Medium",
               "power": 2000,
               "ramSizeInGb": 4.0,
               "transferPerMonthInGb": 4096,
               "supportedPlatforms": [
                   "LINUX_UNIX"
               ],
               },
           {
               "price": 44.0,
               "cpuCount": 2,
               "diskSizeInGb": 160,
               "bundleId": "large_3_0",
               "instanceType": "large",
               "isActive": true,
               "name": "Large",
               "power": 3000,
               "ramSizeInGb": 8.0,
               "transferPerMonthInGb": 5120,
               "supportedPlatforms": [
                   "LINUX_UNIX"
               ],
               },
       ]
   }
   ```

1. Locate the **bundleId** value of the bundle you want. For more information, see [Lightsail Pricing](https://amazonlightsail.com/pricing/).

## Step 3: Write your AWS CLI command and create your new instance
<a name="create-larger-instance-from-snapshot-create-your-cli-command"></a>

Now that you have your parameter values, you're ready to write and execute your command to create the instance\$1

1. Type the following.

   ```
   aws lightsail create-instances-from-snapshot --instance-names MyNewInstanceFromSnapshot --availability-zone us-east-1a --instance-snapshot-name WordPress-512MB-EXAMPLE-system-1234567891011 --bundle-id medium_1_0
   ```

   Your output should be similar to the following.

   ```
   {
       "operations": [
           {
               "status": "Started",
               "resourceType": "Instance",
               "isTerminal": false,
               "statusChangedAt": 1486863990.961,
               "location": {
                   "availabilityZone": "us-east-2a",
                   "regionName": "us-east-2"
               },
               "operationType": "CreateInstance",
               "resourceName": "MyNewInstanceFromSnapshot",
               "id": "30fec45e-e7d7-4e18-96c8-12345EXAMPLE",
               "createdAt": 1486863989.784
           }
       ]
   }
   ```
**Note**  
You can also return a list of regions and Availability Zones using the AWS CLI. Just type `aws lightsail get-regions --include-availability-zones` to return the list of availability zones with your `get-regions` request.

1. Now open your new instance in the Lightsail console and start modifying it.

## Next steps
<a name="create-larger-instance-from-snapshot-next-steps"></a>

After you create your new instance from a snapshot, here are some things you can do next:
+ If you're done with the old instance, you might want to delete it. You can do this by using the Lightsail console or the [delete-instance CLI command](http://docs.aws.amazon.com/cli/latest/reference/lightsail/delete-instance.html).
+ If you don't need the old snapshot, you might want to delete it. You can do this by using the Lightsail console or the [delete-instance-snapshot CLI command](http://docs.aws.amazon.com/cli/latest/reference/lightsail/delete-instance-snapshot.html).
+ If you had a static IP address attached to your old instance, you might want to keep it and attach it to the new instance. You can do this by using the console. See [Create a static IP and attach it to an instance](lightsail-create-static-ip.md).

# Delete unused Lightsail snapshots to avoid monthly charges
<a name="amazon-lightsail-deleting-snapshots"></a>

Delete instance, database, and disk snapshots in Amazon Lightsail if you no longer need them to avoid incurring a monthly charge.

**Delete an individual snapshot**
**Important**  
This is a permanent operation and can't be undone. You will lose all data on the snapshots when you delete them.

1. On the [Lightsail console](https://lightsail.aws.amazon.com/), choose **Snapshots** tab.

1. Find the Lightsail resource whose snapshot you want to delete, and choose the right-arrow to expand the list of available snapshots for that resource.

1. Choose the actions menu icon (⋮) next to the snapshot you want to delete, and choose **Delete snapshot**.  
![\[Delete a snapshot in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-delete-snapshot-menu-option.png)

1. Choose **Yes** to confirm that you want to delete the snapshot.

**Delete multiple snapshots**
**Important**  
This is a permanent operation and can't be undone. You will lose all data on the snapshots when you delete them.

1. From the Lightsail home page, choose **Snapshots**.

1. Find the Lightsail resource whose snapshots you want to delete and expand the snapshots section for the resource.

1. Select the snapshots for the resource to delete, then choose **Delete**.  
![\[Use the shortcut menu to show your disk snapshots and delete multiple disk snapshots\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/delete-disk-snapshot-multiple.png)

1. Choose **Yes** to confirm that you want to delete the snapshots.

# Copy Lightsail snapshots across AWS Regions
<a name="amazon-lightsail-copying-snapshots-from-one-region-to-another"></a>

In Amazon Lightsail, you can copy instance snapshots and block storage disk snapshots from one AWS Region to another, or within the same Region. For example, you can copy snapshots between Regions if you created and configured resources in one Region, but later decide that a different Region is more appropriate. You might also decide to replicate your resources across multiple Regions.

## Prerequisites
<a name="copying-snapshots-from-one-region-to-another-prerequisites"></a>

Create a snapshot of the Lightsail instance or block storage disk that you want to copy. For more information, see one of the following guides:
+ [Create a snapshot of your Linux or Unix instance](lightsail-how-to-create-a-snapshot-of-your-instance.md)
+ [Create a snapshot of your Windows Server instance](prepare-windows-based-instance-and-create-snapshot.md)
+ [Create a block storage disk snapshot](create-block-storage-disk-snapshot.md)

## Copy a snapshot
<a name="copy-a-snapshot-from-one-region-to-another"></a>

You can copy Lightsail instance snapshots and block storage disk snapshots from one AWS Region to another, or within the same Region.

**To copy a Lightsail snapshot**

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. From the Lightsail home page, choose the **Snapshots** tab.

1. Locate the instance or block storage disk that you want to copy, and expand the node to view the available snapshots for that resource.

1. Choose the actions menu icon (⋮) for the desired snapshot, then choose **Copy to another Region**.  
![\[Copy snapshot to another Region in the Amazon Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-copy-snapshot-to-another-region.png)

1. On the **Copy a snapshot** page, in the **Snapshot to copy** section, confirm that the snapshot details displayed match the specifications of the source instance or block storage disk.  
![\[Snapshot to copy in the Amazon Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-copy-snapshot-snapshot-to-copy.png)

1. In the **Select a Region** section of the page, choose the Region for your snapshot copy.

1. Enter a name for your snapshot copy.

   Resource names:
   + Must be unique within each AWS Region in your Lightsail account.
   + Must contain 2 to 255 characters.
   + Must start and end with an alphanumeric character or number.
   + Can include alphanumeric characters, numbers, periods, dashes, and underscores.

1. Choose **Copy snapshot**.  
![\[Copy snapshot in the Amazon Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-copy-snapshot-name-snapshot.png)

   Your snapshot copy should be available soon. It depends on the size and configuration of the source instance. You can check the status of your snapshot copy by browsing to the **Snapshots** tab In the left navigation pane, and looking for the snapshot status. You should see a status of **Snapshotting...** as shown in the following image. Once the process is complete and the snapshot is ready for use, a **Copied on** timestamp will be displayed.  
![\[Creating snapshot copy in the Amazon Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-copy-snapshot-creating-snapshot-copy.png)

## Next steps
<a name="copying-snapshots-from-one-region-to-another-next-steps"></a>

Here are a few additional steps you can perform after copying a snapshot to another Region in Lightsail:
+ Create a new instance from the copied snapshot after it’s available. For more information, see [Create an instance from a snapshot](lightsail-how-to-create-instance-from-snapshot.md).
+ Delete the source snapshot if you no longer need it. Otherwise, you will be billed for storing the snapshot.

# Learn how to export Lightsail snapshots to Amazon EC2
<a name="amazon-lightsail-exporting-snapshots"></a>

You can export Lightsail snapshots to Amazon EC2, create EC2 resources from exported snapshots, choose compatible EC2 instance types, connect to EC2 instances, and secure EC2 instances created from Lightsail snapshots. Amazon Lightsail instance and block storage disk snapshots can be exported to Amazon Elastic Compute Cloud (Amazon EC2) using one of the following methods:
+ The Lightsail console. For more information, see [Export snapshots to Amazon EC2](amazon-lightsail-exporting-snapshots-to-amazon-ec2.md).
+ The Lightsail API, AWS Command Line Interface (AWS CLI), or SDKs. For more information, see the [ExportSnapshot operation](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_ExportSnapshot.html) in the Lightsail API documentation, or the [export-snapshot command](https://docs.aws.amazon.com/cli/latest/reference/lightsail/export-snapshot.html) in the AWS CLI documentation.

You can export instance snapshots and block storage disk snapshots. However, snapshots of cPanel & WHM (CentOS 7) instances cannot be exported to Amazon EC2. Snapshots are exported to the same AWS Region from Lightsail to Amazon EC2. To export snapshots to a different Region, first copy the snapshot to a different Region in Lightsail, then perform the export. For more information, see [Copy snapshots from one AWS Region to another](amazon-lightsail-copying-snapshots-from-one-region-to-another.md).

Exporting a Lightsail instance snapshot results in an Amazon Machine Image (AMI) and an Amazon Elastic Block Store (Amazon EBS) snapshot being created in Amazon EC2. This is because Lightsail instances consist of an image and a system disk, which are grouped together as a single instance entity in the Lightsail console for more efficient management. If the source Lightsail instance had one or more block storage disks attached to it when the snapshot was created, then additional EBS snapshots for each attached disk will be created in Amazon EC2. Exporting a Lightsail block storage disk snapshot results in a single EBS snapshot being created in Amazon EC2. All exported resources in Amazon EC2 have their own distinct unique identifiers that are different than their Lightsail counterparts.

![\[Exporting Lightsail snapshots to Amazon EC2.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-export-snapshot-diagram.png)


**Note**  
Lightsail uses an AWS Identity and Access Management (IAM) service-linked role (SLR) to export snapshots to Amazon EC2. For more information about SLRs, see [Service-linked roles](amazon-lightsail-using-service-linked-roles.md).

The export process can take a while. It depends on the size and configuration of the source instance or block storage disk. Use the **Exports** section in the Lightsail console to track the status of your export. For more information, see [Track snapshot export status in Lightsail](amazon-lightsail-task-monitor.md).

## Create Amazon EC2 resources from exported Lightsail snapshots
<a name="creating-amazon-ec2-resources-from-exported-snapshots"></a>

After a Lightsail snapshot is exported and available in Amazon EC2 (as an AMI, EBS snapshot, or both), you can create Amazon EC2 resources from the snapshot using one of the following methods:
+ The **Create an Amazon EC2 instance** page in the Lightsail console, also known as the Upgrade to Amazon EC2 Wizard. For more information, see [Create Amazon EC2 instances from exported snapshots](amazon-lightsail-creating-ec2-instances-from-exported-snapshots.md).
+ The Lightsail API, AWS CLI, or SDKs. For more information, see the [CreateCloudFormationStack operation](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_CreateCloudFormationStack.html) in the Lightsail API documentation, or the [create-cloud-formation-stack command](https://docs.aws.amazon.com/cli/latest/reference/lightsail/create-cloud-formation-stack.html) in the AWS CLI documentation.
**Note**  
Lightsail can be used to create Amazon EC2 instances from exported instance snapshots, but it cannot be used to create EBS volumes from exported block storage disk snapshots. For this, you must use the Amazon EC2 console, API, or AWS CLI. For more information, see [Create Amazon EBS volumes from exported disk snapshots](amazon-lightsail-creating-ebs-volumes-from-exported-snapshots.md).
+ The Amazon EC2 console, Amazon EC2 API, AWS CLI, or SDKs. For more information, see [Launching an Instance Using the Launch Instance Wizard](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/launching-instance.html) or [Restoring an Amazon EBS Volume from a Snapshot](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html) in the Amazon EC2 documentation.

Creating an Amazon EC2 instance from an exported instance snapshot (AMI and EBS snapshot) results in a single EC2 instance being launched. The AMI and EBS snapshot that resulted from exporting the Lightsail instance snapshot are automatically linked together to form the EC2 instance. The exported Lightsail block storage disk snapshot (EBS snapshot) can be used to create an EBS volume in Amazon EC2.

![\[Exporting Lightsail snapshots to Amazon EC2.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-create-resources-diagram.png)


**Note**  
Lightsail uses a CloudFormation stack to create instances and their related resources in EC2. For more information, see [CloudFormation stacks for Lightsail](amazon-lightsail-cloudformation-stacks.md).

The process to create Amazon EC2 resources from an exported snapshot can take a while. It depends on the size and configuration of the source instance. Use the **Exports** section in the Lightsail console to track the status of your export. For more information, see [Track snapshot export status in Lightsail](amazon-lightsail-task-monitor.md)..

## Choosing an Amazon EC2 instance type
<a name="choosing-an-amazon-ec2-isntance-type"></a>

Amazon EC2 offers a wider range of instance options than are available in Lightsail. In Amazon EC2, you can choose instance types that are optimized for compute (C5), memory (R5), or a balance of both (T3 and M5). Lightsail provides these options in the **Create an Amazon EC2 instance** page; however, more instance type options are available if you use Amazon EC2 to create new instances from an exported snapshot. For more information about EC2 instance types, see [Instance Types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the Amazon EC2 documentation.

Before you create EC2 instances from exported snapshots, it is important to understand the instance price differences between Lightsail and Amazon EC2. For more information about instance pricing, see the [Lightsail pricing](https://aws.amazon.com/lightsail/pricing/) and [Amazon EC2 pricing](https://aws.amazon.com/ec2/pricing/on-demand/) pages.

**Lightsail and Amazon EC2 instance type compatibility**

Some Lightsail instances are incompatible with the current generation EC2 instance types (T3, M5, C5, or R5) because they are not enabled for enhanced networking. If your source Lightsail instance is incompatible, you will need to choose a previous generation instance type (T2, M4, C4, or R4) when creating an EC2 instance from your exported snapshot. These options are presented to you when creating an EC2 instance using the **Create an Amazon EC2 instance** page in the Lightsail console.

To use the latest generation EC2 instance types when the source Lightsail instance is incompatible, you need to create the new EC2 instance using a previous generation instance type (T2, M4, C4, or R4), update the networking driver, and then upgrade the instance to the desired current generation instance type. For more information, see [Enhanced networking for Amazon EC2 instances](amazon-lightsail-updating-ec2-instances.md).

## Connect to Amazon EC2 instances
<a name="connecting-to-amazon-ec2-instances"></a>

You can connect to Amazon EC2 instances similar to how you connect to Lightsail instances. This means using SSH for Linux and Unix instances and RDP for Windows Server instances. However, the browser-based SSH/RDP client that you might have used in the Lightsail console might not be available in Amazon EC2 depending on the browser version that you're using, so you may need to configure your own SSH/RDP client to connect to your EC2 instances. For more information, see the following guides:
+ [Connect to an Amazon EC2 Linux or Unix instance that was created from a Lightsail snapshot](amazon-lightsail-connecting-to-linux-unix-amazon-ec2-instances.md)
+ [Connect to an Amazon EC2 Windows Server instance that was created from a Lightsail snapshot](amazon-lightsail-connecting-to-windows-server-amazon-ec2-instances.md)

## Secure an Amazon EC2 instance
<a name="securing-amazon-ec2-instances"></a>

After you create an EC2 instance from an exported Lightsail snapshot, you may need to perform a few actions to improve the security of your new instances. The actions are different depending on the operating system of your EC2 instance.

**Securing Linux and Unix instances in Amazon EC2**

If you create a Linux or Unix instance in Amazon EC2 from an exported snapshot using EC2 (the EC2 console, the EC2 API, AWS CLI for EC2, or SDKs for EC2), the new EC2 instance may contain residual SSH keys from the Lightsail service. We recommend removing these keys to better secure the new instance.

For more information, see [Secure an Amazon EC2 Linux or Unix instance that was created from a Lightsail snapshot](amazon-lightsail-securing-linux-unix-amazon-ec2-instances.md).

**Securing Windows Server instances in Amazon EC2**

After you create a Windows Server instance in Amazon EC2 from an exported snapshot, any user in your AWS account with access to Lightsail and EC2 will be able to retrieve the default administrator password first assigned to the source instance, which is also the password for the new EC2 instance. For increased security, we recommend that you change the default administrator password for your Amazon EC2 instance, if you haven’t already done so.

For more information, see [Secure an Amazon EC2 Windows Server instance that was created from a Lightsail snapshot](amazon-lightsail-securing-windows-server-amazon-ec2-instances.md).

# Export Lightsail snapshots to Amazon EC2
<a name="amazon-lightsail-exporting-snapshots-to-amazon-ec2"></a>

You can export Amazon Lightsail instance and block storage disk snapshots to Amazon Elastic Compute Cloud (Amazon EC2). Exporting a Lightsail instance snapshot results in an Amazon Machine Image (AMI) and an Amazon Elastic Block Store (Amazon EBS) snapshot being created in Amazon EC2. This is because Lightsail instances consist of an image and a system disk, which are grouped together as a single instance entity in the Lightsail console for more efficient management. If the source Lightsail instance has one or more block storage disks attached to it when the snapshot is created, then additional EBS snapshots for each attached disk are created in Amazon EC2.

Exporting a Lightsail block storage disk snapshot results in a single EBS snapshot being created in Amazon EC2. All exported resources in Amazon EC2 have their own distinct unique identifiers that are different than their Lightsail counterparts.

This guide describes how to export a Lightsail snapshot, track the status of your export, and the next steps after the exported snapshot is available in Amazon EC2 (as an AMI, EBS snapshot, or both).

**Important**  
We recommend getting familiar with the Lightsail export process before completing the steps in this guide. For more information, see [Export snapshots to Amazon EC2](amazon-lightsail-exporting-snapshots.md).

**Contents**
+ [Service-linked role and required IAM permissions to export Lightsail snapshots](#service-linked-role-details)
+ [Prerequisites](#exporting-snapshots-to-amazon-ec2-prerequisites)
+ [Export a Lightsail snapshot to Amazon EC2](#exporting-a-lightsail-snapshot)
+ [Track the status of your export](#track-the-status-of-your-export)

## Service-linked role and required IAM permissions to export Lightsail snapshots
<a name="service-linked-role-details"></a>

Lightsail uses an AWS Identity and Access Management (IAM) service-linked role (SLR) to export snapshots to Amazon EC2. For more information about SLRs, see [Service-linked roles](amazon-lightsail-using-service-linked-roles.md).

The following additional permissions may need to be configured in IAM depending on the user that will perform the snapshot export:
+ If the [Amazon account root user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html) will perform the export, then continue to the [Prerequisites section](#exporting-snapshots-to-amazon-ec2-prerequisites) of this guide. The account root user already has the required permissions to perform the snapshot export.
+ If an IAM user will perform the export, then an AWS account administrator must add the following policy to the user. For more information about how to change permissions for a user, see [Changing Permissions for an IAM User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console) in the IAM documentation.

------
#### [ JSON ]

****  

  ```
  {
      "Version":"2012-10-17",		 	 	 
      "Statement": [
          {
              "Effect": "Allow",
              "Action": "iam:CreateServiceLinkedRole",
              "Resource": "arn:aws:iam::*:role/aws-service-role/lightsail.amazonaws.com/AWSServiceRoleForLightsail*",
              "Condition": {"StringLike": {"iam:AWSServiceName": "lightsail.amazonaws.com"}}
          },
          {
              "Effect": "Allow",
              "Action": "iam:PutRolePolicy",
              "Resource": "arn:aws:iam::*:role/aws-service-role/lightsail.amazonaws.com/AWSServiceRoleForLightsail*"
          }
      ]
  }
  ```

------

## Prerequisites
<a name="exporting-snapshots-to-amazon-ec2-prerequisites"></a>

Create a snapshot of the Lightsail instance or block storage disk that you want to export to Amazon EC2. For more information, see one of the following guides:
+ [Create a snapshot of your Linux or Unix instance](lightsail-how-to-create-a-snapshot-of-your-instance.md)
+ [Create a snapshot of your Windows Server instance](prepare-windows-based-instance-and-create-snapshot.md)
+ [Create a block storage disk snapshot](create-block-storage-disk-snapshot.md)

## Export a Lightsail snapshot to Amazon EC2
<a name="exporting-a-lightsail-snapshot"></a>

The most efficient way to export a snapshot to Amazon EC2 is by using the Lightsail console. You can also export snapshots using the Lightsail API, AWS Command Line Interface (AWS CLI), or SDKs. For more information, see the [ExportSnapshot operation](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_ExportSnapshot.html) in the Lightsail API documentation, or the [export-snapshot command](https://docs.aws.amazon.com/cli/latest/reference/lightsail/export-snapshot.html) in the AWS CLI documentation.

**Note**  
Snapshots are exported to the same AWS Region from Lightsail to Amazon EC2. To export snapshots to a different Region, first copy the snapshot to a different Region in Lightsail, then perform the export. For more information, see [Copy snapshots from one AWS Region to another](amazon-lightsail-copying-snapshots-from-one-region-to-another.md).

**To export a Lightsail snapshot to Amazon EC2**

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. Choose **Snapshots** in the left navigation pane.

1. Locate the instance or block storage disk that you want to export, and expand the node to view the available snapshots for that resource. 

1. Choose the **Action** menu for the desired snapshot, then choose **Export to Amazon EC2**.  
![\[Export snapshot in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-action-menu-export-snapshot.png)
**Note**  
Snapshots of cPanel & WHM (CentOS 7) instances cannot be exported to Amazon EC2.

1. Review the important details displayed on the prompt.

1. If you agree to export to Amazon EC2, choose **Yes, continue** to begin the process.

   The export process can take a while. It depends on the size and configuration of the source instance or block storage disk. Use the **Exports** section in the Lightsail console to track the status of your export. For more information, see [Track snapshot export status in Lightsail](amazon-lightsail-task-monitor.md).

## Track the status of your export
<a name="track-the-status-of-your-export"></a>

Track the status of your export in the **Exports** section of the Lightsail console. It can be accessed from the left navigation pane on all pages of the Lightsail console. For more information, see [Track snapshot export status in Lightsail](amazon-lightsail-task-monitor.md).

The following information is displayed in **Exports**:
+ **Snapshot name** — The name of the source Lightsail snapshot.
+ **Status** — The status of the export. This can be `In progress`, `Successful`, or `Failed`.
+ **Export started** — The date and time the snapshot export was started.
+ **Source details** — The specifications of the source Lightsail instance, such as the memory, processing, and storage.
+ **Source instance name** — The name of the source instance for the snapshot.
+ **Snapshot type** — The type of the Lightsail snapshot. It’s either an instance snapshot or disk snapshot.
+ **Snapshot created** — The date and time the source Lightsail snapshot was created.

The following information is displayed in the **Task history** section for the completed export:
+ **Create instance in EC2** — Choose this option to create a new instance in Amazon EC2 using the Lightsail console. For more information, see [Create Amazon EC2 instances from exported snapshots](amazon-lightsail-creating-ec2-instances-from-exported-snapshots.md).
+ **Open EC2** — Choose this option to use the Amazon EC2 console to create new EC2 resources from your exported snapshot. If you exported a Lightsail block storage disk snapshot, then you must use Amazon EC2 to create an EBS volume from the snapshot (an EBS snapshot). For more information, see [Launching an Instance Using the Launch Instance Wizard](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/launching-instance.html) or [Restoring an Amazon EBS Volume from a Snapshot](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html) in the Amazon EC2 documentation.

**Note**  
Delete the source Lightsail snapshot if you no longer need it. Otherwise, you will be billed for storing it.

# Track snapshot export status in Lightsail
<a name="amazon-lightsail-task-monitor"></a>

The **Exports** section on the Amazon Lightsail console, is where you can track the status of exporting Lightsail snapshots to Amazon EC2, or creating new EC2 instances from exported instance snapshots. Export tasks can take a while depending on the size and configuration of the source instance or block storage disk. **Exports** can be accessed from the left navigation pane on all pages of the Lightsail console.

![\[The exports section of the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-task-monitor.png)


For more information about exporting Lightsail snapshots to Amazon EC2, or creating EC2 instances from exported snapshots, see the following guides:
+ [Export snapshots to Amazon EC2](amazon-lightsail-exporting-snapshots-to-amazon-ec2.md)
+ [Create Amazon EC2 instances from exported snapshots](amazon-lightsail-creating-ec2-instances-from-exported-snapshots.md)

# Create Amazon EC2 instances from exported Lightsail snapshots
<a name="amazon-lightsail-creating-ec2-instances-from-exported-snapshots"></a>

After a Lightsail instance snapshot is exported and available in Amazon EC2 (as an AMI and an EBS snapshot), you can create an Amazon EC2 instance from the snapshot using the **Create an Amazon EC2 instance** page in the Amazon Lightsail console, also known as the Upgrade to Amazon EC2 wizard. It guides you through the EC2 instance configuration options, such as choosing an EC2 instance type that matches your requirements, configuring your security group ports, adding a launch script, and more. The wizard in the Lightsail console simplifies the process of creating new EC2 instances and their related resources.

**Note**  
To create Amazon Elastic Block Store (Amazon EBS) volumes from exported block storage disk snapshots, see [Create Amazon EBS volumes from exported disk snapshots](amazon-lightsail-creating-ebs-volumes-from-exported-snapshots.md).

You can also create new EC2 instances using the Lightsail API, AWS CLI, or SDKs. For more information, see the [CreateCloudFormationStack operation](https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_CreateCloudFormationStack.html) in the Lightsail API documentation, or the [create-cloud-formation-stack command](https://docs.aws.amazon.com/cli/latest/reference/lightsail/create-cloud-formation-stack.html) in the AWS CLI documentation. Or if you're comfortable with Amazon EC2, you can use the EC2 console, Amazon EC2 API, AWS CLI, or SDKs. For more information, see [Launching an Instance Using the Launch Instance Wizard](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/launching-instance.html) or [Restoring an Amazon EBS Volume from a Snapshot](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html) in the Amazon EC2 documentation.

**Important**  
We recommend getting familiar with the Lightsail export process before completing the steps in this guide. For more information, see [Export snapshots to Amazon EC2](amazon-lightsail-exporting-snapshots.md).

**Contents**
+ [CloudFormation stack for Lightsail](#aws-cloud-formation-stack)
+ [Prerequisites](#creating-ec2-instances-from-exported-snapshots-prerequisites)
+ [Access the Create an Amazon EC2 instance page in the Lightsail console](#access-the-create-an-instance-page)
+ [Create an Amazon EC2 instance](#create-new-instances)
+ [Track the status of your new Amazon EC2 instance](#track-the-status)

## CloudFormation stack for Lightsail
<a name="aws-cloud-formation-stack"></a>

Lightsail uses an CloudFormation stack to create EC2 instances and their related resources. For more information about the CloudFormation stacks for Lightsail, see [CloudFormation stacks for Lightsail](amazon-lightsail-cloudformation-stacks.md).

The following additional permissions may need to be configured in IAM depending on the user that will create the EC2 instance using the **Create an Amazon EC2 instance** page:
+ If the [Amazon account root user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html) will create the EC2 instance, then continue to the [Prerequisites section](#creating-ec2-instances-from-exported-snapshots-prerequisites) of this guide. The root user already has the required permissions to create EC2 instances using Lightsail.
+ If an IAM user will create the EC2 instance, then an AWS account administrator must add the following permissions to the user. For more information about how to change permissions for a user, see [Changing Permissions for an IAM User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console) in the IAM documentation.
  + The following permissions are required for users to create Amazon EC2 instances using Lightsail:
**Note**  
These permissions allow the CloudFormation stack to be created. However, if the creation fails, the rollback process might require more permissions. Lack of permissions may lead to remaining resources not rolled back in Amazon EC2. If this happens, you can go to the CloudFormation console and manually delete the EC2 resources. For more information, see [CloudFormation stacks for Lightsail](amazon-lightsail-cloudformation-stacks.md)
    + ec2:DescribeAvailabilityZones
    + ec2:DescribeSubnets
    + ec2:DescribeRouteTables
    + ec2:DescribeInternetGateways
    + ec2:DescribeVpcs
    + cloudformation:CreateStack
    + cloudformation:ValidateTemplate
    + iam:CreateServiceLinkedRole
    + iam:PutRolePolicy
  + The following permissions are required if the user will configure ports in the security group for the EC2 instance:
    + ec2:DescribeSecurityGroups
    + ec2:CreateSecurityGroup
    + ec2:AuthorizeSecurityGroupIngress
  + The following permissions are required if the user is creating a Windows Server instance in Amazon EC2:
    + ec2:DescribeKeyPairs
    + ec2:ImportKeyPair
  + The following permissions are required if the user is creating Amazon EC2 instances for the first time, or when the virtual private cloud (VPC) fails to configure completely:
    + ec2:AssociateRouteTable
    + ec2:AttachInternetGateway
    + ec2:CreateInternetGateway
    + ec2:CreateRoute
    + ec2:CreateRouteTable
    + ec2:CreateSubnet
    + ec2:CreateVpc
    + ec2:ModifySubnetAttribute
    + ec2:ModifyVpcAttribute

## Prerequisites
<a name="creating-ec2-instances-from-exported-snapshots-prerequisites"></a>

Export a Lightsail instance snapshot to Amazon EC2. For more information, see [Export snapshots to Amazon EC2](amazon-lightsail-exporting-snapshots-to-amazon-ec2.md).

## Access the Create an Amazon EC2 instance page in the Lightsail console
<a name="access-the-create-an-instance-page"></a>

The **Create an Amazon EC2 instance** page in the Lightsail console can be accessed from the task monitor only after an instance snapshot is successfully exported to EC2.

**To access the Create an Amazon EC2 instance page in the Lightsail console**

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. From the top navigation pane, choose the **Task monitor** icon.

1. Locate the completed instance snapshot export in the **Task history** section, then choose **Create instance in EC2**.  
![\[Task monitor in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-task-monitor-create-instance.png)

   The **Create an Amazon EC2 instance** page appears. Continue to the following [Create an Amazon EC2 instance](#create-new-instances) section of this guide to learn how to configure and create an EC2 instance using this page.

## Create an Amazon EC2 instance
<a name="create-new-instances"></a>

Use the **Create an Amazon EC2 instance** page to create an EC2 instance. To create more than one EC2 instance from an exported Lightsail snapshot, repeat the following steps multiple times but wait until each instance is created before creating the next one.

**To create an Amazon EC2 instance**

1. On the **Amazon EC2 AMI details** section of the page, confirm that the Amazon Machine Image (AMI) details displayed match the specifications of the source Lightsail instance.  
![\[Amazon EC2 AMI details on the Create an Amazon EC2 instance page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-create-an-ec2-instance-ami-details.png)

1. On the **Resource location** section of the page, change the Availability Zone of your instance if necessary. The Amazon EC2 resources are created in the same AWS Region as the source Lightsail snapshot.
**Note**  
Not all Availability Zones may be available for all users. Choosing an unavailable Availability Zone will result in an error when creating the EC2 instance.  
![\[Resource location options on the Create an Amazon EC2 instance page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-create-an-ec2-instance-resource-location.png)

1. On the **Compute resource** section of the page, choose one of the following options:  
![\[Compute resource options on the Create an Amazon EC2 instance page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-create-an-ec2-instance-compute-resource.png)

   1. **Find closest match** to automatically select an Amazon EC2 instance type that closely matches the specifications of the source Lightsail instance.

   1. **Help me choose** to answer a quick questionnaire about the specifications of your new Amazon EC2 instance. You can select from instance types that are compute optimized, memory optimized, or balanced between the two.

   1. **Select manually** to view a list of instance types available through the **Create an Amazon EC2 instance** page.
**Note**  
Some Lightsail instances are incompatible with the current generation EC2 instance types (T3, M5, C5, or R5) because they are not enabled for enhanced networking. If your source Lightsail instance is incompatible, you will need to choose a previous generation instance type (T2, M4, C4, or R4) when creating an EC2 instance from your exported snapshot. These instance type options are presented to you on the **Create an Amazon EC2 instance** page in the Lightsail console.  
To use the latest generation EC2 instance types when the source Lightsail instance is incompatible, you need to create the new EC2 instance using a previous generation instance type (T2, M4, C4, or R4), update the networking driver, and then upgrade the instance to the desired current generation instance type. For more information, see [Update Amazon EC2 instances for enhanced networking](amazon-lightsail-updating-ec2-instances.md).

1. On the **Optional** section of the page:  
![\[Optional settings on the Create an Amazon EC2 instance page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-create-an-ec2-instance-optional-settings.png)

   1. Choose **Specify port configuration** to select the firewall settings for your Amazon EC2 instance, then choose one of the following options:  
![\[Security group settings on the Create an Amazon EC2 instance page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-create-an-ec2-instance-security-groups.png)

      1. **Use the default firewall settings from the Lightsail image** to configure the default ports from the source Lightsail blueprint on your new EC2 instance. For more information about the default ports for Lightsail blueprints, see [Firewalls and ports](understanding-firewall-and-port-mappings-in-amazon-lightsail.md).

      1. **Use the source Lightsail instance firewall settings** to configures the ports from the source Lightsail instance on your new EC2 instance. This option is only available when the source Lightsail instance is still running.

   1. On the **Launch script** section of the page, choose **Add launch script** if you wish to add a script that configures your EC2 instance when it launches.

1. On the **Connection security** section of the page, determine how you connected to the source Lightsail instance. This ensures that you get the correct SSH key to connect to your new EC2 instance. You may have connected to the source Lightsail instance using one of the following methods:

   1. **Using the default Lightsail key pair for the source instance’s region** — Download and use the unique default Lightsail key for that AWS Region to connect to your EC2 instance.
**Note**  
The default Lightsail key pair is always used on Windows Server instances in Lightsail.

   1. **Using your own key pair** — Locate the private key and use it to connect to your EC2 instance.
**Note**  
Lightsail does not store your personal private keys. Therefore; the option to download your private key is not provided. If you are unable to locate your private key, then you will not be able to connect to your EC2 instance.

1. On the **Storage resources** section of the page, confirm that the EBS volumes being created match the system disk and any attached block storage disks for the source Lightsail instance.  
![\[Storage resources on the Create an Amazon EC2 instance page.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-create-an-ec2-instance-storage-resources.png)

1. Review the important details about creating resources outside of Lightsail.

1. If you agree to create the instance in Amazon EC2, choose **Create resources in EC2**.

   Lightsail confirms that your instance is being created, and information about the CloudFormation stack is displayed. Lightsail uses a CloudFormation stack to create the EC2 instance and its related resources. For more information, see [CloudFormation stacks for Lightsail](amazon-lightsail-cloudformation-stacks.md).

   Continue to the [Track the status of your new Amazon EC2 instance](#track-the-status) section of this guide to track the status of your new EC2 instance.
**Important**  
Wait until after your new EC2 instance is created to create another EC2 instance from the same exported snapshot.

## Track the status of your new Amazon EC2 instance
<a name="track-the-status"></a>

Use the **Exports** section in the Lightsail console to track the status of your EC2 instance. For more information, see [Track snapshot export status in Lightsail](amazon-lightsail-task-monitor.md).

The following information is displayed for EC2 instances being created:
+ **Source name** — The name of the source Lightsail snapshot.
+ **Started** — The date and time that the create request was started.

The following information is displayed in the task monitor for EC2 instances that have been created:
+ **Created** is displayed if the Amazon EC2 resources were successfully created.
+ **Failed** is displayed if there was a problem creating EC2 instance.

# Create Amazon Elastic Block Store volumes from exported Lightsail disk snapshots
<a name="amazon-lightsail-creating-ebs-volumes-from-exported-snapshots"></a>

After a Lightsail block storage disk snapshot is exported and available in Amazon EC2 (as an EBS snapshot), you can create an EBS volume from the snapshot using the Amazon EC2 console.

**Note**  
To create EC2 instances from exported instance snapshots, see [Creating Amazon EC2 instances from exported snapshots in Lightsail](amazon-lightsail-creating-ec2-instances-from-exported-snapshots.md#amazon-lightsail-creating-ec2-instances-from-exported-snapshots.title).

You can also create new EBS volumes using the Amazon EC2 API, AWS CLI, or SDKs. For more information, see [Launch an Instance Using the Launch Instance Wizard](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/launching-instance.html) or [Restoring an Amazon EBS Volume from a Snapshot](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html) in the Amazon EC2 documentation.

**Important**  
We recommend getting familiar with the Lightsail export process before completing the steps in this guide. For more information, see [Export snapshots to Amazon EC2](amazon-lightsail-exporting-snapshots.md).

## Prerequisites
<a name="creating-ebs-volumes-from-exported-snapshots-prerequisites"></a>

Export a Lightsail block storage disk snapshot to Amazon EC2. For more information, see [Export snapshots to Amazon EC2](amazon-lightsail-exporting-snapshots-to-amazon-ec2.md).

## Create an EBS volume from an exported Lightsail block storage disk snapshot
<a name="create-an-ebs-volume-from-exported-snapshot"></a>

Use the Amazon EC2 console to create a new EBS volume from an exported Lightsail block storage disk snapshot.

**Note**  
These steps are also in the Amazon EC2 documentation. To learn more, see [Restoring an Amazon EBS Volume from a Snapshot](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html) in the Amazon EC2 documentation.

**To create an EBS volume from an exported Lightsail block storage disk snapshot**

1. Sign in to the [Amazon EC2 console](https://console.aws.amazon.com/ec2/).

1. From the navigation bar, select the region that your snapshot is located in.

1. In the left navigation pane, under **Elastic Block Store**, choose **Snapshots**.

1. Locate and select the exported Lightsail block storage disk snapshot.

   Exported disk snapshot can be identified by the *A disk snapshot exported from Amazon Lightsail* description of the EBS snapshot as shown in the following screenshot:  
![\[EBS snapshots in the Amazon EC2 console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ec2-console-ebs-snapshots.png)

1. Choose **Actions**, then choose **Create Volume**.

1. Choose a volume type from the **Volume Type** drop-down menu. For more information, see [Amazon EBS Volume Types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) in the Amazon EC2 documentation.

1. For **Size (GiB)**, type the size of the volume, or verify that the default size of the snapshot is adequate.

1. With a Provisioned IOPS SSD volume, for **IOPS**, type the maximum number of input/output operations per second (IOPS) that the volume should support.

1. For **Availability Zone**, choose the Availability Zone in which to create the volume. EBS volumes can only be attached to EC2 instances in the same Availability Zone.

1. (Optional) Choose **Create additional tags** to add tags to the volume. For each tag, provide a tag key and a tag value.

1. Choose **Create Volume**. After your volume is created, it is listed in the **Elastic Block Store > Volumes** section of the Amazon EC2 console.

# Connect to a Linux Amazon EC2 instance created from a Lightsail snapshot
<a name="amazon-lightsail-connecting-to-linux-unix-amazon-ec2-instances"></a>

After a Linux or Unix instance is created in Amazon Elastic Compute Cloud (Amazon EC2) from an Amazon Lightsail snapshot, you can connect to the instance via SSH similar to how you connected to the source Lightsail instance. To authenticate to your instance, use either the default Lightsail key pair for the source instance’s AWS Region, or your own key pair. This guide shows you how to connect to your Linux or Unix instance in EC2 using PuTTY.

**Note**  
For more information about connecting to a Windows Server instance, see [Connect to an Amazon EC2 Windows Server instance that was created from a Lightsail snapshot](amazon-lightsail-connecting-to-windows-server-amazon-ec2-instances.md).

**Contents**
+ [Get the key for your instance](#get-the-key-linux-unix-instance)
+ [Get the public DNS address for your instance](#get-the-public-dns-address-for-your-linux-unix-instance)
+ [Download and install PuTTY](#download-and-install-putty)
+ [Configure the key with PuTTYgen](#configure-the-key-with-puttygen)
+ [Configure PuTTY to connect to your instance](#configure-putty-to-connect)
+ [Next steps](#connecting-to-linux-unix-instances-next-steps)

## Get the key for your instance
<a name="get-the-key-linux-unix-instance"></a>

Get the correct key required to connect to your new Amazon EC2 instance. The key that you need depends on how you connected to the source Lightsail instance. You may have connected to the source Lightsail instance using one of the following methods:
+ **Using the default Lightsail key pair for the source instance’s Region** — Download the default private key from the **SSH keys** tab on the [Lightsail account page](https://lightsail.aws.amazon.com/ls/webapp/account/keys). For more information about the default Lightsail keys, see [SSH key pairs](understanding-ssh-in-amazon-lightsail.md).
**Note**  
After you connect to your EC2 instance, we recommend removing the default Lightsail key from the instance and replacing it with your own key pair. For more information, see [Secure your Linux or Unix instance in Amazon EC2 created from a Lightsail snapshot](amazon-lightsail-securing-linux-unix-amazon-ec2-instances.md).
+ **Using your own key pair** — Locate your private key and use it to connect to your Amazon EC2 instance. Lightsail does not store your private key when you use your own key pair. If you’ve lost your private key, you cannot connect to your Amazon EC2 instance.

## Get the public DNS address for your instance
<a name="get-the-public-dns-address-for-your-linux-unix-instance"></a>

Get the public DNS address for your Amazon EC2 instance, so that you can use it when configuring an SSH client, such as PuTTY, to connect to your instance.

**To get the public DNS address for your instance**

1. Sign in to the [Amazon EC2 console](https://console.aws.amazon.com/ec2/).

1. Choose **Instances** from the left navigation pane. 

1. Choose the running Linux or Unix instance that you want to connect to.

1. In the lower pane, locate the **Public DNS** address for your instance.

   This is the address that you will use when configuring an SSH client to connect to your instance. Continue to the [Download and install PuTTY](#download-and-install-putty) section of this guide to learn how to download and install the PuTTY SSH client.  
![\[An instance's public DNS in the Amazon EC2 console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ec2-public-dns.png)

## Download and install PuTTY
<a name="download-and-install-putty"></a>

PuTTY is a free SSH client for Windows. For more information about [PuTTY, see PuTTY: a free SSH and Telnet client](http://www.chiark.greenend.org.uk/~sgtatham/putty/). This website also describes the restrictions in countries where encryption isn't allowed. If you already have PuTTY, you can skip to the following *Configure the key with PuTTYgen* section of this guide.

[Download the PuTTY installer or executable file](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html). We recommend using the latest version. However, for information about which download to choose, see the [PuTTY documentation](http://www.chiark.greenend.org.uk/~sgtatham/putty/docs.html).

Continue to the [Configure the key with PuTTYgen](#configure-the-key-with-puttygen) section of this guide to configure the key with PuTTYgen.

## Configure the key with PuTTYgen
<a name="configure-the-key-with-puttygen"></a>

PuTTYgen generates pairs of public and private keys to be used with PuTTY. This step is required to use the key file type (.PPK) that PuTTY accepts.

**To configure the key with PuTTYgen**

1. Start PuTTYgen.

   For example, choose the **Windows Start** menu, choose **All Programs**, choose **PuTTY**, and choose **PuTTYgen**.  
![\[PuTTY Key Generator.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/puttygen-key-generator.png)

1. Choose **Load**.

   By default, PuTTYgen displays only files with the .PPK extension. To locate your .PEM file, select the option to display files of all types.  
![\[Load the Lightsail private key to the PuTTY Key Generator.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-putty-load-private-key.png)

1. Choose the default Lightsail key file (.PEM) that you downloaded earlier in this guide, and then choose **Open**.

1. After PuTTYgen confirms that you successfully imported the key, choose **OK**.  
![\[PuTTY Key Generator notice.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-putty-puttygen-notice.png)

1. Choose **Save private key**, and then confirm that you don't want to save it with a passphrase.

   If you create a passphrase as an extra measure of security, you must enter it every time you connect to your instance using PuTTY.  
![\[Save your private key in the PuTTY Key Generator.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-putty-save-private-key.png)

1. Specify a name and a location to save your private key, and then choose **Save**.

   PuTTYgen saves your new key file as a .PPK file type.

1. Close PuTTYgen.

   Continue to the [Configure PuTTY to connect to your instance](#configure-putty-to-connect) section of this guide to use the new .PPK file that you generated to configure PuTTY and connect to your Linux or Unix instance in Amazon EC2.

## Configure PuTTY to connect to your instance
<a name="configure-putty-to-connect"></a>

Configure PuTTY, now that you have all of the requirements to connect to your Linux or Unix instance using SSH.

**To configure PuTTY to connect to your Linux or Unix instance**

1. Open PuTTY.

   For example, choose the **Windows Start** menu, choose **All Programs**, choose **PuTTY**, and choose **PuTTY**.

1. In the **Host Name** text box, enter the public DNS address for your instance that you obtained from the Amazon EC2 console earlier in this guide.  
![\[PuTTY SSH client.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-putty-host-name.png)

1. Under the **Connection** section in the left navigation pane, choose **Data**.

1. In the **Auto-login username** text box, enter a user name to use when logging in to the instance.  
![\[Instance user name in PuTTY.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-putty-login-details.png)

   Enter one of the following default user names depending on the blueprint of the source Lightsail instance:
   + AlmaLinux, Amazon Linux 2, Amazon Linux 2023, CentOS Stream 9, FreeBSD, and openSUSE instances: `ec2-user`
   + Debian instances: `admin`
   + Ubuntu instances: `ubuntu`
   + Bitnami instances: `bitnami`
   + Plesk instances: `ubuntu`
   + cPanel & WHM instances: `centos`

1. Under the **Connection** section in the left navigation pane, expand **SSH**, and then choose **Auth**.

1. Choose **Browse** to navigate to the .PPK file that you created in the previous section of this guide, and then choose **Open**.  
![\[PuTTY authentication parameters.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-putty-authentication-parameters.png)

1. Choose **Open** to connect to your instance, and then choose **Yes** to trust this connection in the future.

   You should see a screen similar to the following if you've successfully connected to your instance:  
![\[PuTTY connected to an EC2 instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-putty-connected.png)

## Next steps
<a name="connecting-to-linux-unix-instances-next-steps"></a>

Your new Linux or Unix instance in Amazon EC2 contains residual keys from the Lightsail service, if you use Amazon EC2 to create new instances from your exported snapshots. We recommend removing these keys to enhance security for your new Amazon EC2 instance. For more information, see [Secure your Linux or Unix instance in Amazon EC2 created from a Lightsail snapshot](amazon-lightsail-securing-linux-unix-amazon-ec2-instances.md).

# Secure Amazon EC2 instances launched from Lightsail snapshots
<a name="amazon-lightsail-securing-linux-unix-amazon-ec2-instances"></a>

Amazon Lightsail, and Amazon Elastic Compute Cloud (Amazon EC2), use public–key cryptography to encrypt and decrypt login information. Public–key cryptography uses a public key to encrypt a piece of data, such as a password, then the recipient uses the private key to decrypt the data. The public and private keys are known as a key pair.

When you export a Linux or Unix Lightsail instance to EC2, the new EC2 instance will contain residual keys from the Lightsail service. As a security best practice, you should remove unused keys from your instance.

To improve the security of a Linux or Unix instance in EC2 that was created from a Lightsail snapshot, we recommend that you perform the following actions after creating the instance:
+ Remove and replace the Lightsail default key if you used it to connect to the source instance in Lightsail. The Lightsail default key is not present in your Amazon EC2 instance if you used your own key to connect to your instance, or you created a key for your instance in the Lightsail console.
+ Remove the Lightsail system key, also known as the `lightsail_instance_ca.pub` key. This key on Linux and Unix instances enables the Lightsail browser-based SSH client to connect. The `lightsail_instance_ca.pub` key is automatically removed when an EC2 instance is created using the **Create an Amazon EC2 instance** page in the Lightsail console or the Lightsail API.

**Contents**
+ [Create a private key using Amazon EC2](#create-a-private-key-using-ec2)
+ [Create the public key using PuTTYgen](#create-the-public-key-using-puttygen)
+ [Connect to your Linux or Unix instance in Amazon EC2](#connect-to-your-linux-or-unix-instance-in-amazon-ec2)
+ [Add the public key to your instance and test the connection](#add-the-public-key-to-your-instance-and-test)
+ [Remove the Lightsail default key](#remove-the-lightsail-default-key)
+ [Remove the Lightsail system key](#remove-the-lightsail-system-ssh-key)

## Create a private key using Amazon EC2
<a name="create-a-private-key-using-ec2"></a>

Use the Amazon EC2 console to create a new key pair that you can use to replace the Lightsail default key pair.

**To create a private key using Amazon EC2**

1. Sign in to the [Amazon EC2 console](https://console.aws.amazon.com/ec2/).

1. From the left navigation pane, choose **Key Pairs**.

1. Choose **Create key pair**.  
![\[Key pairs in the Amazon EC2 console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ec2-console-key-pairs.png)

1. Enter a name for the key into the **Key pair name** text box, then choose **Create key pair**. For more information on the creating key pairs in Amazon EC2, see [Create a key pair for your Amazon EC2 instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html) in the *Amazon Elastic Compute Cloud User Guide*.

   The new private key is automatically downloaded. Make note of where the private key is saved. You need it in the following *Create the public key using PuTTYgen* section of this guide to create a public key.  
![\[Create key pairs in the Amazon EC2 console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ec2-console-create-key-pair.png)

## Create the public key using PuTTYgen
<a name="create-the-public-key-using-puttygen"></a>

PuTTYgen is a tool that is included with PuTTY. Use PuTTYgen to generate the public key text that you add to your instance later in this guide.

**Note**  
For more information about how to configure PuTTY to connect to your Linux or Unix instance, see [Connect to an Amazon EC2 Linux or Unix instance that was created from a Lightsail snapshot](amazon-lightsail-connecting-to-linux-unix-amazon-ec2-instances.md).

**To create the public key using PuTTYgen**

1. Start PuTTYgen.

   For example, choose the **Windows Start** menu, choose **All Programs**, choose **PuTTY**, and choose **PuTTYgen**.  
![\[PuTTY Key Generator.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/puttygen-key-generator.png)

1. Choose **Load**.

   By default, PuTTYgen displays only files with the .PPK extension. To locate your .PEM file, select the option to display files of all types.  
![\[Load the Lightsail private key to the PuTTY Key Generator.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-putty-load-ec2-private-key.png)

1. Navigate to the location of your private key that was created earlier in this guide. Choose the private key, and then choose **Open**.

1. After PuTTYgen confirms that you successfully imported the key, choose **OK**.

1. Highlight the contents of the **Public key** text box and copy it to your clipboard by pressing **Ctrl\$1C** if you’re using Windows, or **Cmd\$1C** if you’re using macOS.

   Open a text editor, such as Notepad or TextEdit, and paste the public key text into it by pressing **Ctrl\$1V** if you're using Windows, or **Cmd\$1V** if you're using macOS. Save the file with your public key text; you will need it later in this guide.  
![\[PuTTY key generator.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-putty-key-generator.png)

1. Continue to the [Connect to your Linux or Unix instance in Amazon EC2](#connect-to-your-linux-or-unix-instance-in-amazon-ec2) section of this guide to connect to your EC2 instance and add the public key.

## Connect to your Linux or Unix instance in Amazon EC2
<a name="connect-to-your-linux-or-unix-instance-in-amazon-ec2"></a>

Connect to your Linux or Unix instance in Amazon EC2 using SSH to remove the Lightsail default key and system key. For more information, see [Connect to a Linux or Unix instance in Amazon EC2 created from an Amazon Lightsail snapshot](amazon-lightsail-connecting-to-linux-unix-amazon-ec2-instances.md).

Continue to the [Add the public key to your instance and test the connection](#add-the-public-key-to-your-instance-and-test) section of this guide after you’re connected to your instance in Amazon EC2.

## Add the public key to your instance and test the connection
<a name="add-the-public-key-to-your-instance-and-test"></a>

Public key content is saved in the `~/.ssh/authorized_keys` file on Linux and Unix instances. Edit the file to remove and replace the Lightsail default key from your Linux or Unix instance in Amazon EC2.

**To add the public key to your instance and test the connection**

1. After you establish an SSH connection to your instance, enter the following command to edit the `authorized_keys` file using the Vim text editor. 

   ```
   sudo vim ~/.ssh/authorized_keys
   ```
**Note**  
These steps use Vim for demonstration purposes. However, you can use any text editor for these steps.  
![\[Lightsail default key.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-lightsail-default-ssh-key.png)

1. Press the `I` key to enter the insert mode in the Vim editor.

1. Enter an extra line after the Lightsail default key. 

1. Copy and paste the public key text that you saved earlier in this guide.

   The result should look like the following:  
![\[Lightsail default key.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-lightsail-default-ssh-key-and-new-key.png)

1. Press the `ESC` key, and then enter `:wq!` to save your edits, and quit Vim.

1. Enter the following command to restart the Open SSH server:

   ```
   sudo /etc/init.d/sshd restart
   ```

   You should see a result similar to the following:  
![\[Lightsail default key.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-restarting-sshd.png)

   Your new public key is now added to your instance. To test the new key pair, disconnect from your instance. Configure PuTTY to use your new private key instead of the Lightsail default key. If you’re able to successfully connect to your instance using your new key pair, continue to the [Remove the Lightsail default key](#remove-the-lightsail-default-key) section of this guide to remove the Lightsail default key.

## Remove the Lightsail default key
<a name="remove-the-lightsail-default-key"></a>

Remove the Lightsail default key after you’ve added a new public key to your instance, and successfully connected to it using the new key pair.

**To remove the Lightsail default key**

1. After you establish an SSH connection to your instance, enter the following command to edit the `authorized_keys file` using the Vim text editor.

   ```
   sudo vim ~/.ssh/authorized_keys
   ```

1. Press the `I` key to enter the insert mode in the Vim editor.

1. Delete the line that ends with `LightsailDefaultKeyPair`. This is the Lightsail default key.  
![\[Lightsail default key.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-lightsail-default-delete-ssh-key.png)

1. Press the `ESC` key, and then enter `:wq!` to save your edits, and quit Vim.

1. Enter the following command to restart the Open SSH server:

   ```
   sudo /etc/init.d/sshd restart
   ```

   You should see a result similar to the following:  
![\[Lightsail default key.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-restarting-sshd.png)

   The Lightsail default key is now removed from your instance. Your instance will now refuse connections that use the Lightsail default key. Continue to the [Remove the Lightsail system key](#remove-the-lightsail-system-ssh-key) section of this guide to remove the Lightsail system key.

## Remove the Lightsail system key
<a name="remove-the-lightsail-system-ssh-key"></a>

The Lightsail system key, also known as the `lightsail_instance_ca.pub` key, on Linux and Unix instances enables the Lightsail browser-based SSH client to connect. Perform the following steps to remove the `lightsail_instance_ca.pub` key from your Linux or Unix instance in Amazon EC2, and edit the `/etc/ssh/sshd_config` file. The `/etc/ssh/sshd_config` file defines parameters for SSH connections to your instance.

**To remove the Lightsail system key**

1. In an SSH terminal window connected to your instance, enter the following command to remove the `lightsail_instance_ca.pub` key:

   ```
   sudo rm –r /etc/ssh/lightsail_instance_ca.pub
   ```

1. Enter the following command to edit the `sshd_config` file using the Vim text editor.

   ```
   sudo vim /etc/ssh/sshd_config
   ```

1. Press the `I` key to enter the insert mode in the Vim editor.

1. Delete the following text from the file, if it's present:

   ```
   TrustedUserCAKeys /etc/ssh/lightsail_instance_ca.pub
   ```

1. Press the `ESC` key, and then enter `:wq!` to save your edits, and quit Vim.

1. Enter the following command to restart the Open SSH server:

   ```
   sudo /etc/init.d/sshd restart
   ```

   You should see a result similar to the following:  
![\[Lightsail default key.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-restarting-sshd.png)

   The `lightsail_instance_ca.pub` key is now removed from your instance. The associated `sshd_config` file is updated to exclude that key.

# Connect to a Windows Server Amazon EC2 instance created from a Lightsail snapshot
<a name="amazon-lightsail-connecting-to-windows-server-amazon-ec2-instances"></a>

After your new Windows Server instance is created in Amazon Elastic Compute Cloud (Amazon EC2), you can connect to it using Remote Desktop Protocol (RDP). This is similar to how you connected to the source Amazon Lightsail instance. Connect to your EC2 instance using the default Lightsail key pair for the source instance’s AWS Region. This guide shows you how to connect to your Windows Server instance using Microsoft Remote Desktop Connection.

**Note**  
For more information about connecting to a Linux or Unix instance, see [Connect to a Linux or Unix instance in Amazon EC2 created from a Lightsail snapshot](amazon-lightsail-connecting-to-linux-unix-amazon-ec2-instances.md).

**Contents**
+ [Get the key for your instance](#get-the-key-windows-instance)
+ [Get the public DNS address for your instance](#get-the-public-dns-address-for-your-windows-instance)
+ [Get the password for your Windows Server instance](#get-the-password-for-your-windows-instance)
+ [Configure Remote Desktop Connection to connect to your Windows Server instance](#configure-remote-desktop-connection)
+ [Next steps](#connecting-to-windows-server-amazon-ec2-instances-next-steps)

## Get the key for your instance
<a name="get-the-key-windows-instance"></a>

Your Windows Server instance in Amazon EC2 uses the default Lightsail key pair for the source instance’s Region to retrieve the default administrator password.

Download the default private key from the **SSH keys** tab on the [Lightsail account page](https://lightsail.aws.amazon.com/ls/webapp/account/keys). For more information about the default Lightsail SSH keys, see [SSH key pairs](understanding-ssh-in-amazon-lightsail.md).

**Note**  
After you connect to your EC2 instance, we recommend changing the administrator password for your Windows Server instance in Amazon EC2. It removes the association between the default Lightsail key pair and your Windows Server instance in Amazon EC2. For more information, see [Secure an Amazon EC2 Windows Server instance that was created from a Lightsail snapshot](amazon-lightsail-securing-windows-server-amazon-ec2-instances.md).

## Get the public DNS address for your instance
<a name="get-the-public-dns-address-for-your-windows-instance"></a>

Get the public DNS address for your Amazon EC2 instance, so that you can use it when configuring an RDP client, such as Microsoft Remote Desktop Connection, to connect to your instance.

**To get the public DNS address for your instance**

1. Sign in to the [Amazon EC2 console](https://console.aws.amazon.com/ec2/).

1. Choose **Instances** from the left navigation pane. 

1. Choose the running Windows Server instance that you want to connect to.

1. In the lower pane, locate the **Public DNS** address for your instance.

   This is the address that you use when configuring an RDP client to connect to your instance. Continue to the [Get the password for your Windows Server instance](#get-the-password-for-your-windows-instance) section of this guide to learn how to get the default administrator password for your Windows Server instance in Amazon EC2.  
![\[An instance's public DNS in the Amazon EC2 console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ec2-public-dns.png)

## Get the password for your Windows Server instance
<a name="get-the-password-for-your-windows-instance"></a>

Get the password for your Windows Server instance from the Amazon EC2 console. You need this password to sign in to your Windows Server instance when connecting to it through RDP.

**To get the password for your Windows Server instance**

1. Sign in to the [Amazon EC2 console](https://console.aws.amazon.com/ec2/).

1. From the left navigation pane, choose **Instances**.

1. Choose the Windows Server instance that you want to connect to.

1. For **Actions**, choose **Security**, **Get Windows Password**.  
![\[Getting the Windows Server default administrator password in the Amazon EC2 console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ec2-get-windows-password.png)

1. At the prompt, choose **Browse** and open the default private key file that you downloaded from Lightsail earlier in this guide.

1. Choose **Decrypt Password**.  
![\[Decrypting the Windows default administrator password in the Amazon EC2 console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ec2-decrypt-password.png)

   The password, user name, and private IP address are displayed. Copy the password to your clipboard so that you can use it in the following [Configure Remote Desktop Connection to connect to your Windows Server instance](#configure-remote-desktop-connection) section of this guide. Highlight the password, and press **Ctrl\$1C** if you’re using Windows, or **Cmd\$1C** if you’re using macOS.  
![\[Decrypted Windows default administrator password in the Amazon EC2 console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ec2-decrypted-password.png)

   Continue to the [Configure Remote Desktop Connection to connect to your Windows Server instance](#configure-remote-desktop-connection) section of this guide to learn how to configure Remote Desktop Connection to connect to your Windows Server instance in Amazon EC2.

## Configure Remote Desktop Connection to connect to your Windows Server instance
<a name="configure-remote-desktop-connection"></a>

Remote Desktop Connection is an RDP client that comes pre-installed on most Windows operating systems. Use it to graphically connect to your Windows Server instance in Amazon EC2.

**To configure Remote Desktop Connection to connect to your Windows Server instance**

1. Open Remote Desktop Connection.

   For example, choose the **Windows Start** menu, then search for **Remote Desktop Connection**.

1. In the **Computer** text box, enter the public DNS address for your Windows Server instance in Amazon EC2 obtained earlier in this guide.

1. Choose **Show Options** to view additional options.

1. Enter `Administrator` into the **User name** text box.  
![\[Microsoft Remote Desktop Connection.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-rdc-configuration.png)

1. Choose **Connect** to connect to your Windows Server instance.

1. At the Windows Security prompt, enter the password for your Windows Server instance into the **Password** text box, then choose **OK**.  
![\[Microsoft Remote Desktop Connection password prompt.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-rdc-password.png)

1. At the Remote Desktop Connection prompt, chose **Yes** to connect.  
![\[Microsoft Remote Desktop Connection security prompt.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-rdc-certificate-errors.png)

   You should see a screen similar to the following if you've successfully connected to your instance:  
![\[Microsoft Remote Desktop Connection connected to instance.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-rdc-connected.png)

## Next steps
<a name="connecting-to-windows-server-amazon-ec2-instances-next-steps"></a>

We recommend changing the administrator password for your Windows Server instance in Amazon EC2. It removes the association between the default Lightsail key pair and your Windows Server instance in Amazon EC2. For more information, see [Secure a Windows Server instance in Amazon EC2 created from a Lightsail snapshot](amazon-lightsail-securing-windows-server-amazon-ec2-instances.md).

# Secure Windows Server Amazon EC2 instances launched from Lightsail snapshots
<a name="amazon-lightsail-securing-windows-server-amazon-ec2-instances"></a>

To improve the security of a Windows Server instance in Amazon Elastic Compute Cloud (Amazon EC2) created from an Amazon Lightsail snapshot, we recommend that you change the default administrator password. This removes the association between your Lightsail key pairs and your new Windows Server instance in Amazon EC2.

**Note**  
If you created Linux or Unix instances in Amazon EC2 from a Lightsail snapshot, then you should perform a few steps to secure those instances. For more information, see [Secure an Amazon EC2 Linux or Unix instance that was created from a Lightsail snapshot](amazon-lightsail-securing-linux-unix-amazon-ec2-instances.md).

**Contents**
+ [Connect to your Windows Server instance in Amazon EC2](#connect-to-your-windows-server-instance-in-ec2)
+ [Change the default administrator password of your Windows Server instance in Amazon EC2](#change-the-password-of-your-windows-server-instance-in-ec2)

## Connect to your Windows Server instance in Amazon EC2
<a name="connect-to-your-windows-server-instance-in-ec2"></a>

To change your Windows Server administrator password, connect to your Windows Service instance in Amazon EC2 using Remote Desktop Protocol (RDP). To learn how to connect to your instance, see [Connect to a Windows Server instance in Amazon EC2 created from a Lightsail snapshot](amazon-lightsail-connecting-to-windows-server-amazon-ec2-instances.md).

Continue to the [Change the default administrator password of your Windows Server instance in Amazon EC2](#change-the-password-of-your-windows-server-instance-in-ec2) section of this guide after you’re connected to your instance in Amazon EC2.

## Change the default administrator password of your Windows Server instance in Amazon EC2
<a name="change-the-password-of-your-windows-server-instance-in-ec2"></a>

Change the default password on your Windows Server instance to remove the association between your Lightsail key pairs and your new Windows Server instance in Amazon EC2.

**To change the default administrator password of your Windows Server instance in Amazon EC2**

1. After you establish an RDP connection to your instance, open a Command Prompt and enter the following command.

   ```
   net user Administrator "Password"
   ```

   In the command, replace *Password* with your new password.

   **Example:**

   ```
   net user Administrator "EXAMPLE%4=Bwk^GEAg8$u@5"
   ```

   You should see a result similar to the following:  
![\[Password reset on Windows Server in Amazon EC2.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-ec2-window-server-password-reset.png)

1. Store the new password in a safe place. You cannot retrieve the new password using the Amazon EC2 console. The console can retrieve only the default password. If you attempt to connect to the instance using the default password after changing it, an error message appears stating that your credentials did not work.

   If you lose your password or it expires, you can generate a new password. For password reset procedures, see [Resetting a Lost or Expired Windows Administrator Password](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ResettingAdminPassword.html) in the Amazon EC2 documentation.

# View CloudFormation stacks for Lightsail instances
<a name="amazon-lightsail-cloudformation-stacks"></a>

Amazon Lightsail uses CloudFormation to create Amazon Elastic Compute Cloud (Amazon EC2) instances from exported snapshots. A CloudFormation stack is created when you request to create an Amazon EC2 instance using the Lightsail console or Lightsail API. The stack performs a series of actions in your Amazon Web Services (AWS) account to create all of the related resources for the instance, such as the Amazon EC2 instance from an Amazon Machine Image (AMI), the Elastic Block Store (EBS) system volume from an EBS snapshot, and the security group for the instance. To learn more about CloudFormation stacks, see [Working with Stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacks.html) in the CloudFormation documentation.

You can access the CloudFormation stacks through the Lightsail console or in the CloudFormation console. This guide shows you how to access both.

**Note**  
The CloudFormation stack used to create your Amazon EC2 resources is permanently linked to your Amazon EC2 resources. If you delete the stack, then all related resources are automatically deleted. Because of this, you should not delete any of the CloudFormation stacks created by Lightsail, and instead delete your Amazon EC2 resources using the EC2 console.

## Accessing the CloudFormation stacks through the Lightsail console
<a name="accessing-the-cloud-formation-stack"></a>

After you choose to create an instance in Amazon EC2 using the Lightsail console or the Lightsail API, an CloudFormation stack is created and its status is tracked in the **Exports** section of the Lightsail console.. To learn more about **Exports**, see [Track snapshot export status in Lightsail](amazon-lightsail-task-monitor.md).

**To view your CloudFormation stacks in the Lightsail console**

1. Sign in to the [Lightsail console](https://lightsail.aws.amazon.com/).

1. Choose **Exports** in the left navigation pane.

1. To access a CloudFormation stack for a previously created Amazon EC2 instance, choose **View details** for a task labeled with **Created EC2 resources**.  
![\[The task history in the Lightsail console.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-task-manager-cloud-formation-stack.png)

1. The confirmation page that appears lists the CloudFormation stack for the task. Choose the stack name to open the stack details in the CloudFormation console.

## Accessing the stacks in the CloudFormation console
<a name="accessing-the-stacks-in-the-cloud-formation-console"></a>

You can also access your stack details through the [CloudFormation console](https://console.aws.amazon.com/cloudformation). The stacks created by Lightsail begin with “Lightsail-stack” and have a description of “CloudFormation stack used to create Amazon EC2 resources” as shown in the following screenshot.

Stacks with a **CREATE\$1IN\$1PROGRESS** status are in the process of creating Amazon EC2 resources from your exported Lightsail snapshots. Stacks with a **CREATE\$1COMPLETED** status have completed the process of creating Amazon EC2 resources. To view the resources created by a stack, choose the checkbox next to the stack name, and then choose the **Resources** tab.

![\[CloudFormation stack details.\]](http://docs.aws.amazon.com/lightsail/latest/userguide/images/amazon-lightsail-cloud-formation-stack-details.png)
