

The AWS SDK for JavaScript v2 has reached end-of-support. We recommend that you migrate to [AWS SDK for JavaScript v3](https://docs.aws.amazon.com//sdk-for-javascript/v3/developer-guide/). For additional details and information on how to migrate, please refer to this [announcement](https://aws.amazon.com/blogs//developer/announcing-end-of-support-for-aws-sdk-for-javascript-v2/).

# Amazon EC2 Examples
<a name="ec2-examples"></a>

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides virtual server hosting in the cloud. It is designed to make web-scale cloud computing easier for developers by providing resizeable compute capacity.

![Relationship between JavaScript environments, the SDK, and Amazon EC2](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/images/code-samples-ec2.png)


The JavaScript API for Amazon EC2 is exposed through the `AWS.EC2` client class. For more information about using the Amazon EC2 client class, see [https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EC2.html](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EC2.html) in the API reference.

**Topics**
+ [Creating an Amazon EC2 Instance](ec2-example-creating-an-instance.md)
+ [Managing Amazon EC2 Instances](ec2-example-managing-instances.md)
+ [Working with Amazon EC2 Key Pairs](ec2-example-key-pairs.md)
+ [Using Regions and Availability Zones with Amazon EC2](ec2-example-regions-availability-zones.md)
+ [Working with Security Groups in Amazon EC2](ec2-example-security-groups.md)
+ [Using Elastic IP Addresses in Amazon EC2](ec2-example-elastic-ip-addresses.md)