π‘οΈ AWS CloudTrail Trail is not integrated with CloudWatch Logsπ’
- Contextual name: π‘οΈ Trail is not integrated with CloudWatch Logsπ’
- ID:
/ce/ca/aws/cloudtrail/trail-cloudwatch-logs-integration - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY,RELIABILITY
Logicβ
- π§ prod.logic.yamlπ π’
- π AWS CloudTrail Trail
- π§ͺ test-data.json
Similar Policiesβ
Descriptionβ
Descriptionβ
This policy identifies AWS CloudTrail trails that are not configured to deliver trail events to Amazon CloudWatch Logs.
Rationaleβ
Integrating CloudTrail with Amazon CloudWatch Logs provides centralized, near-real-time visibility into AWS API activity. Once trail events are available in CloudWatch Logs, security and operations teams can create metric filters, alarms, dashboards, and queries to detect suspicious behavior, investigate changes, and accelerate incident response.
CloudWatch Logs integration complements S3 log delivery by making audit events easier to monitor as they occur and correlate with other service logs.
Impactβ
Enabling CloudWatch Logs integration may increase AWS costs for log ingestion, storage, and retention. Review log retention settings and expected event volume to balance visibility with cost.
Auditβ
This policy flags an AWS CloudTrail Trail as
INCOMPLIANTwhen either theCloudWatch Logs Log Group ARNorCloudWatch Logs Role ARNfield is empty.Trails are also flagged as
INCOMPLIANTwhen CloudWatch Logs integration is configured but the associated Log Group or IAM Role is missing from the CMDB.
Remediationβ
Remediationβ
Configure CloudWatch Logs Integrationβ
To support centralized monitoring and alerting for CloudTrail events, configure the trail to deliver logs to an Amazon CloudWatch Logs log group and specify an IAM role that CloudTrail can assume to publish log data.
From Command Lineβ
If a target log group does not already exist, create one:
aws logs create-log-group \
--region {{region}} \
--log-group-name {{log-group-name}}Create a trust policy document
{{cloudtrail-trust-policy}}.jsonwith the following content:{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "cloudtrail.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}Create the IAM role that CloudTrail will assume to publish log events:
aws iam create-role \
--role-name {{cloudtrail-cloudwatch-role}} \
--assume-role-policy-document file://{{cloudtrail-trust-policy}}.jsonCreate a permissions policy document
{{cloudtrail-cloudwatch-policy}}.jsonwith the following content:... see more