Skip to main content
TUTORIAL

Launch a Linux Virtual Machine with HAQM Lightsail

Overview

Lightsail is one of the easiest ways to get started on AWS. It offers virtual servers, storage, databases, and networking, plus a cost-effective, monthly plan. It’s designed to help you start small, and then scale as you grow.

In this tutorial, you create an HAQM Linux instance in HAQM Lightsail in seconds. After the instance is up and running, you connect to it via SSH within the Lightsail console using the browser-based SSH terminal.

Get started with Lightsail for free

Implementation

Beginner

10 minutes

Free Tier eligible

  • AWS account

  • Recommended browser: The latest version of Chrome or Firefox

Note: Accounts created within the past 24 hours might not yet have access to the services required for this tutorial.

Aug 23, 2022

Create an HAQM Lightsail account

There are no charges for using HAQM Lightsail for this tutorial.

Sign up for an AWS account

Already have an account? Sign-in

Create an HAQM Linux instance in Lightsail

Choose Create instance in the Instances tab of the Lightsail home page.

Missing alt text value

Configure your HAQM Lightsail instance

1. Choose a Region

An AWS Region and Availability Zone is selected for you. Choose Change AWS Region and Availability Zone to create your instance in another location.

Note: Static IP addresses can only be attached to instances in the same region.

Missing alt text value

2. Choose an instance image

Choose the Linux/Unix platform option, and choose OS Only to view the operating system-only instance images available in Lightsail.

To learn more about Lightsail instance images, see Choose an HAQM Lightsail instance image.

HAQM Lightsail interface showing options to select an availability zone, Linux/Unix platform, and OS-only blueprint for instance creation.

3. Choose the blueprint

Choose the HAQM Linux 2 blueprint option.

"HAQM Lightsail interface showing OS blueprint options, with HAQM Linux 2 selected and detailed description displayed below."

4. (Optional) Configure launch script

Choose Add launch script to add a shell script that will run on your instance when it launches.

Missing alt text value

5. (Optional) Choose an SSH key pair

Choose Change SSH key pair to select, create, or upload the key pair you would like to use to SSH into your instance.

"HAQM Lightsail interface showing options to change, create, or upload an SSH key pair for connecting to an instance."

6. (Optional) Configure automatic snapshots

Choose Enable Automatic Snapshots to automatically create a backup image of your instance and attached disks on a daily schedule.

"HAQM Lightsail interface showing the option to enable automatic snapshots with a time selection dropdown set to 00:00 Coordinated Universal Time (GMT+0)."

7. Select a pricing plan

Choose your instance plan. You can try the $3.50 USD Lightsail plan free for the first three months (up to 750 hours). We'll credit the first three months to your account.

Learn more on our Lightsail pricing page.

HAQM Lightsail pricing plans with options ranging from $3.50 to $40 per month, highlighting features like memory, storage, and free trials for the first three months.

8. Specify the instance name

Enter a name for your instance.

Alt-text: HAQM Lightsail interface showing a section to identify an instance with the name "HAQM_Linux_2-1" and quantity set to 1.

9. (Optional) Add instance tags

Choose one of the following options to add tags to your instance:

(Optional) Add key-only tags — 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.

(Optional) Create a key-value tag — 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.

For more information about key-only and key-value tags, see Tags in HAQM Lightsail.

Missing alt text value

10. Launch the instance

Choose Create instance.

HAQM Lightsail interface showing tagging options for resources with fields for key-only and key-value tags, and a highlighted "Create instance" button.

Connect your instance

Connect to your instance using the browser-based SSH terminal in Lightsail.

1. Connect to the instance terminal

In the Instances tab of the Lightsail home page, choose the terminal icon, or the ellipsis (⋮) icon next to the HAQM Linux instance you just created.

The browser-based SSH terminal window appears. You can type Linux commands into the browser terminal, and manage your instance without configuring an SSH client.

Missing alt text value

Conclusion

Congratulations

Congratulations! You used HAQM Lightsail to easily spin up and configure a Linux instance.

HAQM Lightsail is great for developers, web pros, and anyone looking to get started on AWS in a quick and cheap way. You can launch instances, databases, and SSD-based storage; transfer data; and monitor your resources, and so much more in a managed way.

Whether you're an individual developer creating a project or a blogger creating a personal website, HAQM Lightsail is a great way for you to get started.