CloudTrail should be enabled in all regions

Description

It is recommended that AWS CloudTrail is enabled in all regions. CloudTrail records AWS API calls for your account. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. The AWS API call history produced by CloudTrail enables security analysis, resource change tracking, and compliance auditing.

Console Remediation Steps

  • Navigate to Cloudtrail.

  • In the left navigation, click Trails.

  • Click Create trail.

  • Enter a Trail name.

  • In Apply trail to all regions, select Yes.

  • In Management events, select All for Read/write events.

  • In Create a new S3 bucket, select Yes.

  • In the S3 bucket, enter a name.

  • Click Create.

CLI Remediation Steps

  • To view whether trail logging is enabled, run:

    • aws cloudtrail get-event-selectors --trail-name TrailName

  • To configure CloudTrail to be enabled run:

    • aws cloudtrail put-event-selectors --trail-name TrailName --event-selectors '[{ "ReadWriteType": "All", "IncludeManagementEvents":true, "DataResources": [{ "Type": "AWS::S3::Object", "Values": ["arn:aws:s3:::mybucket/prefix", "arn:aws:s3:::mybucket2/prefix2"] }] }]'