Amazon Elastic Compute Cloud
User Guide for Windows Instances

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Troubleshooting Instance Launch Issues

The following issues prevent you from launching an instance.

Instance Limit Exceeded

Description

You get the InstanceLimitExceeded error when you try to launch a new instance or restart a stopped instance.

Cause

If you get an InstanceLimitExceeded error when you try to launch a new instance or restart a stopped instance, you have reached the limit on the number of instances that you can launch in a region. When you create your AWS account, we set default limits on the number of instances you can run on a per-region basis.

Solution

You can request an instance limit increase on a per-region basis. For more information, see Amazon EC2 Service Limits.

Insufficient Instance Capacity

Description

You get the InsufficientInstanceCapacity error when you try to launch a new instance or restart a stopped instance.

Cause

If you get an InsufficientInstanceCapacity error when you try to launch an instance or restart a stopped instance, AWS does not currently have enough available On-Demand capacity to service your request.

Solution

To resolve the issue, try the following:

  • Wait a few minutes and then submit your request again; capacity can shift frequently.

  • Submit a new request with a reduced number of instances. For example, if you're making a single request to launch 15 instances, try making 3 requests for 5 instances, or 15 requests for 1 instance instead.

  • If you're launching an instance, submit a new request without specifying an Availability Zone.

  • If you're launching an instance, submit a new request using a different instance type (which you can resize at a later stage). For more information, see Changing the Instance Type.

  • If you are launching instances into a cluster placement group, you can get an insufficient capacity error. For more information, see Placement Group Rules and Limitations.

  • Try creating an On-Demand Capacity Reservation, which enables you to reserve Amazon EC2 capacity for any duration. For more information, see On-Demand Capacity Reservations.

  • Try purchasing Reserved Instances, which are a long-term capacity reservation. For more information, see Amazon EC2 Reserved Instances.

Instance Terminates Immediately

Description

Your instance goes from the pending state to the terminated state immediately after restarting it.

Cause

The following are a few reasons why an instance might immediately terminate:

  • You've reached your EBS volume limit.

  • An EBS snapshot is corrupt.

  • The root EBS volume is encrypted and you do not have permissions to access the KMS key for decryption.

  • The instance store-backed AMI that you used to launch the instance is missing a required part (an image.part.xx file).

Solution

You can use the Amazon EC2 console or AWS Command Line Interface to get the termination reason.

To get the termination reason using the Amazon EC2 console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

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

  3. In the Description tab, note the reason next to the State transition reason label.

To get the termination reason using the AWS Command Line Interface

  1. Use the describe-instances command and specify the instance ID.

    aws ec2 describe-instances --instance-id instance_id
  2. Review the JSON response returned by the command and note the values in the StateReason response element.

    The following code block shows an example of a StateReason response element.

    "StateReason": { "Message": "Client.VolumeLimitExceeded: Volume limit exceeded", "Code": "Server.InternalError" },

To address the issue

Take one of the following actions depending on the termination reason you noted:

  • If the reason is Client.VolumeLimitExceeded: Volume limit exceeded, you have reached your EBS volume limit. For more information, see Instance Volume Limits. To submit a request to increase your Amazon EBS volume limit, complete the AWS Support Center Create Case form. For more information, see Amazon EC2 Service Limits.

  • If the reason is Client.InternalError: Client error on launch, that typically indicates that the root volume is encrypted and that you do not have permissions to access the KMS key for decryption. To get permissions to access the required KMS key, add the appropriate KMS permissions to your IAM user. For more information, see Using Key Policies in AWS KMS in the AWS Key Management Service Developer Guide.

High CPU Usage Shortly After Windows Starts

If Windows Update is set to Check for updates but let me choose whether to download and install them (the default instance setting) this check can consume anywhere from 50 - 99% of the CPU on the instance. If this CPU consumption causes problems for your applications, you can manually change Windows Update settings in Control Panel or you can use the following script in the Amazon EC2 user data field:

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f net stop wuauserv net start wuauserv

When you execute this script specify a value for /d. The default value is 3. Possible values include the following:

  • Never check for updates

  • Check for updates but let me choose whether to download and install them

  • Download updates but let me choose whether to install them

  • Install updates automatically

To modify the user data for an Amazon EBS-backed instance

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

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

  3. Choose Actions, select Instance State, and then choose Stop.

  4. In the confirmation dialog box, select Yes, Stop. It can take a few minutes for the instance to stop.

  5. With the instance still selected, select Actions, select Instance Settings, and then choose View/Change User Data. Note that you can't change the user data if the instance is running, but you can view it.

  6. In the View/Change User Data dialog box, update the user data, and then choose Save.

After you modify the user data for your instance, you can execute it. For more information, see User Data Execution.