-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release-1.10.13: Bumping version to 1.10.13 Update CHANGELOG Update CHANGELOG examples for route53 change-tags-for-resource Allow pound sign for key in short hand Change groff command update dynamodb query example to use --expression-attribute-values fix file mode remove output:none from examples updated autoscaling set-instance-protection example updated ec2 authorize-security-group-ingress example New examples for CloudTrail
- Loading branch information
Showing
27 changed files
with
308 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**To add tags to trail** | ||
|
||
The following ``add-tags`` command adds tags for ``Trail1``:: | ||
|
||
aws cloudtrail add-tags --resource-id arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail1 --tags-list Key=name,Value=Alice Key=location,Value=us |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
**To create and configure AWS resources for a trail** | ||
|
||
The following ``create-subscription`` command creates a new S3 bucket and SNS topic for ``Trail1``:: | ||
|
||
aws cloudtrail create-subscription --name Trail1 --s3-new-bucket my-bucket --sns-new-topic my-topic | ||
|
||
Output:: | ||
|
||
Setting up new S3 bucket my-bucket... | ||
Setting up new SNS topic my-topic... | ||
Creating/updating CloudTrail configuration... | ||
CloudTrail configuration: | ||
{ | ||
"trailList": [ | ||
{ | ||
"IncludeGlobalServiceEvents": true, | ||
"Name": "Trail1", | ||
"TrailARN": "arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail1", | ||
"LogFileValidationEnabled": false, | ||
"IsMultiRegionTrail": false, | ||
"S3BucketName": "my-bucket", | ||
"SnsTopicName": "my-topic", | ||
"HomeRegion": "us-east-1" | ||
} | ||
], | ||
"ResponseMetadata": { | ||
"HTTPStatusCode": 200, | ||
"RequestId": "f39e51f6-c615-11e5-85bd-d35ca21ee3e2" | ||
} | ||
} | ||
Starting CloudTrail service... | ||
Logs will be delivered to my-bucket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
**To create a trail** | ||
|
||
The following ``create-trail`` command creates a multi-region trail named ``Trail1`` and specifies an S3 bucket:: | ||
|
||
aws cloudtrail create-trail --name Trail1 --s3-bucket-name my-bucket --is-multi-region-trail | ||
|
||
Output:: | ||
|
||
{ | ||
"IncludeGlobalServiceEvents": true, | ||
"Name": "Trail1", | ||
"TrailARN": "arn:aws:cloudtrail:us-west-2:123456789012:trail/Trail1", | ||
"LogFileValidationEnabled": false, | ||
"IsMultiRegionTrail": true, | ||
"S3BucketName": "my-bucket" | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
**To delete a trail** | ||
|
||
The following ``delete-trail`` command deletes a trail named ``Trail1``:: | ||
|
||
aws cloudtrail delete-trail --name Trail1 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
**To describe a trail** | ||
|
||
The following ``describe-trails`` command returns the settings for ``Trail1`` and ``Trail2``:: | ||
|
||
aws cloudtrail describe-trails --trail-name-list Trail1 Trail2 | ||
|
||
Output:: | ||
|
||
{ | ||
"trailList": [ | ||
{ | ||
"IncludeGlobalServiceEvents": true, | ||
"Name": "Trail1", | ||
"TrailARN": "arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail1", | ||
"LogFileValidationEnabled": false, | ||
"IsMultiRegionTrail": false, | ||
"S3BucketName": "my-bucket", | ||
"CloudWatchLogsRoleArn": "arn:aws:iam::123456789012:role/CloudTrail_CloudWatchLogs_Role", | ||
"CloudWatchLogsLogGroupArn": "arn:aws:logs:us-east-1:123456789012:log-group:CloudTrail:*", | ||
"SnsTopicName": "my-topic", | ||
"HomeRegion": "us-east-1" | ||
}, | ||
{ | ||
"IncludeGlobalServiceEvents": true, | ||
"Name": "Trail2", | ||
"S3KeyPrefix": "my-prefix", | ||
"TrailARN": "arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail2", | ||
"LogFileValidationEnabled": false, | ||
"IsMultiRegionTrail": false, | ||
"S3BucketName": "my-bucket", | ||
"KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/4c5ae5ac-3c13-421e-8335-c7868ef6a769", | ||
"HomeRegion": "us-east-1" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
**To get the status of a trail** | ||
|
||
The following ``get-trail-status`` command returns the delivery and logging details for ``Trail1``:: | ||
|
||
aws cloudtrail get-trail-status --name Trail1 | ||
|
||
Output:: | ||
|
||
{ | ||
"LatestNotificationTime": 1454022144.869, | ||
"LatestNotificationAttemptSucceeded": "2016-01-28T23:02:24Z", | ||
"LatestDeliveryAttemptTime": "2016-01-28T23:02:24Z", | ||
"LatestDeliveryTime": 1454022144.869, | ||
"TimeLoggingStarted": "2015-11-06T18:36:38Z", | ||
"LatestDeliveryAttemptSucceeded": "2016-01-28T23:02:24Z", | ||
"IsLogging": true, | ||
"LatestCloudWatchLogsDeliveryTime": 1454022144.918, | ||
"StartLoggingTime": 1446834998.695, | ||
"StopLoggingTime": 1446834996.933, | ||
"LatestNotificationAttemptTime": "2016-01-28T23:02:24Z", | ||
"TimeLoggingStopped": "2015-11-06T18:36:36Z" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
**To list all public keys for a trail** | ||
|
||
The following ``list-public-keys`` command returns all public keys whose private keys were used to sign the digest files within the specified time range:: | ||
|
||
aws cloudtrail list-public-keys --start-time 2016-01-01T20:30:00.000Z | ||
|
||
Output:: | ||
|
||
{ | ||
"PublicKeyList": [ | ||
{ | ||
"ValidityStartTime": 1453076702.0, | ||
"ValidityEndTime": 1455668702.0, | ||
"Value": "MIIBCgKCAQEAlSS3cl92HDycr/MTj0moOhas8habjrraXw+KzlWF0axSI2tcF+3iJ9BKQAVSKxGwxwu3m0wG3J+kUl1xboEcEPHYoIYMbgfSw7KGnuDKwkLzsQWhUJ0cIbOHASox1vv/5fNXkrHhGbDCHeVXm804c83nvHUEFYThr1PfyP/8HwrCtR3FX5OANtQCP61C1nJtSSkC8JSQUOrIP4CuwJjc+4WGDk+BGH5m9iuiAKkipEHWmUl8/P7XpfpWQuk4h8g3pXZOrNXr08lbh4d39svj7UqdhvOXoBISp9t/EXYuePGEtBdrKD9Dz+VHwyUPtBQvYr9BnkF88qBnaPNhS44rzwIDAQAB", | ||
"Fingerprint": "7f3f401420072e50a65a141430817ab3" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
**To list the tags for a trail** | ||
|
||
The following ``list-tags`` command lists the tags for ``Trail1`` and ``Trail2``:: | ||
|
||
aws cloudtrail list-tags --resource-id-list arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail1 arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail2 | ||
|
||
Output:: | ||
|
||
{ | ||
"ResourceTagList": [ | ||
{ | ||
"ResourceId": "arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail1", | ||
"TagsList": [ | ||
{ | ||
"Value": "Alice", | ||
"Key": "name" | ||
}, | ||
{ | ||
"Value": "us", | ||
"Key": "location" | ||
} | ||
] | ||
}, | ||
{ | ||
"ResourceId": "arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail2", | ||
"TagsList": [ | ||
{ | ||
"Value": "Bob", | ||
"Key": "name" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
**To look up events for a trail** | ||
|
||
The following ``lookup-events`` command looks up API activity events by the attribute ``EventName``:: | ||
|
||
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=ConsoleLogin | ||
|
||
Output:: | ||
|
||
{ | ||
"Events": [ | ||
{ | ||
"EventId": "654ccbc0-ba0d-486a-9076-dbf7274677a7", | ||
"Username": "my-session-name", | ||
"EventTime": 1453844532.0, | ||
"CloudTrailEvent": "{\"eventVersion\":\"1.02\",\"userIdentity\":{\"type\":\"AssumedRole\",\"principalId\":\"AROAJIKPFTA72SWU4L7T4:my-session-name\",\"arn\":\"arn:aws:sts::123456789012:assumed-role/my-role/my-session-name\",\"accountId\":\"123456789012\",\"sessionContext\":{\"attributes\":{\"mfaAuthenticated\":\"false\",\"creationDate\":\"2016-01-26T21:42:12Z\"},\"sessionIssuer\":{\"type\":\"Role\",\"principalId\":\"AROAJIKPFTA72SWU4L7T4\",\"arn\":\"arn:aws:iam::123456789012:role/my-role\",\"accountId\":\"123456789012\",\"userName\":\"my-role\"}}},\"eventTime\":\"2016-01-26T21:42:12Z\",\"eventSource\":\"signin.amazonaws.com\",\"eventName\":\"ConsoleLogin\",\"awsRegion\":\"us-east-1\",\"sourceIPAddress\":\"72.21.198.70\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\",\"requestParameters\":null,\"responseElements\":{\"ConsoleLogin\":\"Success\"},\"additionalEventData\":{\"MobileVersion\":\"No\",\"MFAUsed\":\"No\"},\"eventID\":\"654ccbc0-ba0d-486a-9076-dbf7274677a7\",\"eventType\":\"AwsConsoleSignIn\",\"recipientAccountId\":\"123456789012\"}", | ||
"EventName": "ConsoleLogin", | ||
"Resources": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**To remove tags for a trail** | ||
|
||
The following ``remove-tags`` command removes the specified tags for ``Trail1``:: | ||
|
||
aws cloudtrail remove-tags --resource-id arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail1 --tags-list Key=name Key=location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**To start logging for a trail** | ||
|
||
The following ``start-logging`` command turns on logging for ``Trail1``:: | ||
|
||
aws cloudtrail start-logging --name Trail1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**To stop logging a trail** | ||
|
||
The following ``stop-logging`` command turns off logging for ``Trail1``:: | ||
|
||
aws cloudtrail stop-logging --name Trail1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
**To update the configuration settings for a trail** | ||
|
||
The following ``update-subscription`` command updates the trail to specify a new S3 bucket and SNS topic:: | ||
|
||
aws cloudtrail update-subscription --name Trail1 --s3-new-bucket my-bucket-new --sns-new-topic my-topic-new | ||
|
||
Output:: | ||
|
||
Setting up new S3 bucket my-bucket-new... | ||
Setting up new SNS topic my-topic-new... | ||
Creating/updating CloudTrail configuration... | ||
CloudTrail configuration: | ||
{ | ||
"trailList": [ | ||
{ | ||
"IncludeGlobalServiceEvents": true, | ||
"Name": "Trail1", | ||
"TrailARN": "arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail1", | ||
"LogFileValidationEnabled": false, | ||
"IsMultiRegionTrail": false, | ||
"S3BucketName": "my-bucket-new", | ||
"SnsTopicName": "my-topic-new", | ||
"HomeRegion": "us-east-1" | ||
} | ||
], | ||
"ResponseMetadata": { | ||
"HTTPStatusCode": 200, | ||
"RequestId": "31126f8a-c616-11e5-9cc6-2fd637936879" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
**To update a trail** | ||
|
||
The following ``update-trail`` command updates a trail to use an existing bucket for log delivery:: | ||
|
||
aws cloudtrail update-trail --name Trail1 --s3-bucket-name my-bucket | ||
|
||
Output:: | ||
|
||
{ | ||
"IncludeGlobalServiceEvents": true, | ||
"Name": "Trail1", | ||
"TrailARN": "arn:aws:cloudtrail:us-west-2:123456789012:trail/Trail1", | ||
"LogFileValidationEnabled": false, | ||
"IsMultiRegionTrail": true, | ||
"S3BucketName": "my-bucket" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
**To validate a log file** | ||
|
||
The following ``validate-logs`` command validates the logs for ``Trail1``:: | ||
|
||
aws cloudtrail validate-logs --trail-arn arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail1 --start-time 20160129T19:00:00Z | ||
|
||
Output:: | ||
|
||
Validating log files for trail arn:aws:cloudtrail:us-east-1:123456789012:trail/Trail1 between 2016-01-29T19:00:00Z and 2016-01-29T22:15:43Z | ||
Results requested for 2016-01-29T19:00:00Z to 2016-01-29T22:15:43Z | ||
Results found for 2016-01-29T19:24:57Z to 2016-01-29T21:24:57Z: | ||
3/3 digest files valid | ||
15/15 log files valid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
The following command adds a tag named ``owner`` to a healthcheck resource specified by ID:: | ||
|
||
aws route53 change-tags-for-resource --resource-type healthcheck --resource-id 6233434j-18c1-34433-ba8e-3443434 --add-tags Key=owner,Value=myboss | ||
|
||
The following command removes a tag named ``owner`` from a hosted zone resource specified by ID:: | ||
|
||
aws route53 change-tags-for-resource --resource-type hostedzone --resource-id Z1523434445 --remove-tag-keys owner |
Oops, something went wrong.