Developer Guide (Version v2.0.0)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

Getting Started with the AWS SDK for .NET

To get started with the AWS SDK for .NET, set up the following:

  • AWS Account and Credentials

  • .NET Development Environment

  • AWS SDK for .NET

AWS Account and Credentials

To access AWS, you will need to sign up for an AWS account.

To sign up for an AWS account

  1. Go to, and then click Sign Up.

  2. Follow the on-screen instructions.

    Part of the sign-up procedure involves receiving a phone call and entering a PIN using the phone keypad.

AWS sends you a confirmation email after the sign-up process is complete. At any time, you can view your current account activity and manage your account by going to and clicking My Account/Console.

To get your access key ID and secret access key

Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. If you don't have access keys, you can create them by using the AWS Management Console. We recommend that you use IAM access keys instead of AWS root account access keys. IAM lets you securely control access to AWS services and resources in your AWS account.


To create access keys, you must have permissions to perform the required IAM actions. For more information, see Granting IAM User Permission to Manage Password Policy and Credentials in Using IAM.

  1. Go to the IAM console.

  2. From the navigation menu, click Users.

  3. Select your IAM user name.

  4. Click User Actions, and then click Manage Access Keys.

  5. Click Create Access Key.

    Your keys will look something like this:

    • Access key ID example: AKIAIOSFODNN7EXAMPLE

    • Secret access key example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

  6. Click Download Credentials, and store the keys in a secure location.

    Your secret key will no longer be available through the AWS Management Console; you will have the only copy. Keep it confidential in order to protect your account, and never email it. Do not share it outside your organization, even if an inquiry appears to come from AWS or No one who legitimately represents Amazon will ever ask you for your secret key.

Related topics

.NET Development Environment

To use the AWS SDK for .NET, you'll need the following software:

  • Microsoft .NET Framework 3.5 or later

  • Microsoft Visual Studio Professional edition or better, version 2010 or newer.

To confirm installation

  1. Start Visual Studio.

  2. On the Help menu, click About. A dialog box opens that lists Microsoft Visual Studio and .NET Framework versions.

Configuring the .NET CLR

For the best performance of your server-based applications with the AWS SDK for .NET, we recommend that you use Server mode garbage collection (GC).

To enable Server mode GC, add the following to your app.config file:

    <gcServer enabled="true"/>
    <gcConcurrent enabled="true"/>


Server mode GC works only on systems with multiple processors or processor cores. Enabling Server mode GC has no effect otherwise.

Installing the AWS SDK for .NET

To install the AWS SDK for .NET

  1. Go to

  2. Click the Download button in the upper right corner of the page. Your browser will prompt you to save the install file.

  3. To begin the install process, open the saved install file and follow the on-screen instructions.

By default, the AWS SDK for .NET is installed in the Program Files directory, which requires administrator privileges. You can install the AWS SDK for .NET as a non-administrator if you choose a different installation directory.


The AWS SDK for .NET is also available on GitHub.

Installing SDK for .NET Extensions

You can install optional extensions for the SDK for .NET, such as a session state provider and a trace listener that use DynamoDB. For more information about SDK for .NET extensions, see Install AWS Assemblies with NuGet.

Starting a New Project

The AWS SDK for .NET provides the following project template(s) you can use to build a new project on Amazon Web Services:

AWS Console Project

Creates a console application that references the AWS .NET library (AWSSDK.dll) with a sample Program.cs file that makes a basic request to Amazon Simple Storage Service (Amazon S3), Amazon SimpleDB, and Amazon Elastic Compute Cloud (Amazon EC2).

AWS Empty Project

Creates a console application that references the AWS .NET library (AWSSDK.dll), but does not include any code in the Program.cs file.

AWS Web Project

Creates an ASP.NET application that references the AWS .NET library (AWSSDK.dll) with a sample Program.cs file that makes a basic request to Amazon S3, Amazon SimpleDB, and Amazon EC2.

The general process to create a new project based on a project template is similar across Visual Studio editions, but we'll go through the steps for Visual Studio 2010 Professional Edition.

To create a new project in Visual Studio 2010 Professional Edition

  1. Launch Visual Studio.

  2. On the File menu, select New, and then click Project. The New Project dialog box opens.

  3. Select AWS from the list of installed templates, and then select the AWS project template you want to use. Enter a project name, and then click OK.

    New Project Dialog Box
  4. On project creation, the template prompts you for the security credentials that your code should use to access AWS. To use the credentials for one of the accounts that was added with the AWS Toolkit for Visual Studio, click Use existing account and select the account from the drop-down list. To add a new set of credentials, click Use a new account and enter the credentials information. Once you have specified the credentials to use, click OK.

    If you do not want to specify any credentials at this time, click Skip. Note, however, that your code will not be able to access AWS without a valid set of credentials.

    Credentials Dialog Box

Running the Project

You can run the project immediately after the project is created by pressing F5 (or clicking Start Debugging on the Debug menu).

Where Do I Go from Here?

From here, you can check out the tutorials included in this developer guide.

  • Tutorial: Amazon EC2 Spot Instances

    This tutorial explains how to set up requests for Amazon EC2 Spot Instances, how to determine when they have completed, and how to clean up afterward.

The Additional Resources section has pointers to other resources to assist you in programming AWS.