Created
February 13, 2019 00:14
-
-
Save 100daysofdevops/0040aec519b8c4a38d3cd2bca07133eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Create Trail(Single Region) | |
aws cloudtrail create-trail --name my-test-cloudtrail --s3-bucket-name mytests3bucketforcloudtrail | |
# Create Trail(That applies to multi-region) | |
aws cloudtrail create-trail --name my-test-cloudtrail-multiregion --s3-bucket-name mytests3bucketforcloudtrail --is-multi-region-trail | |
# To get the status/list all the trails | |
aws cloudtrail describe-trails | |
# Start logging for the trail | |
aws cloudtrail start-logging --name my-test-cloudtrail | |
# To verify if logging is enabled | |
aws cloudtrail get-trail-status --name my-test-cloudtrail | |
# To enable log file validation | |
aws cloudtrail create-trail --name my-test-cloudtrail-multiregion-logging --s3-bucket-name mytests3bucketforcloudtrail --is-multi-region-trail --enable-log-file-validation | |
# To delete a particular trail | |
aws cloudtrail delete-trail --name my-test-cloudtrail-multiregion-logging |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment