To manage EC2 instances with AWS Systems Manager (SSM), the EC2 instance must be configured as a managed instance by attaching an IAM role that has the AmazonSSMManagedInstanceCore managed policy.
This policy allows:
SSM agent to register the instance with SSM
Perform actions like patching, automation, session management, inventory collection, etc.
Access to SSM endpoints (via internet or VPC endpoint if needed)
Since the EC2 instance already has an IAM role, the least operational overhead option is to attach the required policy to the existing role (Option C). No need to create new IAM roles or users, which simplifies management and adheres to the principle of least privilege.
Patching can then be automated via SSM Patch Manager, ensuring consistency, compliance, and operational efficiency.
???? References:
SSM Managed Instance Setup
AmazonSSMManagedInstanceCore Policy
Patching EC2 with SSM
Submit