kawabatas技術ブログ

試してみたことを書いていきます

AWS SAM デプロイ時のエラーの調べ方

概要

AWS SAMで、サーバレスアプリケーションを開発し始めた。

デプロイ時のエラーをAWSマネジメントコンソールから確認できることを知ったのでメモ。

デプロイ時のエラー

$ make deploy
aws cloudformation deploy --template-file output-template.yaml --stack-name <s3バケット> --capabilities CAPABILITY_IAM

Waiting for changeset to be created..
Waiting for stack create/update to complete

Failed to create/update the stack. Run the following command
to fetch the list of events leading up to the failure
aws cloudformation describe-stack-events --stack-name <s3バケット>
make: *** [deploy] Error 255

こんなエラーが起きた時に、書いてある通りにaws cloudformation describe-stack-events"ResourceStatus": "CREATE_FAILED"探し、見ていた。

非常に見づらい。

AWSマネジメントコンソールのサービスで「CloudFormation」を開き、

f:id:kawabatas:20190123141647p:plain

スタックを選択し、イベントを見ればaws cloudformation describe-stack-eventsと同じものが見れる。

f:id:kawabatas:20190123141702p:plain