More Info:

Ensure that all Amazon EC2 instances are managed by AWS Systems Manager (SSM). Systems Manager simplifies AWS cloud resource management, shortens the time to detect and resolve operational problems, and makes it easy to operate and manage your instances securely at scale. For Amazon EC2 instances to be monitored and managed with AWS Systems Manager service, they must be configured as managed instances. In order for EC2 instances to be managed by Systems Manager and be available in the list of managed instances, your instances have to meet 3 primary requirements:

Risk Level

High

Address

Security

Compliance Standards

CBP

Triage and Remediation

Remediation

To remediate the misconfiguration “EC2 Instances Should Be Managed By SSM” in AWS using the AWS console, follow the below steps:

  1. Open the AWS Management Console and navigate to the EC2 dashboard.
  2. Select the EC2 instance that needs to be managed by SSM.
  3. Click on the “Actions” button and select “Instance Settings” and then click on “Attach/Replace IAM Role”.
  4. In the “Attach/Replace IAM Role” window, select the option “SSMManagedInstanceCore” in the “IAM Role” drop-down menu.
  5. Click on “Apply” to attach the IAM role to the EC2 instance.
  6. Once the IAM role is attached, navigate to the SSM dashboard.
  7. Select “Managed Instances” from the left-hand menu.
  8. Verify that the EC2 instance is listed as a managed instance. If it is not listed, select “Register instances” to add the EC2 instance to SSM.
  9. After registering the instance, select the instance and click on “Actions” and then select “Run Command”.
  10. In the “Run a Command” window, select the “AWS-ConfigureAWSPackage” document.
  11. In the “Command Parameters” section, select the “Install” option for the “action” parameter.
  12. Click on “Run” to install the SSM agent on the EC2 instance.
  13. Once the SSM agent is installed, the EC2 instance will be managed by SSM.

By following the above steps, the misconfiguration “EC2 Instances Should Be Managed By SSM” can be remediated for AWS using the AWS console.

Additional Reading: