翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
Amazon EC2 Auto Scaling の問題をトラブルシューティングする
Amazon EC2 Auto Scaling では、固有かつ説明的なエラー情報を出力するので、問題のトラブルシューティングに役立てられます。エラーメッセージは規模の拡大や縮小の説明から取得できます。
トピック
スケーリングアクティビティからのエラーメッセージを取得する
スケーリングのアクティビティの説明からエラーメッセージを取得するには、describe-scaling-activities
注記
スケーリングアクティビティは、Amazon EC2 Auto Scaling コンソールの Auto Scaling グループ用の [Activity] (アクティビティ) タブにあるアクティビティ履歴にも表示されています。
特定の Auto Scaling グループのスケーリングを表示するには、次のコマンドを使用します。
aws autoscaling describe-scaling-activities --auto-scaling-group-name
my-asg
以下は、StatusCode
で現在のスケーリングのステータスを示し、StatusMessage
でエラーメッセージを示している応答の例です。
{
"Activities": [
{
"ActivityId": "3b05dbf6-037c-b92f-133f-38275269dc0f",
"AutoScalingGroupName": "my-asg",
"Description": "Launching a new EC2 instance: i-003a5b3ffe1e9358e. Status Reason: Instance failed to complete user's Lifecycle Action: Lifecycle Action with token e85eb647-4fe0-4909-b341-a6c42d8aba1f was abandoned: Lifecycle Action Completed with ABANDON Result",
"Cause": "At 2021-01-11T00:35:52Z a user request created an AutoScalingGroup changing the desired capacity from 0 to 1. At 2021-01-11T00:35:53Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1.",
"StartTime": "2021-01-11T00:35:55.542Z",
"EndTime": "2021-01-11T01:06:31Z",
"StatusCode": "Cancelled",
"StatusMessage": "Instance failed to complete user's Lifecycle Action: Lifecycle Action with token e85eb647-4fe0-4909-b341-a6c42d8aba1f was abandoned: Lifecycle Action Completed with ABANDON Result",
"Progress": 100,
"Details": "{\"Subnet ID\":\"subnet-5ea0c127\",\"Availability Zone\":\"us-west-2b\"...}",
"AutoScalingGroupARN": "arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:283179a2-f3ce-423d-93f6-66bb518232f7:autoScalingGroupName/my-asg"
},
...
]
}
出力の各フィールドについては、「Amazon EC2 Auto Scaling API Reference」(Amazon EC2 Auto Scaling API リファレンス) の「Activity」(アクティビティ) を参照してください。
削除されたグループのスケーリングアクティビティを表示するには
Auto Scaling グループが削除された後にスケーリングのアクティビティを表示するには、次のように describe-scaling-activities--include-deleted-groups
オプションを追加します。
aws autoscaling describe-scaling-activities --auto-scaling-group-name
my-asg
--include-deleted-groups
下記は、削除されたグループのスケーリングに関する応答の例です。
{
"Activities": [
{
"ActivityId": "e1f5de0e-f93e-1417-34ac-092a76fba220",
"AutoScalingGroupName": "my-asg",
"Description": "Launching a new EC2 instance. Status Reason: Your Spot request price of 0.001 is lower than the minimum required Spot request fulfillment price of 0.0031. Launching EC2 instance failed.",
"Cause": "At 2021-01-13T20:47:24Z a user request update of AutoScalingGroup constraints to min: 1, max: 5, desired: 3 changing the desired capacity from 0 to 3. At 2021-01-13T20:47:27Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 3.",
"StartTime": "2021-01-13T20:47:30.094Z",
"EndTime": "2021-01-13T20:47:30Z",
"StatusCode": "Failed",
"StatusMessage": "Your Spot request price of 0.001 is lower than the minimum required Spot request fulfillment price of 0.0031. Launching EC2 instance failed.",
"Progress": 100,
"Details": "{\"Subnet ID\":\"subnet-5ea0c127\",\"Availability Zone\":\"us-west-2b\"...}",
"AutoScalingGroupState": "Deleted",
"AutoScalingGroupARN": "arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:283179a2-f3ce-423d-93f6-66bb518232f7:autoScalingGroupName/my-asg"
},
...
]
}
スケーリングアクティビティをオフにする
スケーリングポリシーやスケジュールされたアクションに影響を受けずに問題を調査する必要がある場合、次のオプションがあります。
-
AlarmNotification
プロセスとScheduledActions
プロセスを中断することで、すべての動的スケーリングポリシーとスケジュールされたアクションによってグループの希望するキャパシティが変更されるのを防ぎます。詳細については、「Amazon EC2 Auto Scaling プロセスの中断と再開」を参照してください。 -
個々の動的スケーリングポリシーを無効にして、負荷の変化に応じてグループの希望するキャパシティを変更しないようにします。詳細については、「Auto Scaling グループのスケーリングポリシーを無効化する」を参照してください。
-
個々のターゲット追跡スケーリングポリシーを更新して、ポリシーのスケールイン部分を無効にしてスケールアウト (キャパシティを追加) のみを行います。この方法では、グループの希望するキャパシティが縮小しないようになりますが、負荷が増加するとキャパシティを増やすことができます。詳細については、「Amazon EC2 Auto Scaling のターゲットトラッキングスケーリングポリシー」を参照してください。
-
予測スケーリングポリシーを予測のみモードに更新します。予測のみモードでは、予測スケーリングは予測を生成し続けますが、自動的にキャパシティを増やすことはありません。詳細については、「Auto Scaling グループの予測スケーリングポリシーを作成する」を参照してください。
その他のトラブルシューティングリソース
以下のページには、Amazon EC2 Auto Scaling での問題のトラブルシューティングに関する追加の情報が記載されています。
以下の AWS リソースも役立ちます。
トラブルシューティングには、エキスパート、またはヘルパーコミュニティによる反復的な照会と検出が必要になることがよくあります。このセクションの提案を試した後も問題が解決しない場合は、 AWS サポート ( でサポート AWS Management Console、サポートセンター をクリック) に問い合わせるか、Amazon EC2 Auto Scaling タグを使用して AWS re:Post