User guide
Table Of Contents
- AWS SDK for .NET
- Table of Contents
- AWS SDK for .NET Developer Guide
- Getting Started with the AWS SDK for .NET
- Programming with the AWS SDK for .NET
- AWS SDK for .NET Tutorials and Examples
- Managing ASP.NET Session State with Amazon DynamoDB
- Tutorial: Creating Amazon EC2 Instances with the AWS SDK for .NET
- Tutorial: Grant Access Using an IAM Role and the AWS SDK for .NET
- Tutorial: Amazon EC2 Spot Instances
- Creating and Using an Amazon SQS Queue with the AWS SDK for .NET
- Creating an Amazon Route 53 Hosted Zone and Adding Resource Record Sets
- Additional Resources
- Document History

Table of Contents
AWS SDK for .NET Developer Guide ................................................................................................ 1
How to Use This Guide ........................................................................................................... 1
Supported Services and Revision History .................................................................................. 2
About Amazon Web Services .................................................................................................. 2
Getting Started ............................................................................................................................. 3
Create an AWS Account and Credentials ................................................................................... 3
Install the .NET Development Environment ................................................................................ 4
Install the AWS SDK for .NET .................................................................................................. 4
Start a New Project ................................................................................................................ 5
Programming with the AWS SDK for .NET ......................................................................................... 8
Configuring Your Application .................................................................................................... 8
Configuring AWS Credentials .......................................................................................... 9
Additional Application Parameters ................................................................................... 13
AWS Region Selection .......................................................................................................... 16
Asynchronous APIs .............................................................................................................. 16
Asynchronous API for .NET 4.5, Windows Store, and Windows Phone 8 ................................ 17
Asynchronous API for .NET 3.5 ...................................................................................... 17
Migrating Your Code to the Latest SDK .................................................................................... 24
Introduction ................................................................................................................ 24
What's New ................................................................................................................ 24
What's Different ........................................................................................................... 24
Platform Differences ............................................................................................................. 28
AWS SDK for .NET Framework 3.5 ................................................................................. 28
AWS SDK for .NET Framework 4.5 ................................................................................. 28
AWS SDK for Windows RT ............................................................................................ 28
AWS SDK for Windows Phone 8 ..................................................................................... 28
Install AWS Assemblies with NuGet ........................................................................................ 29
Installation .................................................................................................................. 29
NuGet from Solution Explorer ........................................................................................ 30
NuGet Package Manager Console .................................................................................. 30
Tutorials and Examples ................................................................................................................. 32
Managing ASP.NET Session State with Amazon DynamoDB ....................................................... 32
Create the ASP.NET_SessionState Table ......................................................................... 33
Configure the Session State Provider .............................................................................. 34
Security Considerations ................................................................................................ 35
Tutorial: Creating Amazon EC2 Instances ................................................................................ 36
Create an Amazon EC2 Client ....................................................................................... 36
Create a Security Group ............................................................................................... 37
Create a Key Pair ........................................................................................................ 40
Launch an EC2 Instance ............................................................................................... 41
Terminate an EC2 Instance ........................................................................................... 46
Tutorial: Using an IAM Role ................................................................................................... 47
Create a Sample that Retrieves an Object from Amazon S3 ................................................ 48
Create an IAM Role ..................................................................................................... 49
Launch an EC2 Instance and Specify the IAM Role ........................................................... 49
Run the Sample Program on the EC2 Instance ................................................................. 50
Tutorial: Amazon EC2 Spot Instances ...................................................................................... 51
Overview .................................................................................................................... 51
Prerequisites .............................................................................................................. 52
Step 1: Setting Up Your Credentials ................................................................................. 52
Step 2: Setting Up a Security Group ................................................................................ 52
Step 3: Submitting Your Spot Request ............................................................................. 54
Step 4: Determining the State of Your Spot Request .......................................................... 55
Step 5: Cleaning up Your Spot Requests and Instances ...................................................... 57
Conclusion ................................................................................................................. 58
Version v2.0.0
iii
AWS SDK for .NET Developer Guide