Categories
How-tos

First steps with Amazon EC2 – Linux

This howto describes the set-up of a virtual instance with a Fedora Linux AMI (Amazon Machine Image) based on the Amazon Elastic Compute Cloud (Amazon EC2). This includes the entire setup of the instance an the following access via ssh by a Windows 7 system.

Requirements

Selection, Setup und Running the instance

First we go to the Amazon Web Services website and log in.

Afterwards we start the AWS Management Console for EC2.

We click on Launch Instance.

A new window opens. There you will find fully pre-configured Amazon Machine Images (AMIs) by Amazon. We choose the first AMI – Getting Started on Fedora Core 8 (AMI Id: ami-b232d0db)

We choose the following configuration:

  • Number of Instances: 1
  • Availability Zone: No Preference
  • Instance Type: Small (m1.small 1.7 GB)

As an enhanced configuration we choose:

  • Kernel ID: Use Default
  • RAM Disk ID: Use Default
  • Monitoring: Nein

Afterwards we create a key pair. Here with the name clouduser_key and save it onto our lokal computer.

In the following steps we configure the firewall. Therefore we create a Security Group for the AMI. By default the external access on the ports 22 (SSH) and 80 (HTTP) is allowed. I removed the approval for the port 80, because we do not need it in this case. We give the Security Group a name, in this case Security_Group_1, and write a description, here SSH_Only. We click continue.

Next we get a summary of our configuration. We can now run our instance using Launch.

Using Your instances are now launching we come back to the console.

There we see the just created active instance and could now connect to it. Therefore we note the name in the column Public DNS.

Connect to the instance

To connect to the instance we first start PuTTYgen and boostrap (using Load) the private key we created above.

If it’s loaded we click on Save private Key and ignore the window with the Passphrase!

Now we open the PuTTY SSH Client and fill in the Public DNS name into the field Host Name. The default port is 22 (SSH).

Within the PuTTY SSH Client we go to SSH >> Auth on the left side. At Authentication parameters we bootstrap our with PuTTYgen created private key.

After clicking on Open a connection to our instance is established.

For credentials we are using the user root. Now we could work with our created Linux instance.

Terminate the instance

To terminate the instance we go back to the AWS Management Console. Using the right mouse button we click on the instance and choose Terminate.

After confirming the instance is terminated.

Looking at the AWS Management Console the yellow point shows us that the instance will be terminate. That will take some time.

Categories
How-tos

First steps with Amazon EC2 – Windows

This howto describes the set-up of a virtual instance with a Windows Server 2008 AMI (Amazon Machine Image) based on the Amazon Elastic Compute Cloud (Amazon EC2). This includes the entire setup of the instance an the following access via a remote desktop connection by a Windows 7 system.

Requirements

  • Amazon Web Service Account
  • Amazon EC2 is already activated
  • RDP Client

Selection, Setup und Running the instance

First we go to the Amazon Web Services website and log in.

Afterwards we start the AWS Management Console for EC2.

We click on Launch Instance.

A new window opens. There you will find fully pre-configured Amazon Machine Images (AMIs) by Amazon. We choose the first AMI – Getting Started on Microsoft Windows Server 2008 (AMI Id: ami-a4698bcd)

We choose the following configuration:

  • Number of Instances: 1
  • Availability Zone: No Preference
  • Instance Type: Small (m1.small 1.7 GB)

As an enhanced configuration we choose:

  • Kernel ID: Use Default
  • RAM Disk ID: Use Default
  • Monitoring: Nein

Afterwards we create a key pair. Here with the name clouduser_key and save it onto our lokal computer.

In the following steps we configure the firewall. Therefore we create a Security Group for the AMI. By default the external access on the ports 3389 (RDP), MS SQL Server (1433) and 80 (HTTP) is allowed. I removed the approval for the port 80 and 1433, because we do not need them in this case. We give the Security Group a name, in this case Security_Group_2, and write a description, here RDP_Only. We click continue.

Next we get a summary of our configuration. We can now run our instance using Launch.

Using Your instances are now launching we come back to the console.

There we see the just created active instance and could now connect to it. Therefore we note the name in the column Public DNS.

Connect to the instance

To connect to the instance we first open the file which includes our created Private Key and copy the entire content inclusive the comments —–BEGIN RSA PRIVATE KEY—– und —–END RSA PRIVATE KEY—–.

Now we go back to the AWS Management Console and click on the instance using the right mouse button and choose Get Windows Password

In the field Private Key* we insert the private key inclusive the comments —–BEGIN RSA PRIVATE KEY—– und —–END RSA PRIVATE KEY—–.

After clicking on Decrypt Password we will see the username and the password we need for connecting to the instance.

Now we open a Remote Desktop Connection and fill in the Public DNS name.

After clicking on connect we fill in the username and the password we got above.

The connection is established.

Now we just need to accept the certificate.

We are connected to our instance.

Terminate the instance

To terminate the instance we go back to the AWS Management Console. Using the right mouse button we click on the instance and choose Terminate.

After confirming the instance is terminated.

Looking at the AWS Management Console the yellow point shows us that the instance will be terminate. That will take some time.