AWS CLI で Application Auto Scaling の「失敗」のスケーリングアクティビティが取得できない事象を回避するには

AWS CLI で Application Auto Scaling の「失敗」のスケーリングアクティビティが取得できない事象を回避するには

2026.03.16

困っていた内容

ECS サービスで Application Auto Scaling を設定済みです。
AWS CLI でスケーリングアクティビティを確認したところ、ステータスが「失敗」のイベントを取得できません
AWS マネジメントコンソールでは表示されますが、なぜでしょうか。

どう対応すればいいの?

コマンドに--include-not-scaled-activitiesを追加してください。

$ aws application-autoscaling describe-scaling-activities \
  --include-not-scaled-activities \
  --service-namespace ecs \
  --scalable-dimension ecs:service:DesiredCount \
  --resource-id service/hato-cluster/hato-service

スケーリングアクティビティを取得するdescribe-scaling-activitiesコマンドは、デフォルトでスケーリングされていないアクティビティを取得しません。

Scaling activities for Application Auto Scaling - Application Auto Scaling

To include activities that aren't scaled (not scaled activities) in the response, add the --include-not-scaled-activities option to the describe-scaling-activities command.

そのため、ステータスが「失敗」などのスケーリングされていないアクティビティも取得したい場合は、--include-not-scaled-activitiesオプションを指定して、コマンドを実行してください。

参考資料

--include-not-scaled-activities | --no-include-not-scaled-activities (boolean)

Specifies whether to include activities that aren’t scaled (not scaled activities ) in the response. Not scaled activities are activities that aren’t completed or started for various reasons, such as preventing infinite scaling loops. For help interpreting the not scaled reason details in the response, see Scaling activities for Application Auto Scaling .


AWSテクニカルサポートノートについて

過去にクラスメソッドのAWS総合支援サービスで頂いたお問合せの中から、通常のAWS利用時でも有益になりうる情報をテクニカルサポートチームがTIPSとしてご紹介しています。技術サポートは、無料でご提供しております。詳細は下記ボタンからご覧ください。

クラスメソッドのAWSサポートの詳細を見る

この記事をシェアする

AWSのお困り事はクラスメソッドへ

関連記事