Ensure CloudTrail trails are integrated with CloudWatch Logs

AWS CloudTrail is a web service that records AWS API calls made in a given AWS 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. CloudTrail uses Amazon S3 for log file storage and delivery, so log files are stored durably. In addition to capturing CloudTrail logs within a specified S3 bucket for long term analysis, realtime analysis can be performed by configuring CloudTrail to send logs to CloudWatch Logs. For a trail that is enabled in all regions in an account, CloudTrail sends log files from all those regions to a CloudWatch Logs log group. It is recommended that CloudTrail logs be sent to CloudWatch Logs.

Risk Level: Low
Cloud Entity: CloudTrail
CloudGuard Rule ID: D9.TF.AWS.LOG.03
Covered by Spectral: No
Category: Management Tools

GSL LOGIC

aws_cloudtrail should not have (cloud_watch_logs_role_arn isEmpty() or cloud_watch_logs_group_arn isEmpty())

REMEDIATION

  1. Run the following command to get a listing of existing trails aws cloudtrail describe-trails 2. Ensure CloudWatchLogsLogGroupArn is not empty and note the value of the Name property. 3. Using the noted value of the Name property, run the following command aws cloudtrail get-trail-status --name <trail_name> 4. Ensure the LatestcloudwatchLogdDeliveryTime property is set to a recent (~one day old) timestamp.

CloudTrail

AWS CloudTrail is a service that enables governance, compliance, operational auditing, and risk auditing of your AWS account. With CloudTrail, you can log, continuously monitor, and retain account activity related to actions across your AWS infrastructure. CloudTrail provides event history of your AWS account activity, including actions taken through the AWS Management Console, AWS SDKs, command line tools, and other AWS services. This event history simplifies security analysis, resource change tracking, and troubleshooting.

Compliance Frameworks

  • Terraform AWS CIS Foundations