This rule ensures that EC2 instance detailed monitoring is enabled for optimal performance and security.
Rule | EC2 instance detailed monitoring should be enabled |
Framework | SOC 2 |
Severity | ✔ Medium |
EC2 Instance Detailed Monitoring for SOC 2
Rule Description
Enabling detailed monitoring for EC2 instances is necessary for SOC 2 compliance. Detailed monitoring provides more granular metrics and enables better monitoring and analysis of resource utilization, helping to meet the requirements of SOC 2 reporting.
Troubleshooting Steps
If the detailed monitoring is not enabled or not functioning properly, follow the steps below to troubleshoot the issue:
Verify IAM Permissions: Ensure that the IAM user or role has the necessary permissions to enable detailed monitoring for EC2 instances. The user or role should have the ec2:MonitorInstances permission.
Check Instance Configuration: Validate that the instance you are trying to enable detailed monitoring for is in the running state. If the instance is not running, start it and wait for it to become available.
Check Monitoring State: Confirm the current monitoring state of the instance. The monitoring state should be set to "disabled" if not already enabled. You can check this information either through the Amazon EC2 console or by using the AWS Command Line Interface (CLI).
Verify CloudWatch Agent Status: If the monitoring state is already set to "enabled" but detailed monitoring data is not visible, ensure that the CloudWatch agent is running on the instance. Check the agent's status and restart it if required. Additionally, make sure the agent's configuration is properly set up.
Necessary Codes
No specific code is required for enabling detailed monitoring for EC2 instances as it can be done using AWS Management Console or AWS CLI.
Step-by-step Guide for Remediation
Enabling Detailed Monitoring via AWS Management Console:
Enabling Detailed Monitoring via AWS CLI:
aws ec2 monitor-instances --instance-ids <instance-id>
Replace
<instance-id>
with the actual ID of the EC2 instance you want to enable detailed monitoring for.Additional Recommendations
Note: Enabling detailed monitoring for EC2 instances may result in additional charges for the usage of CloudWatch metrics. Make sure to review the AWS documentation for pricing details and cost optimization strategies.