- Newest
- Most votes
- Most comments
The issue you're experiencing with the GuardDuty Runtime Monitoring SSM association failing appears to be related to sudo permissions on your CIS/STIG-hardened EC2 instances.
Based on the error messages, the GuardDuty security agent installation is failing because the sudo command is encountering expired password issues. This is likely due to the hardening configurations on your EC2 instances that have modified the default sudo behavior.
To troubleshoot and resolve this issue:
- Check the SSM association execution history:
- Open the AWS Systems Manager console
- Navigate to Node management > State Manager
- Filter by Document Name "AmazonGuardDuty-ConfigureRuntimeMonitoringSsmPlugin"
- Select the association ID and view its execution history
- Review the failures to identify the root cause
- Address the sudo configuration issues on your hardened instances:
- The error indicates password expiration and authentication token issues
- You may need to modify the sudo configuration to allow the SSM agent to execute commands without requiring password authentication
- Consider adding NOPASSWD exceptions for the specific commands needed by the GuardDuty agent installation
- If the issue persists, you might need to:
- Temporarily disable and then re-enable Runtime Monitoring to recreate the SSM association
- Consider manually installing the GuardDuty security agent if automated deployment continues to fail
- Verify that your instances meet the architectural requirements and prerequisites for GuardDuty Runtime Monitoring
The GuardDuty Runtime Monitoring feature requires the security agent to be properly installed on your EC2 instances to monitor runtime behavior, including process executions, file system changes, and network connections. Without a successful agent installation, GuardDuty cannot receive the runtime events needed to detect threats at the operating system level.
Sources
Runtime coverage and troubleshooting for Amazon EC2 instance - Amazon GuardDuty
Navigating Amazon GuardDuty protection plans and Extended Threat Detection | AWS Security Blog
Managing security agent manually for Amazon EC2 resource - Amazon GuardDuty
Enabling GuardDuty agent for Amazon EC2 resources in multiple-account environment - Amazon GuardDuty
Relevant content
asked 5 years ago
asked 5 years ago
