Lamp Server
Lamp Server
Lamp Server
You can launch a Linux instance using the AWS Management Console as described in the
following procedure. This tutorial is intended to help you quickly launch your first instance, so it
doesn't cover all possible options. For information about advanced options, see Launch an
instance using the new launch instance wizard. For information about other ways to launch your
instance, see Launch your instance.
To launch an instance
.
From the EC2 console dashboard, in the Launch instance box, choose Launch instance, and
then choose Launch instance from the options that appear.
Under Name and tags, for Name, enter a descriptive name for your instance.
1. Choose Quick Start, and then choose Amazon Linux. This is the operating system (OS)
for your instance.
2. From Amazon Machine Image (AMI), select an HVM version of Amazon Linux 2.
Notice that these AMIs are marked Free tier eligible. An Amazon Machine Image (AMI)
is a basic configuration that serves as a template for your instance.
Under Instance type, from the Instance type list, you can select the hardware configuration
for your instance. Choose the t2.micro instance type, which is selected by default. The
t2.micro instance type is eligible for the free tier. In Regions where t2.micro is unavailable,
you can use a t3.micro instance under the free tier. For more information, see AWS Free Tier
.
Under Key pair (login), for Key pair name, choose the key pair that you created when
getting set up.
6. Warning
Do not choose Proceed without a key pair (Not recommended). If you launch your
instance without a key pair, then you can't connect to it.
7. Next to Network settings, choose Edit. For Security group name, you'll see that the
wizard created and selected a security group for you. You can use this security group, or
alternatively you can select the security group that you created when getting set up using
the following steps:
1. Choose Select existing security group.
2. From Common security groups, choose your security group from the list of
existing security groups.
8. Keep the default selections for the other configuration settings for your instance.
9. Review a summary of your instance configuration in the Summary panel, and when
you're ready, choose Launch instance.
10. A confirmation page lets you know that your instance is launching. Choose View all
instances to close the confirmation page and return to the console.
11. On the Instances screen, you can view the status of the launch. It takes a short time for
an instance to launch. When you launch an instance, its initial state is pending. After the
instance starts, its state changes to running and it receives a public DNS name. If the
Public IPv4 DNS column is hidden, choose the settings icon ( ) in the top-right corner,
toggle on Public IPv4 DNS, and choose Confirm.
12. It can take a few minutes for the instance to be ready for you to connect to it. Check that
your instance has passed its status checks; you can view this information in the Status
check column.
Important
You can't connect to your instance unless you launched it with a key pair for which you have the
.pem file and you launched it with a security group that allows SSH access from your computer.
If you can't connect to your instance, see Troubleshoot connecting to your instance for
assistance.
Important
Terminating an instance effectively deletes it; you can't reconnect to an instance after you've
terminated it.
If you launched an instance that is not within the AWS Free Tier
, you'll stop incurring charges for that instance as soon as the instance status changes to
shutting down or terminated. To keep your instance for later, but not incur charges, you can
stop the instance now and then start it again later. For more information, see Stop and start your
instance.
1. In the navigation pane, choose Instances. In the list of instances, select the instance.
2. Choose Instance state, Terminate instance.
3. Choose Terminate when prompted for confirmation.
Amazon EC2 shuts down and terminates your instance. After your instance is terminated,
it remains visible on the console for a short while, and then the entry is automatically
deleted. You cannot remove the terminated instance from the console display yourself.
Next steps
After you start your instance, you might want to try some of the following exercises:
Learn how to remotely manage your EC2 instance using Run Command. For more
information, see AWS Systems Manager Run Command in the AWS Systems Manager
User Guide.
Configure a CloudWatch alarm to notify you if your usage exceeds the Free Tier. For
more information, see Tracking your AWS Free Tier usage in the AWS Billing User
Guide.
Add an EBS volume. For more information, see Create an Amazon EBS volume and
Attach an Amazon EBS volume to an instance.
Install the LAMP stack. For more information, see Tutorial: Install a LAMP web server
on Amazon Linux 2.