Troubleshooting Amazon EC2 Auto Scaling - Amazon EC2 Auto Scaling

Troubleshooting Amazon EC2 Auto Scaling

Amazon EC2 Auto Scaling provides specific and descriptive errors to help you troubleshoot issues. You can find the error messages in the description of the scaling activities.

General troubleshooting issues

Permissions required for a launch template are missing

You can add a launch template to a new Auto Scaling group or to an existing Auto Scaling group. If you are attempting to use a launch template, and you do not have sufficient permissions, you receive an error that you're not authorized to use the launch template. For information about the permissions necessary to work with launch templates, see Launch template support.

Permissions required for an IAM role are missing

To create or update an Auto Scaling group using a launch template that specifies an instance profile, you must have permission to pass IAM roles. It's a permission that AWS also checks whenever you create a launch configuration that specifies an instance profile. For more information, see IAM role for applications that run on Amazon EC2 instances. For further troubleshooting topics related to instance profiles, see Troubleshooting Amazon EC2 and IAM in the IAM User Guide.

Retrieving an error message

To retrieve an error message from the description of scaling activities, use the describe-scaling-activities command as follows:

aws autoscaling describe-scaling-activities --auto-scaling-group-name my-asg

The following is an example response, where StatusCode contains the current status of the activity and StatusMessage contains the error message:

{ "Activities": [ { "Description": "Launching a new EC2 instance: i-4ba0837f", "AutoScalingGroupName": "my-asg", "ActivityId": "f9f2d65b-f1f2-43e7-b46d-d86756459699", "Details": "{"Availability Zone":"us-west-2c"}", "StartTime": "2013-08-19T20:53:29.930Z", "Progress": 100, "EndTime": "2013-08-19T20:54:02Z", "Cause": "At 2013-08-19T20:53:25Z a user request created an AutoScalingGroup...", "StatusCode": "Failed", "StatusMessage": "The image id 'ami-4edb0327' does not exist. Launching EC2 instance failed." } ] }

The following tables list the types of error messages and provide links to the troubleshooting resources that you can use to troubleshoot issues.