Amazon EC2 Auto Scaling をトラブルシューティングする - Amazon EC2 Auto Scaling

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

Amazon EC2 Auto Scaling をトラブルシューティングする

Amazon EC2 Auto Scaling では、固有かつ説明的なエラー情報を出力するので、問題のトラブルシューティングに役立てられます。エラーメッセージは規模の拡大や縮小の説明から取得できます。

スケーリングアクティビティからのエラーメッセージを取得する

スケーリングアクティビティの説明からエラーメッセージを取得するには、 describe-scaling-activities コマンドを使用します。スケーリングについては、6 週間前からの記録が保存されています。このためのリストでは、最新のスケーリングを最上位に、スケーリングが開始時刻順に並べられます。

注記

スケーリングアクティビティは、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" }, ... ] }

スケーリングアクティビティを無効にする

スケーリングポリシーやスケジュールされたアクションを妨げることなく問題を調査する必要がある場合は、次のオプションがあります。

  • および ScheduledActionsプロセスを一時停止することで、すべてのスケーリングポリシーAlarmNotificationとスケジュールされたアクションがグループの希望する容量を変更できないようにします。詳細については、「Amazon EC2 Auto Scaling プロセスの一時停止と再開」を参照してください。

  • 個々のスケーリングポリシーを無効にして、負荷の変化に応じてグループの希望する容量を変更しないようにします。詳細については、「Auto Scaling グループのスケーリングポリシーを無効化する」を参照してください。

  • ポリシーのスケールイン部分を無効にして、個々のターゲット追跡スケーリングポリシーを更新し、スケールアウトのみ (容量を追加) にします。この方法では、グループの希望するキャパシティーが縮小するのを防ぐことができますが、負荷が増加すると増やすことができます。詳細については、「Amazon EC2 Auto Scaling のターゲットトラッキングスケーリングポリシー」を参照してください。

その他のトラブルシューティングリソース

以下のページには、Amazon EC2 Auto Scaling での問題のトラブルシューティングに関する追加の情報が記載されています。

以下の AWS リソースも役立ちます。

トラブルシューティングには、エキスパート、またはヘルパーコミュニティによる反復的な照会と検出が必要になることがよくあります。このセクションの提案を試した後も問題が解決しない場合は、 AWS Support ( でサポートサポートセンター をクリックします) に問い合わせるか AWS Management Console、Amazon EC2 Auto Scaling タグを使用して AWS re:Post で質問してください。