Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

A .NET Developer's Guide to Using Amazon Elastic Compute Cloud (EC2)

This article walks .NET developers through the steps of getting started to write applications using Amazon EC2.


advertisement

Getting Started

Amazon's Elastic Compute Cloud (EC2) is Amazon's web service offering for compute services. Its offerings can be leveraged by developers who work on any popular platform.

Today, we will explore how .NET developers can leverage Amazon EC2.



To get started, Amazon offers SDK for Amazon Web Services. The SDKs are offered for both .NET (Windows) as well as Eclipse (Linux).

The AWS .NET SDK can be downloaded from http://aws.amazon.com/sdkfornet/ (it is also called AWS Tools for Windows)

The installation is pretty straightforward.

Click Next. When prompted about the EULA (End User License Agreement), mark the checkbox to accept the license agreement and click Next.

Choose the folder in which you want to install.

Click Install to begin the installation.

You will be prompted for admin credentials.

When Visual Studio is started for the first time after installation, you will notice a window titled "AWS Toolkit for Microsoft Visual Studio".

Click "Getting Started" on the window to configure Visual Studio with AWS credentials.

Here, you need to enter your user credentials (you will need both the access key id as well as secret access key.

Once the configuration is completed successfully, you will see the AWS Explorer on the left side of the IDE.

Create a new Amazon EC2 project by selecting the "AWS EC2 Sample" template under Visual C# -> AWS -> "Compute and Networking"

Leave the default as it is and click OK.

Look at the default code that is generated. This code creates PowerShell script that launches an EC2 instance.

Please note that I have commented out the code that is highlighted above.

Our test application is now ready. You can compile it and run it. If you are having trouble following along, you can download the code from here.

Debugging the Application

When you are run the application, the application will run and display output as under:

For the application to complete, you will need to stop the instance that has been created from the AWS Management Console. Once you stop the instance, the application continues and terminates:

Summary

In this article, we learned how .NET developers can start developing applications to use Amazon EC2. I hope you have found this information useful.



   

Vipul Patel is a Program Manager currently working at Amazon Corporation. He has formerly worked at Microsoft in the Lync team and in the .NET team (in the Base Class libraries and the Debugging and Profiling team). He can be reached at vipul.patel@hotmail.com.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap