Creating a Server with Amazon Lightsail

Maria Surmenok
2 min readFeb 20, 2018
Image credit: https://twitter.com/AWSreInvent/status/936048135020871680

This article is the first part of my solution for Udacity Full Stack Nanodegree project, Linux Server Configuration. The goal of the project is to make a secure Linux server and deploy Python Flask web application with PostgreSQL and SQLAlchemy. In this article, I describe how to create a brand-new instance of Linux server and connect to it from a local computer.

Create an Instance

After signing up and providing payment information, you can create your first Linux instance on https://lightsail.aws.amazon.com.

Below is my instance of Ubuntu server with IP address on the right bottom (you can get more information, such as default username, by clicking on the header of the instance name).

Connect to the Server

Amazon Lightsail enforces usage of an SSH key to connect to the instance. Download the SSH key from your account to connect to the server with the default user ubuntu.

Next, on your local machine, move downloaded ssh key to the .ssh directory:

mv ~/LightsailDefaultPrivateKey-us-west-2.pem ~/.ssh/LightsailDefault.pem

Then, change permission for your .ssh directory and your ssh key:

chmod 700 ~/.ssh/

chmod 600 ~/.ssh/LightsailDefault.pem

Finally, you can connect to your server using its IP address, the name of default user, and downloaded SSH key (example with my server):

ssh ubuntu@52.36.252.207 -i ~/.ssh/LightsailDefault.pem

--

--