스택 이벤트 기록 보기
aws cloudformation describe-stack-events
명령을 사용하여 AWS CloudFormation에서 생성하고 삭제하는 리소스의 상태를 추적할 수 있습니다. 스택을 생성하거나 삭제하는 시간 양은 스택의 복잡성에 따라 다릅니다.
다음 예제에서는 aws cloudformation create-stack
명령을 사용하여 템플릿 파일에서 샘플 스택을 생성합니다. 스택을 생성한 후에는 aws cloudformation describe-stack-events
명령을 사용하여 스택 생성 중 보고된 이벤트를 표시합니다.
다음 예제에서는 myteststack
템플릿 파일을 사용하여 이름이 sampletemplate.json
인 스택을 생성합니다.
$
aws cloudformation create-stack \ --stack-name myteststack \ --template-body file:///home/local/test/sampletemplate.json
[ { "StackId": "arn:aws:cloudformation:us-east-2:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896", "Description": "AWS CloudFormation Sample Template S3_Bucket: Sample template showing how to create a publicly accessible S3 bucket. **WARNING** This template creates an S3 bucket. You will be billed for the AWS resources used if you create a stack from this template.", "Tags": [], "Outputs": [ { "Description": "Name of S3 bucket to hold website content", "OutputKey": "BucketName", "OutputValue": "myteststack-s3bucket-jssofi1zie2w" } ], "StackStatusReason": null, "CreationTime": "2013-08-23T01:02:15.422Z", "Capabilities": [], "StackName": "myteststack", "StackStatus": "CREATE_COMPLETE", "DisableRollback": false } ]
다음 예제에서는 myteststack
스택 이벤트를 설명합니다.
$
aws cloudformation describe-stack-events --stack-name myteststack
{ "StackEvents": [ { "StackId": "arn:aws:cloudformation:us-east-2:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896", "EventId": "af67ef60-0b8f-11e3-8b8a-500150b352e0", "ResourceStatus": "CREATE_COMPLETE", "ResourceType": "AWS::CloudFormation::Stack", "Timestamp": "2013-08-23T01:02:30.070Z", "StackName": "myteststack", "PhysicalResourceId": "arn:aws:cloudformation:us-east-2:123456789012:stack/myteststack/a69442d0-0b8f-11e3-8b8a-500150b352e0", "LogicalResourceId": "myteststack" }, { "StackId": "arn:aws:cloudformation:us-east-2:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896", "EventId": "S3Bucket-CREATE_COMPLETE-1377219748025", "ResourceStatus": "CREATE_COMPLETE", "ResourceType": "AWS::S3::Bucket", "Timestamp": "2013-08-23T01:02:28.025Z", "StackName": "myteststack", "ResourceProperties": "{\"AccessControl\":\"PublicRead\"}", "PhysicalResourceId": "myteststack-s3bucket-jssofi1zie2w", "LogicalResourceId": "S3Bucket" }, { "StackId": "arn:aws:cloudformation:us-east-2:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896", "EventId": "S3Bucket-CREATE_IN_PROGRESS-1377219746688", "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::S3::Bucket", "Timestamp": "2013-08-23T01:02:26.688Z", "ResourceStatusReason": "Resource creation Initiated", "StackName": "myteststack", "ResourceProperties": "{\"AccessControl\":\"PublicRead\"}", "PhysicalResourceId": "myteststack-s3bucket-jssofi1zie2w", "LogicalResourceId": "S3Bucket" }, { "StackId": "arn:aws:cloudformation:us-east-2:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896", "EventId": "S3Bucket-CREATE_IN_PROGRESS-1377219743862", "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::S3::Bucket", "Timestamp": "2013-08-23T01:02:23.862Z", "StackName": "myteststack", "ResourceProperties": "{\"AccessControl\":\"PublicRead\"}", "PhysicalResourceId": null, "LogicalResourceId": "S3Bucket" }, { "StackId": "arn:aws:cloudformation:us-east-2:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896", "EventId": "a69469e0-0b8f-11e3-8b8a-500150b352e0", "ResourceStatus": "CREATE_IN_PROGRESS", "ResourceType": "AWS::CloudFormation::Stack", "Timestamp": "2013-08-23T01:02:15.422Z", "ResourceStatusReason": "User Initiated", "StackName": "myteststack", "PhysicalResourceId": "arn:aws:cloudformation:us-east-2:123456789012:stack/myteststack/a69442d0-0b8f-11e3-8b8a-500150b352e0", "LogicalResourceId": "myteststack" } ] }
참고
스택이 생성되는 동안 aws cloudformation describe-stack-events
명령을 실행하여 보고되는 이벤트를 볼 수 있습니다.
가장 최신 이벤트가 먼저 보고됩니다. 다음 표에서는 aws cloudformation describe-stack-events
명령에서 반환되는 필드를 설명합니다.
필드 | 설명 |
---|---|
EventId |
이벤트 식별자입니다. |
StackName |
이벤트에 해당하는 스택의 이름입니다. |
StackId |
이벤트에 해당하는 스택의 식별자입니다. |
LogicalResourceId |
리소스의 논리적 식별자입니다. |
PhysicalResourceId |
리소스의 물리적 식별자입니다. |
ResourceProperties |
리소스의 속성입니다. |
ResourceType |
리소스의 유형입니다. |
Timestamp |
이벤트가 발생한 시간입니다. |
ResourceStatus |
|
DetailedStatus |
스택의 세부 상태입니다. |
ResourceStatusReason |
상태에 대한 추가 정보입니다. |