How to export Lightsail snapshots to Amazon EC2 - Amazon Lightsail

How to export Lightsail snapshots to Amazon EC2

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 are comprised of an image and a system disk, but both are grouped together as a single instance entity in the Lightsail console to make them more efficient to manage. 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.

Contents

Service-linked role and required IAM permissions to export Lightsail snapshots

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.

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 will perform the export, then continue to the Prerequisites section 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 in the IAM documentation.

    { "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

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:

Export a Lightsail snapshot to Amazon EC2

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 in the Lightsail API documentation, or the export-snapshot command 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.

To export a Lightsail snapshot to Amazon EC2
  1. Sign in to the Lightsail console.

  2. Choose Snapshots in the left navigation pane.

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

  4. Choose the Action menu for the desired snapshot, then choose Export to Amazon EC2.

    
            Export snapshot in the Lightsail console.
    Note

    Snapshots of cPanel & WHM, Django, and Ghost instances cannot be exported to Amazon EC2 at this time.

  5. Review the important details displayed on the prompt.

  6. 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 Monitor snapshot exports in Lightsail.

Track the status of your export

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 Monitor snapshot exports in Lightsail.

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:

Note

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