Anzeigen des Stack-Ereignisverlaufs - AWS CloudFormation

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

Anzeigen des Stack-Ereignisverlaufs

Mit dem aws cloudformation describe-stack-events Befehl können Sie den Status der Ressourcen AWS CloudFormation verfolgen, die erstellt und gelöscht werden. Wie lange das Erstellen oder Löschen eines Stacks dauert, hängt von der Komplexität des Stapels ab.

Im folgenden Beispiel wird ein Beispielstack unter Verwendung des Befehls aws cloudformation create-stack aus einer Vorlagendatei erstellt. Nachdem der Stack erstellt worden ist, können die Ereignisse, die während der Stack-Erstellung gemeldet wurden, mit dem Befehl aws cloudformation describe-stack-events angezeigt werden.

Im folgenden Beispiel wird ein Stack mit dem Namen myteststack mithilfe der Vorlagendatei sampletemplate.json erstellt:

$ 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 } ]

Das folgende Beispiel beschreibt die myteststack-Stack-Ereignisse:

$ 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" } ] }
Anmerkung

Sie können den Befehl aws cloudformation describe-stack-events ausführen, während der Stack erstellt wird, um die Ereignisse anzuzeigen, sobald sie gemeldet werden.

Die neuesten Ereignisse werden zuerst ausgegeben. Die folgende Tabelle enthält eine Beschreibung der Felder, die vom Befehl aws cloudformation describe-stack-events zurückgegeben werden:

Feld Beschreibung
EventId

Ereignis-Kennung.

StackName

Name des Stacks, zu dem das Ereignis gehört.

StackId

Kennung des Stacks, zu dem das Ereignis gehört.

LogicalResourceId

Logische Kennung der Ressource.

PhysicalResourceId

Physische Kennung der Ressource.

ResourceProperties

Eigenschaften der Ressource.

ResourceType

Typ der Ressource.

Timestamp

Uhrzeit, zu der das Ereignis aufgetreten ist.

ResourceStatus

Der Status der Ressource, der einer der folgenden Statuscodes sein kann: CREATE_COMPLETE | | | CREATE_FAILED | CREATE_IN_PROGRESS DELETE_COMPLETE | DELETE_FAILED | DELETE_IN_PROGRESS | DELETE_SKIPPED | IMPORT_COMPLETE | IMPORT_IN_PROGRESS | IMPORT_ROLLBACK_COMPLETE | IMPORT_ROLLBACK_FAILED | IMPORT_ROLLBACK_IN_PROGRESS | REVIEW_IN_PROGRESS | ROLLBACK_COMPLETE | ROLLBACK_FAILED | ROLLBACK_IN_PROGRESS | UPDATE_COMPLETE | UPDATE_COMPLETE_CLEANUP_IN_PROGRESS | UPDATE_FAILED | UPDATE_IN_PROGRESS | UPDATE_ROLLBACK_COMPLETE | UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS | UPDATE_ROLLBACK_FAILED | UPDATE_ROLLBACK_IN_PROGRESS

Der Status DELETE_SKIPPED gilt für Ressourcen, deren Richtlinienattribut zum Löschen "retain" (beibehalten) lautet.

DetailedStatus

Der detaillierte Status des Stacks. Wenn vorhanden, CONFIGURATION_COMPLETE ist die Konfigurationsphase der Stack-Ressourcen abgeschlossen und die Stabilisierung der Ressourcen ist im Gange.

ResourceStatusReason

Weitere Informationen zum Status.