amazon elastic compute cloud: user guide for microsoft windows instances

900
Amazon Elastic Compute Cloud User Guide for Microsoft Windows Instances

Upload: irawan-soetomo

Post on 21-Jan-2017

123 views

Category:

Engineering


7 download

TRANSCRIPT

  • Amazon Elastic Compute CloudUser Guide for Microsoft Windows

    Instances

  • Amazon Elastic Compute Cloud: User Guide for Microsoft WindowsInstancesCopyright 2016 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

    Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any mannerthat is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks notowned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored byAmazon.

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

  • Table of ContentsWhat Is Amazon EC2? ................................................................................................................... 1

    Features of Amazon EC2 ........................................................................................................ 1How to Get Started with Amazon EC2 ....................................................................................... 2Related Services ................................................................................................................... 3Accessing Amazon EC2 ......................................................................................................... 3Pricing for Amazon EC2 ......................................................................................................... 4PCI DSS Compliance ............................................................................................................. 4Basic Infrastructure ................................................................................................................ 5

    Amazon Machine Images and Instances ............................................................................ 5Regions and Availability Zones ........................................................................................ 6Storage ....................................................................................................................... 6Root Device Volume ....................................................................................................... 8Networking and Security ............................................................................................... 10AWS Identity and Access Management ........................................................................... 10Differences between Windows Server and an Amazon EC2 Windows Instance ....................... 11Designing Your Applications to Run on Amazon EC2 Windows Instances ............................... 12

    Setting Up .................................................................................................................................. 14Sign Up for AWS ................................................................................................................. 14Create an IAM User ............................................................................................................. 15Create a Key Pair ................................................................................................................ 16Create a Virtual Private Cloud (VPC) ....................................................................................... 18Create a Security Group ....................................................................................................... 18

    Getting Started ............................................................................................................................ 21Overview ............................................................................................................................ 21Prerequisites ...................................................................................................................... 22Step 1: Launch an Instance ................................................................................................... 22Step 2: Connect to Your Instance ............................................................................................ 23Step 3: Clean Up Your Instance .............................................................................................. 25Next Steps ......................................................................................................................... 25

    Best Practices ............................................................................................................................. 26Tutorials ..................................................................................................................................... 28

    Tutorial: Deploy a WordPress Blog .......................................................................................... 28Prerequisites .............................................................................................................. 28Installing the Microsoft Web Platform Installer ................................................................... 29Installing WordPress .................................................................................................... 29Configuring Security Keys ............................................................................................. 29Configuring the Site Title and Administrator ...................................................................... 31Making Your WordPress Site Public ................................................................................. 31Next Steps ................................................................................................................. 32

    Tutorial: Installing a WAMP Server .......................................................................................... 32Tutorial: Installing a WIMP Server ........................................................................................... 35Tutorial: Increase the Availability of Your Application ................................................................... 38

    Prerequisites .............................................................................................................. 39Scale and Load Balance Your Application ......................................................................... 40Test Your Load Balancer ................................................................................................ 41

    Tutorial: Remotely Manage Your Instances ............................................................................... 42Launch a New Instance ................................................................................................ 43Grant Your User Account Access to SSM ......................................................................... 43Send a Command Using the EC2 Console ....................................................................... 44Send a Command Using AWS Tools for Windows PowerShell .............................................. 45

    Tutorial: Set Up a Windows HPC Cluster .................................................................................. 45Prerequisites .............................................................................................................. 46Step 1: Set Up Your Active Directory Domain Controller ...................................................... 46Step 2: Configure Your Head Node .................................................................................. 48Step 3: Set Up the Compute Node .................................................................................. 51

    iii

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

  • Step 4: Scale Your HPC Compute Nodes (Optional) ........................................................... 52Running the Lizard Performance Measurement Application ................................................. 53IP Permissions for the Active Directory Security Groups ..................................................... 53IP Permissions for HPC Cluster Security Group ................................................................ 57

    Amazon Machine Images .............................................................................................................. 63Using an AMI ...................................................................................................................... 63Creating Your Own AMI ......................................................................................................... 64Buying, Sharing, and Selling AMIs .......................................................................................... 64Deregistering Your AMI ......................................................................................................... 64AWS Windows AMIs ............................................................................................................. 64

    Selecting an Initial Windows AMI .................................................................................... 64Keeping Your AMIs Up-to-Date ....................................................................................... 65

    AMI Types .......................................................................................................................... 65Launch Permissions ..................................................................................................... 66Storage for the Root Device ........................................................................................... 66

    Finding a Windows AMI ........................................................................................................ 69Finding a Windows AMI Using the Amazon EC2 Console ................................................... 69Finding an AMI Using the AWS CLI ................................................................................. 70Finding an AMI Using the AWS Tools for Windows PowerShell ............................................. 70Finding a Windows Server 2003 AMI ............................................................................... 70

    Shared AMIs ....................................................................................................................... 71Finding Shared AMIs .................................................................................................... 71Making an AMI Public ................................................................................................... 72Sharing an AMI with Specific AWS Accounts .................................................................... 73Using Bookmarks ........................................................................................................ 74Guidelines for Shared Windows AMIs .............................................................................. 75

    Paid AMIs ........................................................................................................................... 75Selling Your AMI .......................................................................................................... 76Finding a Paid AMI ....................................................................................................... 76Purchase a Paid AMI .................................................................................................... 77Getting the Product Code for Your Instance ...................................................................... 78Using Paid Support ...................................................................................................... 78Bills for Paid and Supported AMIs ................................................................................... 78Managing Your AWS Marketplace Subscriptions ................................................................ 78

    Creating an Amazon EBS-Backed Windows AMI ....................................................................... 79Overview of Creating Amazon EBS-Backed AMIs .............................................................. 79Creating a Windows AMI from a Running Instance ............................................................. 80

    Creating an Instance Store-Backed Windows AMI ..................................................................... 82Instance Store-Backed Windows AMIs ............................................................................. 82Preparing to Create an Instance Store-Backed Windows AMI .............................................. 83Bundling an Instance Store-Backed Windows Instance ....................................................... 84Registering an Instance Store-Backed Windows AMI ......................................................... 85

    AMIs with Encrypted Snapshots ............................................................................................. 86AMI Scenarios Involving Encrypted EBS Snapshots ........................................................... 86

    Copying an AMI ................................................................................................................... 89Copying an AMI You Own .............................................................................................. 89Copying an AMI Across AWS Accounts ........................................................................... 89Copying an AMI Across Regions .................................................................................... 90Copying to Encrypt ...................................................................................................... 90AMI Copying Scenarios ................................................................................................ 91Copying an AMI Using the Console or Command Line ........................................................ 92Stopping a Pending AMI Copy Operation ......................................................................... 93

    Deregistering Your AMI ......................................................................................................... 94Cleaning Up Your Amazon EBS-Backed AMI .................................................................... 94Cleaning Up Your Instance Store-Backed AMI ................................................................... 95

    Windows AMI Versions ......................................................................................................... 96Configuration Settings and Drivers .................................................................................. 96Updating Your Windows Instance .................................................................................... 96

    iv

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

  • Determining Your Instance Version .................................................................................. 97AWS Windows AMI Versions .......................................................................................... 97Image Changes ......................................................................................................... 107Subscribing to Windows AMI Notifications ...................................................................... 108Upgrading or Migrating a Windows Server Instance .......................................................... 109

    Create a Standard Amazon Machine Image Using Sysprep ....................................................... 109Before You Begin ....................................................................................................... 109Using Sysprep with the EC2Config Service .................................................................... 110Run Sysprep with the EC2Config Service ....................................................................... 113Troubleshooting Sysprep with EC2Config ....................................................................... 114

    Instances .................................................................................................................................. 115Instance Types .................................................................................................................. 115

    Available Instance Types ............................................................................................. 116Hardware Specifications .............................................................................................. 117Networking and Storage Features ................................................................................. 117Instance Limits .......................................................................................................... 118T2 Instances ............................................................................................................. 118C4 Instances ............................................................................................................. 121GPU Instances .......................................................................................................... 123I2 Instances .............................................................................................................. 125D2 Instances ............................................................................................................. 126HI1 Instances ............................................................................................................ 127HS1 Instances ........................................................................................................... 129T1 Micro Instances ..................................................................................................... 130X1 Instances ............................................................................................................. 137Resizing Instances ..................................................................................................... 139

    Instance Purchasing Options ............................................................................................... 143Determining the Instance Lifecycle ................................................................................ 144Reserved Instances .................................................................................................... 145Scheduled Instances .................................................................................................. 165Spot Instances .......................................................................................................... 169Dedicated Hosts ........................................................................................................ 213

    Instance Lifecycle .............................................................................................................. 226Instance Launch ........................................................................................................ 226Instance Stop and Start (Amazon EBS-backed instances only) .......................................... 226Instance Reboot ........................................................................................................ 227Instance Retirement ................................................................................................... 227Instance Termination .................................................................................................. 227Differences Between Reboot, Stop, and Terminate ........................................................... 228Launch ..................................................................................................................... 228Connect ................................................................................................................... 238Stop and Start ........................................................................................................... 240Reboot ..................................................................................................................... 243Retire ....................................................................................................................... 244Terminate ................................................................................................................. 246Recover ................................................................................................................... 251

    Configure Instances ........................................................................................................... 252Instance Metadata and User Data ................................................................................. 253Using EC2Config ....................................................................................................... 265PV Drivers ................................................................................................................ 289Setting the Password .................................................................................................. 305Setting the Time ......................................................................................................... 309Managing Configuration .............................................................................................. 312Joining an AWS Domain .............................................................................................. 318Sending Log Data to CloudWatch ................................................................................. 326Configuring a Secondary Private IP Address ................................................................... 339Upgrading Instances ................................................................................................... 343

    Remotely Manage Your Instances ......................................................................................... 351

    v

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

  • Components and Concepts .......................................................................................... 352Prerequisites ............................................................................................................. 355Setting Up Managed Instances ..................................................................................... 356Installing the SSM Agent ............................................................................................. 358Delegating Access ..................................................................................................... 359Executing Commands ................................................................................................. 367Viewing Command Output ........................................................................................... 388Creating SSM Documents ........................................................................................... 390Sharing SSM Documents ............................................................................................ 395Walkthroughs ............................................................................................................ 401Cancelling a Command ............................................................................................... 414Monitoring Commands ................................................................................................ 414Troubleshooting Run Command .................................................................................... 423

    Importing and Exporting Virtual Machines .............................................................................. 425Importing a VM into Amazon EC2 as an Image ................................................................ 426Importing a VM into Amazon EC2 as an Instance ............................................................ 442Exporting Amazon EC2 Instances ................................................................................. 455Troubleshooting ......................................................................................................... 458

    Monitoring ................................................................................................................................ 465Automated and Manual Monitoring ........................................................................................ 467

    Automated Monitoring Tools ......................................................................................... 467Manual Monitoring Tools .............................................................................................. 468

    Best Practices for Monitoring ................................................................................................ 468Monitoring the Status of Your Instances .................................................................................. 469

    Instance Status Checks ............................................................................................... 469Scheduled Events ...................................................................................................... 473

    Monitoring Your Instances Using CloudWatch .......................................................................... 477Enable Detailed Monitoring .......................................................................................... 478List Available Metrics .................................................................................................. 479Get Statistics for Metrics ............................................................................................. 485Graph Metrics ........................................................................................................... 499Create a CloudWatch Alarm ......................................................................................... 501Create Alarms That Stop, Terminate, Reboot, or Recover an Instance ................................. 507

    Network and Security ................................................................................................................. 533Key Pairs .......................................................................................................................... 534

    Creating Your Key Pair Using Amazon EC2 ..................................................................... 534Importing Your Own Key Pair to Amazon EC2 .................................................................. 536Retrieving the Public Key for Your Key Pair on Windows .................................................... 538Verifying Your Key Pair's Fingerprint .............................................................................. 538Deleting Your Key Pair ................................................................................................. 539

    Security Groups ................................................................................................................. 539Security Groups for EC2-Classic ................................................................................... 540Security Groups for EC2-VPC ...................................................................................... 540Security Group Rules ................................................................................................. 540Default Security Groups .............................................................................................. 542Custom Security Groups ............................................................................................. 543Creating a Security Group ........................................................................................... 544Describing Your Security Groups ................................................................................... 545Adding Rules to a Security Group ................................................................................. 545Deleting Rules from a Security Group ............................................................................ 546Deleting a Security Group ............................................................................................ 546API and Command Overview ....................................................................................... 546

    Controlling Access ............................................................................................................. 547Network Access to Your Instance .................................................................................. 548Amazon EC2 Permission Attributes ............................................................................... 548IAM and Amazon EC2 ................................................................................................ 548IAM Policies .............................................................................................................. 550IAM Roles ................................................................................................................. 590

    vi

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

  • Network Access ......................................................................................................... 596Amazon VPC .................................................................................................................... 597

    Benefits of Using a VPC .............................................................................................. 598Differences Between EC2-Classic and EC2-VPC ............................................................. 598Sharing and Accessing Resources Between EC2-Classic and EC2-VPC ............................. 600Instance Types Available Only in a VPC ......................................................................... 602Amazon VPC Documentation ....................................................................................... 602Supported Platforms ................................................................................................... 603ClassicLink ............................................................................................................... 604Migrating from EC2-Classic to a VPC ............................................................................ 614

    Instance IP Addressing ....................................................................................................... 623Private IP Addresses and Internal DNS Hostnames ......................................................... 624Public IP Addresses and External DNS Hostnames ......................................................... 624Elastic IP Addresses ................................................................................................... 625Amazon DNS Server .................................................................................................. 625IP Address Differences Between EC2-Classic and EC2-VPC ............................................. 626Determining Your Public, Private, and Elastic IP Addresses ............................................... 626Assigning a Public IP Address ...................................................................................... 628Multiple Private IP Addresses ....................................................................................... 629

    Elastic IP Addresses ........................................................................................................... 633Elastic IP Address Basics ............................................................................................ 634Elastic IP Address Differences for EC2-Classic and EC2-VPC ........................................... 634Working with Elastic IP Addresses ................................................................................ 636Using Reverse DNS for Email Applications ..................................................................... 640Elastic IP Address Limit .............................................................................................. 640

    Elastic Network Interfaces ................................................................................................... 640Private IP Addresses Per Network Interface Per Instance Type ........................................... 641Public IP Addresses for Network Interfaces ..................................................................... 643Creating a Management Network .................................................................................. 644Use Network and Security Appliances in Your VPC .......................................................... 644Creating Dual-homed Instances with Workloads/Roles on Distinct Subnets .......................... 644Create a Low Budget High Availability Solution ................................................................ 645Monitoring IP Traffic on Your Network Interface ................................................................ 645Best Practices for Configuring Elastic Network Interfaces .................................................. 645Creating an Elastic Network Interface ............................................................................ 645Deleting an Elastic Network Interface ............................................................................ 646Viewing Details about an Elastic Network Interface .......................................................... 646Attaching an Elastic Network Interface When Launching an Instance .................................. 647Attaching an Elastic Network Interface to a Stopped or Running Instance ............................ 648Detaching an Elastic Network Interface from an Instance .................................................. 649Changing the Security Group of an Elastic Network Interface ............................................. 649Changing the Source/Destination Checking of an Elastic Network Interface .......................... 650Associating an Elastic IP Address with an Elastic Network Interface .................................... 650Disassociating an Elastic IP Address from an Elastic Network Interface ............................... 651Changing Termination Behavior for an Elastic Network Interface ......................................... 651Adding or Editing a Description for an Elastic Network Interface ......................................... 652Adding or Editing Tags for an Elastic Network Interface ..................................................... 652

    Placement Groups ............................................................................................................. 653Placement Group Limitations ....................................................................................... 653Launching Instances into a Placement Group ................................................................. 654Deleting a Placement Group ........................................................................................ 655

    Network MTU .................................................................................................................... 656Jumbo Frames (9001 MTU) ......................................................................................... 656Path MTU Discovery ................................................................................................... 657Check the Path MTU Between Two Hosts ....................................................................... 657Check and Set the MTU on your Amazon EC2 Instance .................................................... 658Troubleshooting ......................................................................................................... 659

    Enhanced Networking ......................................................................................................... 659

    vii

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

  • Enhanced Networking Types ........................................................................................ 660Enabling Enhanced Networking on Your Instance ............................................................. 660Enabling Enhanced Networking: Intel 82599 VF ............................................................... 660Enabling Enhanced Networking: ENA ............................................................................ 663

    Storage .................................................................................................................................... 667Amazon EBS .................................................................................................................... 668

    Features of Amazon EBS ............................................................................................ 669EBS Volumes ............................................................................................................ 670EBS Snapshots ......................................................................................................... 709EBS Optimization ....................................................................................................... 716EBS Encryption ......................................................................................................... 719EBS Performance ...................................................................................................... 723

    Instance Store ................................................................................................................... 736Instance Store Lifetime ............................................................................................... 737Instance Store Volumes ............................................................................................... 737Add Instance Store Volumes ........................................................................................ 739SSD Instance Store Volumes ....................................................................................... 742

    Amazon S3 ....................................................................................................................... 743Amazon S3 and Amazon EC2 ...................................................................................... 743

    Instance Volume Limits ....................................................................................................... 745Linux-Specific Volume Limits ........................................................................................ 745Windows-Specific Volume Limits ................................................................................... 745Bandwidth vs Capacity ................................................................................................ 746

    Device Naming .................................................................................................................. 746Available Device Names .............................................................................................. 746Device Name Considerations ....................................................................................... 747

    Block Device Mapping ........................................................................................................ 748Block Device Mapping Concepts ................................................................................... 748AMI Block Device Mapping .......................................................................................... 750Instance Block Device Mapping .................................................................................... 752

    Mapping Disks to Volumes ................................................................................................... 756Listing the Disks Using Windows Disk Management ......................................................... 757Listing the Disks Using Windows PowerShell .................................................................. 758Disk Device to Device Name Mapping ........................................................................... 760

    Using Public Data Sets ....................................................................................................... 762Public Data Set Concepts ............................................................................................ 762Finding Public Data Sets ............................................................................................. 762Creating a Public Data Set Volume from a Snapshot ........................................................ 763Attaching and Mounting the Public Data Set Volume ......................................................... 764

    Resources and Tags ................................................................................................................... 765Resource Locations ............................................................................................................ 765Resource IDs .................................................................................................................... 766

    Working with Longer IDs ............................................................................................. 767Controlling Access to Longer ID Settings ........................................................................ 770

    Listing and Filtering Your Resources ...................................................................................... 770Advanced Search ....................................................................................................... 770Listing Resources Using the Console ............................................................................ 771Filtering Resources Using the Console .......................................................................... 772Listing and Filtering Using the CLI and API ..................................................................... 773

    Tagging Your Resources ...................................................................................................... 773Tag Basics ................................................................................................................ 774Tag Restrictions ......................................................................................................... 774Tagging Your Resources for Billing ................................................................................ 776Working with Tags Using the Console ............................................................................ 776Working with Tags Using the CLI or API ......................................................................... 781

    Service Limits .................................................................................................................... 782Viewing Your Current Limits ......................................................................................... 782Requesting a Limit Increase ......................................................................................... 783

    viii

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

  • Usage Reports .................................................................................................................. 783Available Reports ....................................................................................................... 784Getting Set Up for Usage Reports ................................................................................. 784Granting IAM Users Access to the Amazon EC2 Usage Reports ........................................ 785Instance Usage ......................................................................................................... 786Reserved Instance Utilization ....................................................................................... 789

    AWS Systems Manager for Microsoft System Center VMM ................................................................ 795Features ........................................................................................................................... 795Limitations ........................................................................................................................ 796Requirements .................................................................................................................... 796Getting Started .................................................................................................................. 796Setting Up ........................................................................................................................ 796

    Sign Up for AWS ........................................................................................................ 796Set Up Access for Users ............................................................................................. 797Deploy the Add-In ...................................................................................................... 799Provide Your AWS Credentials ...................................................................................... 799

    Managing EC2 Instances .................................................................................................... 800Creating an EC2 Instance ............................................................................................ 800Viewing Your Instances ............................................................................................... 802Connecting to Your Instance ......................................................................................... 803Rebooting Your Instance .............................................................................................. 803Stopping Your Instance ................................................................................................ 804Starting Your Instance ................................................................................................. 804Terminating Your Instance ............................................................................................ 804

    Importing Your VM .............................................................................................................. 804Prerequisites ............................................................................................................. 805Importing Your Virtual Machine ..................................................................................... 805Checking the Import Task Status ................................................................................... 806Backing Up Your Imported Instance ............................................................................... 806

    Troubleshooting ................................................................................................................. 807Error: Add-in cannot be installed ................................................................................... 807Installation Errors ....................................................................................................... 807Checking the Log File ................................................................................................. 808Errors Importing a VM ................................................................................................. 808Uninstalling the Add-In ................................................................................................ 808

    AWS Management Pack .............................................................................................................. 809Overview of AWS Management Pack for System Center 2012 ................................................... 810Overview of AWS Management Pack for System Center 2007 R2 ............................................... 811Downloading ..................................................................................................................... 812

    System Center 2012 ................................................................................................... 812System Center 2007 R2 .............................................................................................. 813

    Deploying ......................................................................................................................... 813Step 1: Installing the AWS Management Pack ................................................................. 814Step 2: Configuring the Watcher Node ........................................................................... 815Step 3: Create an AWS Run As Account ........................................................................ 816Step 4: Run the Add Monitoring Wizard .......................................................................... 818Step 5: Configure Ports and Endpoints ........................................................................... 822

    Using ............................................................................................................................... 823Views ....................................................................................................................... 823Discoveries ............................................................................................................... 837Monitors ................................................................................................................... 838Rules ....................................................................................................................... 838Events ..................................................................................................................... 839Health Model ............................................................................................................. 840Customizing the AWS Management Pack ....................................................................... 841

    Upgrading ......................................................................................................................... 842System Center 2012 ................................................................................................... 842System Center 2007 R2 .............................................................................................. 842

    ix

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

  • Uninstalling ....................................................................................................................... 843System Center 2012 ................................................................................................... 843System Center 2007 R2 .............................................................................................. 843

    Troubleshooting ................................................................................................................. 843Errors 4101 and 4105 ................................................................................................. 844Error 4513 ................................................................................................................ 844Event 623 ................................................................................................................. 844Events 2023 and 2120 ................................................................................................ 845Event 6024 ............................................................................................................... 845General Troubleshooting for System Center 2012 Operations Manager ............................ 845General Troubleshooting for System Center 2007 R2 ........................................................ 846

    AWS Diagnostics for Microsoft Windows Server .............................................................................. 847Analysis Rules ................................................................................................................... 847Analyzing the Current Instance ............................................................................................. 848Collecting Data From an Offline Instance ................................................................................ 850Data File Storage ............................................................................................................... 850

    Troubleshooting ......................................................................................................................... 852Troubleshoot an Unreachable Instance .................................................................................. 852

    How to Take a Screenshot of an Unreachable Instance ..................................................... 853Common Screenshots ................................................................................................ 853

    Common Issues ................................................................................................................. 860Boot an EC2 Windows Instance into Directory Services Restore Mode (DSRM) .................... 860High CPU usage shortly after Windows starts ................................................................. 863No console output ...................................................................................................... 863Instance terminates immediately ................................................................................... 864Remote Desktop can't connect to the remote computer .................................................... 864RDP displays a black screen instead of the desktop ......................................................... 866Instance loses network connectivity or scheduled tasks don't run when expected .................. 867Insufficient Instance Capacity ....................................................................................... 867Instance Limit Exceeded ............................................................................................. 868Windows Server 2012 R2 not available on the network ..................................................... 868

    Common Messages ........................................................................................................... 868"Password is not available" .......................................................................................... 868"Password not available yet" ......................................................................................... 869"Cannot retrieve Windows password" ............................................................................. 869"Waiting for the metadata service" ................................................................................. 869"Unable to activate Windows" ....................................................................................... 872"Windows is not genuine (0x80070005)" ........................................................................ 873"No Terminal Server License Servers available to provide a license" .................................... 873

    Document History ...................................................................................................................... 875AWS Glossary ........................................................................................................................... 890

    x

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

  • What Is Amazon EC2?

    Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the AmazonWeb Services (AWS) cloud. Using Amazon EC2 eliminates your need to invest in hardware up front, soyou can develop and deploy applications faster.You can use Amazon EC2 to launch as many or as fewvirtual servers as you need, configure security and networking, and manage storage. Amazon EC2 enablesyou to scale up or down to handle changes in requirements or spikes in popularity, reducing your needto forecast traffic.

    For more information about cloud computing, see What is Cloud Computing?

    Features of Amazon EC2Amazon EC2 provides the following features:

    Virtual computing environments, known as instances

    Preconfigured templates for your instances, known as Amazon Machine Images (AMIs), that packagethe bits you need for your server (including the operating system and additional software)

    Various configurations of CPU, memory, storage, and networking capacity for your instances, knownas instance types

    Secure login information for your instances using key pairs (AWS stores the public key, and you storethe private key in a secure place)

    Storage volumes for temporary data that's deleted when you stop or terminate your instance, knownas instance store volumes

    Persistent storage volumes for your data using Amazon Elastic Block Store (Amazon EBS), known asAmazon EBS volumes

    Multiple physical locations for your resources, such as instances and Amazon EBS volumes, knownas regions and Availability Zones

    A firewall that enables you to specify the protocols, ports, and source IP ranges that can reach yourinstances using security groups

    Static IP addresses for dynamic cloud computing, known as Elastic IP addresses

    Metadata, known as tags, that you can create and assign to your Amazon EC2 resources

    Virtual networks you can create that are logically isolated from the rest of the AWS cloud, and that youcan optionally connect to your own network, known as virtual private clouds (VPCs)

    For more information about the features of Amazon EC2, see the Amazon EC2 product page.

    1

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    Features of Amazon EC2

    http://aws.amazon.com/what-is-cloud-computing/http://aws.amazon.com/ec2

  • Amazon EC2 enables you to run any compatible Windows-based solution on our high-performance,reliable, cost-effective, cloud computing platform. For more information, see Amazon EC2 RunningWindows Server & SQL.

    For more information about running your website on AWS, see Websites & Website Hosting.

    How to Get Started with Amazon EC2The first thing you need to do is get set up to use Amazon EC2. After you are set up, you are ready tocomplete the Getting Started tutorial for Amazon EC2. Whenever you need more information about afeature of Amazon EC2, you can read the technical documentation.

    Get Up and Running

    Setting Up with Amazon EC2 (p. 14)

    Getting Started with Amazon EC2 Windows Instances (p. 21)

    Basics

    Amazon EC2 Basic Infrastructure for Windows (p. 5)

    Instance Types (p. 115)

    Tags (p. 773)

    Networking and Security

    Amazon EC2 Key Pairs and Windows Instances (p. 534)

    Security Groups (p. 539)

    Elastic IP Addresses (p. 633)

    Amazon EC2 and Amazon VPC (p. 597)

    Storage

    Amazon EBS (p. 668)

    Instance Store (p. 736)

    Working with Windows Instances

    Differences between Windows Server and an Amazon EC2 Windows Instance (p. 11)

    Designing Your Applications to Run on Amazon EC2 Windows Instances (p. 12)

    Getting Started with AWS: Hosting a .NET Web App

    If you have questions about whether AWS is right for you, contact AWS Sales. If you have technicalquestions about Amazon EC2, use the Amazon EC2 forum.

    2

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    How to Get Started with Amazon EC2

    http://aws.amazon.com/windows/http://aws.amazon.com/windows/http://aws.amazon.com/websites/http://docs.aws.amazon.com/gettingstarted/latest/wah/http://aws.amazon.com/contact-us/https://forums.aws.amazon.com/forum.jspa?forumID=30

  • Related ServicesYou can provision Amazon EC2 resources, such as instances and volumes, directly using Amazon EC2.You can also provision Amazon EC2 resources using other services in AWS. For more information, seethe following documentation:

    Auto Scaling User Guide

    AWS CloudFormation User Guide

    AWS Elastic Beanstalk Developer Guide

    AWS OpsWorks User Guide

    To automatically distribute incoming application traffic across multiple instances, use Elastic LoadBalancing. For more information, see Elastic Load Balancing Developer Guide.

    To monitor basic statistics for your instances and Amazon EBS volumes, use Amazon CloudWatch. Formore information, see the Amazon CloudWatch Developer Guide.

    To monitor the calls made to the Amazon EC2 API for your account, including calls made by the AWSManagement Console, command line tools, and other services, use AWS CloudTrail. For more information,see the AWS CloudTrail User Guide.

    To get a managed relational database in the cloud, use Amazon Relational Database Service (AmazonRDS) to launch a database instance. Although you can set up a database on an EC2 instance, AmazonRDS offers the advantage of handling your database management tasks, such as patching the software,backing up, and storing the backups. For more information, see Amazon Relational Database ServiceDeveloper Guide.

    Accessing Amazon EC2Amazon EC2 provides a web-based user interface, the Amazon EC2 console. If you've signed up for anAWS account, you can access the Amazon EC2 console by signing into the AWS Management Consoleand selecting EC2 from the console home page.

    If you prefer to use a command line interface, you have the following options:

    AWS Command Line Interface (CLI)Provides commands for a broad set of AWS products, and is supported on Windows, Mac, and Linux.To get started, see AWS Command Line Interface User Guide. For more information about thecommands for Amazon EC2, see ec2 in the AWS Command Line Interface Reference.

    AWS Tools for Windows PowerShellProvides commands for a broad set of AWS products for those who script in the PowerShellenvironment. To get started, see the AWS Tools for Windows PowerShell User Guide. For moreinformation about the cmdlets for Amazon EC2, see the AWS Tools for Windows PowerShellReference.

    Amazon EC2 provides a Query API. These requests are HTTP or HTTPS requests that use the HTTPverbs GET or POST and a Query parameter named Action. For more information about the API actionsfor Amazon EC2, see Actions in the Amazon EC2 API Reference.

    If you prefer to build applications using language-specific APIs instead of submitting a request over HTTPor HTTPS, AWS provides libraries, sample code, tutorials, and other resources for software developers.These libraries provide basic functions that automate tasks such as cryptographically signing your requests,

    3

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    Related Services

    http://docs.aws.amazon.com/autoscaling/latest/userguide/http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/http://docs.aws.amazon.com/opsworks/latest/userguide/http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/http://docs.aws.amazon.com/awscloudtrail/latest/userguide/http://docs.aws.amazon.com/AmazonRDS/latest/DeveloperGuide/http://docs.aws.amazon.com/AmazonRDS/latest/DeveloperGuide/http://docs.aws.amazon.com/cli/latest/userguide/http://docs.aws.amazon.com/cli/latest/reference/ec2/index.htmlhttp://docs.aws.amazon.com/powershell/latest/userguide/http://docs.aws.amazon.com/powershell/latest/reference/Index.htmlhttp://docs.aws.amazon.com/powershell/latest/reference/Index.htmlhttp://docs.aws.amazon.com/AWSEC2/latest/APIReference/query-apis.html

  • retrying requests, and handling error responses, making it is easier for you to get started. For moreinformation, see AWS SDKs and Tools.

    Pricing for Amazon EC2When you sign up for AWS, you can get started with Amazon EC2 for free using the AWS Free Tier.

    Amazon EC2 provides the following purchasing options for instances:

    On-Demand instancesPay for the instances that you use by the hour, with no long-term commitments or up-front payments.

    Reserved InstancesMake a low, one-time, up-front payment for an instance, reserve it for a one- or three-year term, andpay a significantly lower hourly rate for these instances.

    Spot instancesSpecify the maximum hourly price that you are willing to pay to run a particular instance type. TheSpot price fluctuates based on supply and demand, but you never pay more than the maximum priceyou specified. If the Spot price moves higher than your maximum price, Amazon EC2 shuts downyour Spot instances.

    For a complete list of charges and specific prices for Amazon EC2, see Amazon EC2 Pricing.

    To calculate the cost of a sample provisioned environment, see AWS Economics Center.

    To see your bill, go to your AWS Account Activity page.Your bill contains links to usage reports thatprovide details about your bill. To learn more about AWS account billing, see AWS Account Billing.

    If you have questions concerning AWS billing, accounts, and events, contact AWS Support.

    For an overview of Trusted Advisor, a service that helps you optimize the costs, security, and performanceof your AWS environment, see AWS Trusted Advisor.

    PCI DSS ComplianceAmazon EC2 supports the processing, storage, and transmission of credit card data by a merchant orservice provider, and has been validated as being compliant with Payment Card Industry (PCI) DataSecurity Standard (DSS). For more information about PCI DSS, including how to request a copy of theAWS PCI Compliance Package, see PCI DSS Level 1.

    4

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    Pricing for Amazon EC2

    http://aws.amazon.com/tools/http://aws.amazon.com/free/http://aws.amazon.com/ec2/pricinghttp://aws.amazon.com/economics/http://aws.amazon.com/account-activityhttp://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/http://aws.amazon.com/contact-us/http://aws.amazon.com/premiumsupport/trustedadvisor/http://aws.amazon.com/compliance/pci-dss-level-1-faqs/

  • Amazon EC2 Basic Infrastructure for WindowsAs you get started with Amazon EC2, you'll benefit from understanding the components of its basicinfrastructure and how they compare or contrast with your own data centers.

    Concepts

    Amazon Machine Images and Instances (p. 5)

    Regions and Availability Zones (p. 6)

    Storage (p. 6)

    Root Device Volume (p. 8)

    Networking and Security (p. 10)

    AWS Identity and Access Management (p. 10)

    Differences between Windows Server and an Amazon EC2 Windows Instance (p. 11)

    Designing Your Applications to Run on Amazon EC2 Windows Instances (p. 12)

    Amazon Machine Images and InstancesAn Amazon Machine Image (AMI) is a template that contains a software configuration (for example, anoperating system, an application server, and applications). From an AMI, you launch instances, whichare copies of the AMI running as virtual servers in the cloud.

    Amazon publishes many AMIs that contain common software configurations for public use. In addition,members of the AWS developer community have published their own custom AMIs.You can also createyour own custom AMI or AMIs; doing so enables you to quickly and easily start new instances that haveeverything you need. For example, if your application is a website or web service, your AMI could includea web server, the associated static content, and the code for the dynamic pages. As a result, after youlaunch an instance from this AMI, your web server starts, and your application is ready to accept requests.

    You can launch different types of instances from a single AMI. An instance type essentially determinesthe hardware of the host computer used for your instance. Each instance type offers different computeand memory facilities. Select an instance type based on the amount of memory and computing powerthat you need for the applications or software that you plan to run on the instance. For more informationabout the hardware specifications for each Amazon EC2 instance type, see Amazon EC2 Instances.Youcan also launch multiple instances from an AMI, as shown in the following figure.

    Your Windows instances keep running until you stop or terminate them, or until they fail. If an instancefails, you can launch a new one from the AMI.

    5

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows InstancesBasic Infrastructure

    http://aws.amazon.com/ec2/instance-types/

  • Your AWS account has a limit on the number of instances that you can have running. For more informationabout this limit, and how to request an increase, see How many instances can I run in Amazon EC2 inthe Amazon EC2 General FAQ.

    Regions and Availability ZonesAmazon has data centers in different areas of the world (for example, North America, Europe, and Asia).Correspondingly, Amazon EC2 is available to use in different regions. By launching instances in separateregions, you can design your application to be closer to specific customers or to meet legal or otherrequirements. Prices for Amazon EC2 usage vary by region (for more information about pricing by region,see Amazon EC2 Pricing).

    Each region contains multiple distinct locations called Availability Zones. Each Availability Zone isengineered to be isolated from failures in other Availability Zones, and to provide inexpensive, low-latencynetwork connectivity to other zones in the same region. By launching instances in separate AvailabilityZones, you can protect your applications from the failure of a single location.

    For more information about the available regions and Availability Zones, see Using Regions and AvailabilityZones in the Amazon EC2 User Guide for Linux Instances.

    StorageWhen using Amazon EC2, you may have data that you need to store. Amazon EC2 offers the followingstorage options:

    Amazon Elastic Block Store (Amazon EBS)

    Amazon EC2 Instance Store (p. 736)

    Amazon Simple Storage Service (Amazon S3)

    The following figure shows the relationship between these types of storage.

    6

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    Regions and Availability Zones

    http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2http://aws.amazon.com/ec2/pricinghttp://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.htmlhttp://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.htmlhttp://aws.amazon.com/ebshttp://aws.amazon.com/s3

  • Amazon EBS VolumesAmazon EBS volumes are the recommended storage option for the majority of use cases. Amazon EBSprovides your instances with persistent, block-level storage. Amazon EBS volumes are essentially harddisks that you can attach to a running instance.

    Amazon EBS is especially suited for applications that require a database, a file system, or access to rawblock-level storage.

    As illustrated in the previous figure, you can attach multiple volumes to an instance. Also, to keep a backupcopy of your data, you can create a snapshot of an EBS volume, which is stored in Amazon S3.You cancreate a new Amazon EBS volume from a snapshot, and attach it to another instance.You can alsodetach a volume from an instance and attach it to a different instance. The following figure illustrates thelife cycle of an EBS volume.

    For more information about Amazon EBS volumes, see Amazon Elastic Block Store (Amazon EBS) (p.668).

    7

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    Storage

  • Instance StoreAll instance types, with the exception of Micro instances, offer instance store, which provides your instanceswith temporary, block-level storage. This is storage that is physically attached to the host computer. Thedata on an instance store volume doesn't persist when the associated instance is stopped or terminated.For more information about instance store volumes, see Amazon EC2 Instance Store (p. 736).

    Instance store is an option for inexpensive temporary storage.You can use instance store volumes if youdon't require data persistence.

    Amazon S3Amazon S3 is storage for the Internet. It provides a simple web service interface that enables you to storeand retrieve any amount of data from anywhere on the web. For more information about Amazon S3, seethe Amazon S3 product page.

    Root Device VolumeWhen you launch an instance, the root device volume contains the image used to boot the instance.Youcan launch an Amazon EC2 Windows instance using an AMI backed either by instance store or by AmazonElastic Block Store (Amazon EBS).

    Instances launched from an AMI backed by Amazon EBS use an Amazon EBS volume as the rootdevice. The root device volume of an Amazon EBS-backed AMI is an Amazon EBS snapshot. Whenan instance is launched using an Amazon EBS-backed AMI, a root EBS volume is created from theEBS snapshot and attached to the instance. The root device volume is then used to boot the instance.

    Instances launched from an AMI backed by instance store use an instance store volume as theroot device. The image of the root device volume of an instance store-backed AMI is initially stored inAmazon S3. When an instance is launched using an instance store-backed AMI, the image of its rootdevice is copied from Amazon S3 to the root partition of the instance. The root device volume is thenused to boot the instance.

    ImportantThe only Windows AMIs that can be backed by instance store are those for Windows Server2003. Instance store-backed instances don't have the available disk space required for laterversions of Windows Server.

    For a summary of the differences between instance store-backed AMIs and Amazon EBS-backed AMIs,see Storage for the Root Device (p. 66).

    Determining the Root Device Type of an AMIYou can determine the root device type of an AMI using the console or the command line.

    To determine the root device type of an AMI using the console

    1. Open the Amazon EC2 console.

    2. In the navigation pane, click AMIs, and select the AMI.

    3. Check the value of Root Device Type in the Details tab as follows:

    If the value is ebs, this is an Amazon EBS-backed AMI.

    If the value is instance store, this is an instance store-backed AMI.

    8

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows InstancesRoot Device Volume

    http://aws.amazon.com/s3

  • To determine the root device type of an AMI using the command line

    You can use one of the following commands. For more information about these command line interfaces,see Accessing Amazon EC2 (p. 3).

    describe-images (AWS CLI)

    Get-EC2Image (AWS Tools for Windows PowerShell)

    Determining the Root Device Type of an InstanceYou can determine the root device type of an instance using the console or the command line.

    To determine the root device type of an instance using the console

    1. Open the Amazon EC2 console.

    2. In the navigation pane, click Instances, and select the instance.

    3. Check the value of Root device type in the Description tab as follows:

    If the value is ebs, this is an Amazon EBS-backed instance.

    If the value is instance store, this is an instance store-backed instance.

    To determine the root device type of an instance using the command line

    You can use one of the following commands. For more information about these command line interfaces,see Accessing Amazon EC2 (p. 3).

    describe-instances (AWS CLI)

    Get-EC2Instance (AWS Tools for Windows PowerShell)

    Changing the Root Device Volume to PersistUsing the console, you can change the DeleteOnTermination attribute when you launch an instance.To change this attribute for a running instance, you must use the command line.

    To change the root device volume of an instance to persist at launch using the console

    1. Open the Amazon EC2 console.

    2. From the Amazon EC2 console dashboard, click Launch Instance.

    3. On the Choose an Amazon Machine Image (AMI) page, choose the AMI to use and click Select.

    4. Follow the wizard to complete the Choose an Instance Type and Configure Instance Detailspages.

    5. On the Add Storage page, deselect the Delete On Termination check box for the root volume.

    6. Complete the remaining wizard pages, and then click Launch.

    You can verify the setting by viewing details for the root device volume on the instance's details pane.Next to Block devices, click the entry for the root device volume. By default, Delete on termination isTrue. If you change the default behavior, Delete on termination is False.

    9

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows InstancesRoot Device Volume

    http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.htmlhttp://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2Image.htmlhttp://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.htmlhttp://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2Instance.html

  • To change the root device volume of an instance to persist using the command line

    You can use one of the following commands. For more information about these command line interfaces,see Accessing Amazon EC2 (p. 3).

    modify-instance-attribute (AWS CLI)

    Edit-EC2InstanceAttribute (AWS Tools for Windows PowerShell)

    Networking and SecurityYou can launch instances in one of two platforms: EC2-Classic and EC2-VPC. An instance that's launchedinto EC2-Classic is assigned a public IP address. By default, an instance that's launched into EC2-VPCis assigned public IP address only if it's launched into a default VPC. An instance that's launched into anondefault VPC must be specifically assigned a public IP address at launch, or you must modify yoursubnet's default public IP addressing behavior. For more information about EC2-Classic and EC2-VPC,see Supported Platforms (p. 603).

    Instances can fail or terminate for reasons outside of your control. If one fails and you launch a replacementinstance, the replacement has a different public IP address than the original. However, if your applicationneeds a static IP address, Amazon EC2 offers Elastic IP addresses. For more information, see AmazonEC2 Instance IP Addressing (p. 623).

    You can use security groups to control who can access your instances.These are analogous to an inboundnetwork firewall that enables you to specify the protocols, ports, and source IP ranges that are allowedto reach your instances.You can create multiple security groups and assign different rules to each group.You can then assign each instance to one or more security groups, and we use the rules to determinewhich traffic is allowed to reach the instance.You can configure a security group so that only specific IPaddresses or specific security groups have access to the instance. For more information, see AmazonEC2 Security Groups for Windows Instances (p. 539).

    AWS Identity and Access ManagementAWS Identity and Access Management (IAM) enables you to do the following:

    Create users and groups under your AWS account

    Assign unique security credentials to each user under your AWS account

    Control each user's permissions to perform tasks using AWS resources

    Allow the users in another AWS account to share your AWS resources

    Create roles for your AWS account and define the users or services that can assume them

    Use existing identities for your enterprise to grant permissions to perform tasks using AWS resources

    By using IAM with Amazon EC2, you can control whether users in your organization can perform a taskusing specific Amazon EC2 API actions and whether they can use specific AWS resources.

    For more information about IAM, see the following:

    Creating an IAM Group and Users (p. 549)

    IAM Policies for Amazon EC2 (p. 550)

    IAM Roles for Amazon EC2 (p. 590)

    Identity and Access Management (IAM)

    IAM User Guide

    10

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    Networking and Security

    http://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-attribute.htmlhttp://docs.aws.amazon.com/powershell/latest/reference/items/Edit-EC2InstanceAttribute.htmlhttp://aws.amazon.com/iamhttp://docs.aws.amazon.com/IAM/latest/UserGuide/

  • Differences between Windows Server and anAmazon EC2 Windows InstanceAfter you launch your Amazon EC2 Windows instance, it behaves like a traditional server running WindowsServer. For example, both Windows Server and an Amazon EC2 instance can be used to run your webapplications, conduct batch processing, or manage applications requiring large-scale computations.However, there are important differences between the server hardware model and the cloud computingmodel. The way an Amazon EC2 instance runs is not the same as the way a traditional server runningWindows Server runs.

    Before you begin launching Amazon EC2 Windows instances, you should be aware that the architectureof applications running on cloud servers can differ significantly from the architecture for traditionalapplication models running on your hardware. Implementing applications on cloud servers requires a shiftin your design process.

    The following table describes some key differences between Windows Server and an Amazon EC2Windows instance.

    Amazon EC2 Windows InstanceWindows Server

    Resources and capacity are scalable.Resources and capacity are physically limited.

    You pay for the usage of the infrastructure.We stopcharging you for the instance as soon as you stopor terminate it.

    You pay for the infrastructure, even if you don't useit.

    Doesn't occupy physical space and does not re-quire regular maintenance.

    Occupies physical space and must be maintainedon a regular basis.

    Starts with the launch of the instance.Starts with push of the power button (known ascold booting).

    You can keep the server running, or stop and re-start it (during which the instance is moved to anew host computer).

    You can keep the server running until it is time toshut it down, or put it in a sleep or hibernation state(during which the server is powered down).

    When you terminate the instance, its infrastructureis no longer available to you.You can't connect toor restart an instance after you've terminated it.However, you can create an image from your in-stance while it's running, and launch new instancesfrom the image at any time.

    When you shut down the server, all resources re-main intact and in the state they were in when youswitched it off. Information you stored on the harddrives persists and can be accessed whenever it'sneeded.You can restore the server to the runningstate by powering it on.

    A traditional server running Windows Server goes through the states shown in the following diagram.

    11

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    Differences between Windows Server and an AmazonEC2 Windows Instance

  • An Amazon EC2 Windows instance is similar to the traditional Windows Server, as you can see bycomparing the following diagram with the previous diagram for Windows Server. After you launch aninstance, it briefly goes into the pending state while registration takes place, then it goes into the runningstate. The instance remains active until you stop or terminate it.You can't restart an instance after youterminate it.You can create a backup image of your instance while it's running, and launch a new instancefrom that backup image.

    Designing Your Applications to Run on AmazonEC2 Windows InstancesIt is important that you consider the differences mentioned in the previous section when you design yourapplications to run on Amazon EC2 Windows instances.

    Applications built for Amazon EC2 use the underlying computing infrastructure on an as-needed basis.They draw on necessary resources (such as storage and computing) on demand in order to perform ajob, and relinquish the resources when done. In addition, they often dispose of themselves after the jobis done.While in operation, the application scales up and down elastically based on resource requirements.An application running on an Amazon EC2 instance can terminate and recreate the various componentsat will in case of infrastructure failures.

    When designing your Windows applications to run on Amazon EC2, you can plan for rapid deploymentand rapid reduction of compute and storage resources, based on your changing needs.

    When you run an Amazon EC2 Windows instance, you don't need to provision the exact system packageof hardware, software, and storage, the way you do with Windows Server. Instead, you can focus onusing a variety of cloud resources to improve the scalability and overall performance of your Windowsapplication.

    With Amazon EC2, designing for failure and outages is an integral and crucial part of the architecture.As with any scalable and redundant system, architecture of your system should account for computing,network, and storage failures.You have to build mechanisms in your applications that can handle differentkinds of failures. The key is to build a modular system with individual components that are not tightlycoupled, can interact asynchronously, and treat one another as black boxes that are independentlyscalable.Thus, if one of your components fails or is busy, you can launch more instances of that componentwithout breaking your current system.

    Another key element to designing for failure is to distribute your application geographically. Replicatingyour application across geographically distributed regions improves high availability in your system.

    Amazon EC2 infrastructure is programmable and you can use scripts to automate the deployment process,to install and configure software and applications, and to bootstrap your virtual servers.

    12

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    Designing Your Applications to Run on Amazon EC2Windows Instances

  • You should implement security in every layer of your application architecture running on an Amazon EC2Windows instance. If you are concerned about storing sensitive and confidential data within your AmazonEC2 environment, you should encrypt the data before uploading it.

    13

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    Designing Your Applications to Run on Amazon EC2Windows Instances

  • Setting Up with Amazon EC2

    If you've already signed up for Amazon Web Services (AWS), you can start using Amazon EC2 immediately.You can open the Amazon EC2 console, click Launch Instance, and follow the steps in the launch wizardto launch your first instance.

    If you haven't signed up for AWS yet, or if you need assistance launching your first instance, completethe following tasks to get set up to use Amazon EC2:

    1. Sign Up for AWS (p. 14)

    2. Create an IAM User (p. 15)

    3. Create a Key Pair (p. 16)

    4. Create a Virtual Private Cloud (VPC) (p. 18)

    5. Create a Security Group (p. 18)

    Sign Up for AWSWhen you sign up for Amazon Web Services (AWS), your AWS account is automatically signed up forall services in AWS, including Amazon EC2.You are charged only for the services that you use.

    With Amazon EC2, you pay only for what you use. If you are a new AWS customer, you can get startedwith Amazon EC2 for free. For more information, see AWS Free Tier.

    If you have an AWS account already, skip to the next task. If you don't have an AWS account, use thefollowing procedure to create one.

    To create an AWS account

    1. Open http://aws.amazon.com/, and then choose Create an AWS Account.

    2. Follow the online instructions.

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

    Note your AWS account number, because you'll need it for the next task.

    14

    Amazon Elastic Compute Cloud User Guide for MicrosoftWindows Instances

    Sign Up for AWS

    http://aws.amazon.com/free/http://aws.amazon.com/

  • Create an IAM UserServices in AWS, such as Amazon EC2, require that you provide credentials when you access them, sothat the service can determine whether you have permission to access its resources.The console requiresyour password.You can create access keys for your AWS account to access the command line interfaceor API. However, we don't recommend that you access AWS using the credentials for your AWS account;we recommend that you use AWS Identity and Access Management (IAM) instead. Create an IAM user,and then add the user to an IAM group with administrative permissions or and grant this user administrativepermissions.You can then access AWS using a special URL and the credential