CloudTrail increases the visibility of the API activity in your AWS account for security and monitoring purposes.
It is recommended that CloudTrail is enabled in all regions.
Step 1. Log in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/cloudtrail.
Step 2. Click on Trails on the left navigation pane.
Step 3. Click on Get Started Now, if presented:
- Click on Add new trail.
- Enter a trail name in the "Trail name" box.
- Set the "Apply trail to all regions" option to "Yes.""
- Specify an S3 bucket name in the S3 bucket box.
- Click on Create.
Step 4. If one or more trails already exist, select the target trail to enable global logging.
Step 5. Select the edit icon (pencil) next to "Apply trail to all regions," click on Yes and then click on Save.
Step 6. Select the edit icon (pencil) next to "Management Events," click on All for setting "Read/Write Events," and then click on Save.
Run the following command:
aws cloudtrail create-trail --name <trail_name> --bucket-name <s3_bucket_for_cloudtrail> --is-multi-region-trail aws cloudtrail update-trail --name <trail_name> --is-multi-region-trail
Note: Creating CloudTrail via CLI without providing any overriding options configures Management Events to set All types of Read/Writes by default.
Updated 2 months ago