Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Skip to main content
TUTORIAL

Launch a Linux Virtual Machine with Amazon 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 Amazon Linux instance in Amazon 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

Create an Amazon Lightsail account

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

Sign up for an AWS account

Already have an account? Sign-in

Create an Amazon Linux instance in Lightsail

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

Missing alt text value

Configure your Amazon 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 Amazon Lightsail instance image.

Amazon 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 Amazon Linux 2 blueprint option.

"Amazon Lightsail interface showing OS blueprint options, with Amazon 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.

"Amazon 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.

"Amazon 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.

Amazon 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: Amazon Lightsail interface showing a section to identify an instance with the name "Amazon_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 Amazon Lightsail.

Missing alt text value

10. Launch the instance

Choose Create instance.

Amazon 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 Amazon 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 Amazon Lightsail to easily spin up and configure a Linux instance.

Amazon 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, Amazon Lightsail is a great way for you to get started.