aws cloudformation
注意CFnスタックの確認・展開
aws cloudformation describe-stacks --stack-name <name>
IaCスタックの状態・失敗イベントを確認し、deployで更新。ROLLBACK系の状態はdescribe-stack-eventsで原因行を特定する。
実行例
aws cloudformation describe-stack-events --stack-name app --query 'StackEvents[?contains(ResourceStatus,`FAILED`)]'失敗イベントのみ抽出
書式
aws cloudformation [describe-stacks|describe-stack-events|deploy --template-file t --stack-name n]
実行前の注意
deployは実環境を変更する。差分確認を先に。
関連コマンド
- aws ec2 describe-instancesEC2一覧
- kubectl diff適用前の差分確認