Ensure CloudTrail trails are integrated with CloudWatch logs for improved monitoring.
Rule | CloudTrail trails should be integrated with CloudWatch logs |
Framework | NIST 800-53 Revision 4 |
Severity | ✔ Critical |
Rule Description:
CloudTrail trails should be integrated with CloudWatch logs for NIST 800-53 Revision 4 compliance. This rule ensures that logs generated by CloudTrail, which captures AWS API and management events, are stored securely in CloudWatch logs. Integrating with CloudWatch logs allows for centralized log management, real-time monitoring, and analysis of events for compliance and security purposes, as required by the NIST 800-53 Revision 4 standard.
Troubleshooting Steps:
If CloudTrail trails are not integrated with CloudWatch logs, follow these troubleshooting steps:
Verify CloudTrail Configuration:
Verify CloudWatch Logs Configuration:
Check IAM Permissions:
Check CloudTrail and CloudWatch Logs Integration:
Necessary Codes:
Resources: MyCloudTrailTrail: Type: "AWS::CloudTrail::Trail" Properties: # Trail configuration properties... CloudWatchLogsLogGroupArn: "arn:aws:logs:<region>:<account-id>:log-group:MyCloudTrailLogs"
aws cloudtrail create-subscription \ --name MyCloudTrail \ --s3-new-bucket MyBucket \ --cloud-watch-logs-log-group-arn arn:aws:logs:<region>:<account-id>:log-group:MyCloudTrailLogs
Step-by-Step Guide for Remediation:
To integrate CloudTrail trails with CloudWatch logs for NIST 800-53 Revision 4 compliance, follow these steps:
Log in to the AWS Management Console.
Open the CloudTrail service.
Click on "Trails" in the left navigation pane.
Select the trail you want to enable CloudWatch logs integration for.
Click on the "Edit" button.
In the "CloudWatch Logs" section, choose the CloudWatch Logs group where you want to store the logs. If the group does not exist, you can create it by clicking on "Create a new group".
Click on "Save" to apply the changes.
Verify that the trail has been integrated with the selected CloudWatch Logs group by checking the status of the trail.
If using CloudFormation, use the provided code snippet and modify it with the appropriate values for your environment. Then deploy the CloudFormation stack to create the trail with CloudWatch logs integration.
If using the AWS CLI, execute the provided code snippet in the terminal or command prompt, replacing the placeholders with the correct values for your environment.
Monitor the CloudTrail trail and CloudWatch Logs to ensure that the logs are successfully captured and stored in the specified CloudWatch Logs group.
By completing these steps, you will have successfully integrated CloudTrail trails with CloudWatch logs for NIST 800-53 Revision 4 compliance. This allows for centralized log management and monitoring, helping to meet the security and compliance requirements outlined by the NIST standard.