Exporting an Amazon Lightsail instance to Amazon EC2

In our earlier blog, we explained some of the key differences between Amazon Lightsail and EC2. Many of our customers decided to embark on the Lightsail track for hosting their applications since it was easy to setup and use and naturally the perfect choice. Some of our customers came across some requirements which dictated specialized networking, complex workload resource requirements and auto scaling. In order to satisfy these special requirements, we decided to migrate our customer applications to EC2.

On 28th November 2018, Amazon introduced this feature officially using which one can export Lightsail based instances and volumes to EC2 with a simple, guided experience. This feature enables organizations to grow applications and scale cloud deployments by utilizing full feature set of EC2. High level steps involve taking a snapshot of the Lightsail instance, export snapshot to EC2, setup EC2 instance directly or use upgrade to EC2 wizard in Lightsail console to get the new EC2 instance up and running.

In this blog we will provide step by step instructions on how to migrate a Lightsail based instance to EC2. In this blog, we will migrate a WordPress Lightsail based application to EC2.

Pre-Requisites:

1.       Amazon AWS account

2.       A deployed Lightsail application

Step-by-Step Instructions:
Here is a step-by-step guide to export your Lightsail instance to Amazon EC2.

1.       Our WordPress site is fully setup and ready to be exported. Here is a screenshot of a blog that we will reference later.

bluestack-hello-1.png

2.       Open Amazon Lightsail console using this link.

bluestack-wordpress-2.png

3.       Click on the options next to the instance to export to EC2 and select manage.

bluestack-hello-3.png

4.       Go to the Snapshots section and click on “Create Snapshot”.

bluestack-save-snapshot-4.png

5.       On the successfully created snapshot click on the options and select “Export to Amazon EC2”.

bluestack-save-snapshot-5.png







 

6.       Click on “Yes, continue” to export the snapshot to EC2.

bluestack-save-snapshot-6.png

7.       Click on “Acknowledged”.

bluestack-acknowledge-7.png

8.       Monitor the progress of export to EC2 task from the task monitor.

bluestack-export-ec2-8.png

9.       After the export process has been successful, you will see something like this in the task monitor.

10.   At this point, you can create an EC2 instance directly from here or you can also go to the Amazon EC2 console and create an instance from the AMI section of the console. For simplicity, we will use the first option and click on “Create a new Amazon EC2 instance”. This will open up a guided wizard for creation of an EC2 instance as shown below.

11.   Configure the EC2 instance as required and select “Create resources in EC2” once all configuration is done.

11.png

12.   Click on “Acknowledged”.

12.png

13.   Monitor the progress of creating resources in EC2 task from the task monitor.

13.png

14.   Once the resources in EC2 have been created successfully, you will see something like this in the task monitor.

14.png

15.   Click on “Go to Amazon EC2” to go over to the EC2 console to check our newly created WordPress EC2 instance. This will open up a new tab.

15.png

16.   We can see from the EC2 dashboard that the WordPress instance has been successfully created and is in the running state. Here we will copy and paste the public DNS of the EC2 instance in the browser and browse to our user post to verify if our settings and data are intact and exactly the same as of the Lightsail instance.

Conclusion:

Following the above guide one can easily migrate Lightsail based applications to Amazon EC2 and leverage all the capability and features of EC2. We hope that this blog will help our customers as well as other users of Amazon Lightsail in the migration process to Amazon EC2.


Moiz Arif
Bluestack IT Solutions


 
 
Muhammad Ali