Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Working with Amazon EC2

Focus mode
Working with Amazon EC2 - AWS SDK for .NET (version 4 preview)

The AWS SDK for .NET version 4 (V4) is in preview, therefore this content is subject to change. For information about breaking changes and migration, see the migration topic. For released content, see the version 3 developer guide instead.

The AWS SDK for .NET version 4 (V4) is in preview, therefore this content is subject to change. For information about breaking changes and migration, see the migration topic. For released content, see the version 3 developer guide instead.

The AWS SDK for .NET supports Amazon EC2, which is a web service that provides resizable computing capacity. You use this computing capacity to build and host your software systems.

APIs

The AWS SDK for .NET provides APIs for Amazon EC2 clients. The APIs enable you to work with EC2 features such as security groups and key pairs. The APIs also enable you to control Amazon EC2 instances. This section contains a small number of examples that show you the patterns you can follow when working with these APIs. To view the full set of APIs, see the AWS SDK for .NET API Reference (and scroll to "Amazon.EC2").

The Amazon EC2 APIs are provided by the AWSSDK.EC2 NuGet package.

Prerequisites

Before you begin, be sure you have set up your environment and configured your project. Also review the information in Using the SDK.

About the examples

The examples in this section show you how to work with Amazon EC2 clients and manage Amazon EC2 instances.

The EC2 Spot Instance tutorial shows you how to request Amazon EC2 Spot Instances. Spot Instances enable you to access unused EC2 capacity for less than the On-Demand price.

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.