

# 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.