creating a ubuntu ec2 instance - amazon web services

15
[email protected] 1 Creating & Connect to Ubuntu EC2 Instance [Edition 03] [Last Update 201123]

Upload: others

Post on 05-May-2022

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

1

Creating & Connect to Ubuntu EC2

Instance

[Edition 03]

[Last Update 201123]

Page 2: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

2

Table of Contents

1 Introduction................................................................................................................................................... 3

2 Documentation Links ................................................................................................................................ 4

3 Pre-requisite ................................................................................................................................................. 5

4 Creating a Ubuntu EC2 Instance ........................................................................................................... 6 4.1 Launching the Ubuntu Instance .......................................................................................................................... 6 4.2 Connecting to the Ubuntu Instance ................................................................................................................. 12

5 Deleting/ Cleanup ......................................................................................................................................14 5.1 Terminating the Ubuntu Instance ..................................................................................................................... 14

6 Summary ......................................................................................................................................................15

Page 3: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

3

1 INTRODUCTION

Amazon EC2 presents a true virtual computing environment, allowing you to use web service

interfaces to launch instances with a variety of operating systems, load them with your custom application environment, manage your network’s access permissions, and run your image using as many or few systems as you desire.

To use Amazon EC2, you simply:

1. Configure security and network access on your Amazon EC2 instance.

2. Choose which instance type(s) you want, then start, terminate, and monitor as many instances of your AMI as needed, using the web service APIs or the variety of management tools provided.

3. Determine whether you want to run in multiple locations, utilize static IP endpoints, or attach persistent block storage to your instances.

4. Pay only for the resources that you actually consume, like instance-hours or data transfer.

This activity guide cover steps for:

1. Creating a Ubuntu EC2 Instance a. Launching the Ubuntu Instance b. Connecting to the Ubuntu Instance

2. Deleting/Cleanup

a. Stopping the Ubuntu Instance

b. Terminating the Ubuntu Instance

Page 4: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

4

2 DOCUMENTATION LINKS

1. Amazon EC2

https://aws.amazon.com/ec2/

2. Features of Amazon EC2

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html

3. Amazon EC2 FAQs https://aws.amazon.com/ec2/faqs/

Page 5: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

5

3 PRE-REQUISITE

Note: Create account (Trial or Paid) on AWS Cloud.

Follow Activity Guide Register_for_AWS_Free_Tier_Account_And_Login_to_AWS Console_ed** from portal

Note: Stop the EC2 instance after the usage.When you stop an instance, it is shut down and

you are not billed for hourly usage. Do stop the instance if you are not performing any further

Activity guides. If you decide that you no longer need an instance, you can terminate it.

Page 6: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

6

4 CREATING A UBUNTU EC2 INSTANCE

4.1 Launching the Ubuntu Instance

1. Log in to your AWS console.

2. Under All Services, and under Compute, click on EC2

Page 7: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

7

3. Once you are at the EC2 Dashboard, click on Launch to launch an instance

4. Click on Launch Instances to now launch the instance

5. In the search bar, search for Ubuntu. It will show you the list of all the available Ubuntu AMI. We will be selecting the Ubuntu Server 20.04 LTS (HVM), Click on Select

Page 8: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

8

6. For minimal cost, we select the free tier t2.micro instance type. Click on Next: Configure Instance Details

7. In the Configure Instance Details, keep everything default and click on Next: Add Storage.

Page 9: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

9

8. Keep everything default and click on Next: Add Tags

9. Click on click to add a name tag and add a Name tag and assign any value to it (any name for your instance). Click on Next: Configure Security Group

Page 10: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

10

10. Since it is an Ubuntu instance, we will require SSH on port 22. So keep it default and click on Review and Launch.

11. Finally click on Launch.

Page 11: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

11

12. The next window will ask you for the key pair. So select Create a new key pair and provide any Key pair name to it and click on Launch.

13. Now we have successfully created our Ubuntu EC2 Instance

Note: Stop the EC2 instance after the usage.When you stop an instance, it is shut down

and you are not billed for hourly usage. If you don’t stop the instance you will be highly charged.

Page 12: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

12

4.2 Connecting to the Ubuntu Instance

Note: In this section we will be connecting to our Ubuntu Instance using EC2 Instance Connect.

1. Move to your Instance dashboard and select the instance we just created. We can see the public IP assigned to this windows instance. Click on Connect

2. Once you get in the Connect to instance, go to EC2 Instance Connect and click Connect.

Page 13: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

13

3. Once you click on the Connect, you’ll be redirected to a new window and you shall see the Ubuntu CLI.

4. If you want to connect using SSH Client then please refer to the Hands-on-guide available on our portal under BONUS 3 Module : Creating A Linux EC2 Instance

Note: For connecting to Ubuntu Instance default username will be Ubuntu.

Page 14: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

14

5 DELETING/ CLEANUP

5.1 Terminating the Ubuntu Instance

Note: This section will cover steps to terminate the Ubuntu instance

1. Go to your Instance and select the Ubuntu Instance. Click on Instance State and click on Terminate

2. Click on Terminate to terminate the Instance

Page 15: Creating A Ubuntu EC2 Instance - Amazon Web Services

[email protected]

15

6 SUMMARY

This activity guide covers the steps to:

1. Creating a Ubuntu EC2 Instance

a. Launching the Ubuntu Instance b. Connecting to the Ubuntu Instance

2. Deleting/Cleanup

a. Stopping the Ubuntu Instance

b. Terminating the Ubuntu Instance