This rule emphasizes the integration of CloudTrail trails with CloudWatch logs for enhanced monitoring and compliance.
Rule | CloudTrail trails should be integrated with CloudWatch logs |
Framework | FedRAMP Moderate Revision 4 |
Severity | ✔ Critical |
Rule Description:
To comply with the FedRAMP Moderate Revision 4 standard, CloudTrail trails should be integrated with CloudWatch logs. This ensures that CloudTrail logs are aggregated, stored, and monitored centrally in CloudWatch, providing comprehensive visibility into AWS API activity within your AWS account.
Integrating CloudTrail with CloudWatch logs helps in meeting the requirement for continuous monitoring and centralizing log management, which are crucial for security and compliance purposes.
Troubleshooting Steps:
If you encounter any issues while integrating CloudTrail with CloudWatch logs, follow the troubleshooting steps below:
Verify IAM Permissions:
cloudtrail:CreateTrail
and logs:CreateLogGroup
permissions at a minimum.Check CloudTrail Configuration:
Verify CloudWatch Log Group:
Check Trust Relationships:
logs.amazonaws.com
service.Review CloudTrail and CloudWatch Logs Configuration:
Check S3 Bucket Permissions:
Examine CloudTrail and CloudWatch Logs Integrations:
Review CloudWatch Logs Retention Policy:
Necessary Codes:
No specific code is required for this rule. Integrating CloudTrail with CloudWatch logs can be accomplished using the AWS Management Console or AWS CLI.
Step-by-Step Guide for Remediation:
Follow the steps below to integrate CloudTrail trails with CloudWatch logs:
Open the AWS Management Console and navigate to the CloudTrail service.
In the left navigation pane, click on "Trails."
Select the existing trail you want to integrate with CloudWatch logs or click "Create trail" to configure a new trail.
On the Trail Details page, ensure that the trail is configured with the appropriate settings, including the S3 bucket for log storage and the desired event types to be recorded.
Under "CloudWatch Logs," select "Yes" to enable CloudWatch Logs integration.
If you have an existing log group, choose it from the drop-down list. Otherwise, click "Create a new log group" and provide a name for the log group.
Optionally, you can customize the log stream name using keywords or variables to organize the logs effectively.
Configure the log delivery settings as desired, including CloudWatch encryption, log file validation, and log record format.
Review the trail configuration and click "Create" or "Update trail" to save the changes.
Once the integration is complete, CloudTrail logs will start flowing into the specified CloudWatch log group, where you can search, analyze, and configure alarms based on the log data.
Remember to regularly monitor the CloudWatch logs to ensure proper logging and investigate any potential security incidents or compliance issues.
Conclusion:
Integrating CloudTrail trails with CloudWatch logs according to the FedRAMP Moderate Revision 4 standard ensures that AWS API activity is continuously monitored and centrally logged for improved security and compliance. By following the troubleshooting steps and the step-by-step guide provided, you can successfully achieve this integration and meet the regulatory requirements.