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

this array to the InstanceId member of a TerminateInstancesRequest object, then passing that
object to the ec2.TerminateInstances API.
1
if (instanceIds.Count > 0)
{
try
5 {
TerminateInstancesRequest terminateRequest = new TerminateInstances
Request();
terminateRequest.InstanceId = instanceIds;
ec2.TerminateInstances(terminateRequest);
10 }
catch (AmazonEC2Exception e)
{
Console.WriteLine("Error terminating instances");
Console.WriteLine("Caught Exception: " + e.Message);
15 Console.WriteLine("Reponse Status Code: " + e.StatusCode);
Console.WriteLine("Error Code: " + e.ErrorCode);
Console.WriteLine("Request ID: " + e.RequestId);
}
}
20
Conclusion
Congratulations! You have just completed the getting started tutorial for developing Spot Instance software
with the AWS SDK for .NET.
Creating and Using an Amazon SQS Queue with
the AWS SDK for .NET
This topic demonstrates how to use the AWS SDK for .NET to create and use an Amazon Simple Queue
Service (Amazon SQS) queue.
The sample code in this topic is written in C#, but you can use the AWS SDK for .NET with any language
that is compatible with the Microsoft .NET Framework.
Topics
• Create an Amazon SQS Client (p. 59)
• Create an Amazon SQS Queue (p. 59)
• Amazon SQS Queue URLs (p. 60)
• Send an Amazon SQS Message (p. 60)
• Receive a Message from an Amazon SQS Queue (p. 61)
• Delete a Message from an Amazon SQS Queue (p. 62)
• Related Resources (p. 63)
Version v2.0.0
58
AWS SDK for .NET Developer Guide
Conclusion