AWS Certified CloudOps Engineer – Associate
Why an EC2 instance is not a Systems Manager managed node
The Systems Manager User Guide lists three requirements for a managed node. SSM Agent must be installed and running. The instance needs IAM permissions, normally an instance profile with AmazonSSMManagedInstanceCore. And the agent must reach the Systems Manager endpoints over HTTPS on port 443, through outbound internet access or interface VPC endpoints.
What are the three requirements?
First, SSM Agent has to be installed and running on a supported operating system. Some AWS managed AMIs launch with the agent preinstalled; on others you install it.
Second, an EC2 instance needs an IAM instance profile that lets it talk to the Systems Manager service. AWS checks for the managed policy AmazonSSMManagedInstanceCore, or a custom policy with the same permissions. On-premises servers and other non-EC2 machines use an IAM service role instead.
Third, the agent must connect to a Systems Manager endpoint to register. SSM Agent starts every connection itself, so no inbound rule to the instance is needed for Systems Manager.
Also confirm you are in the same Region as the instance. To test registration, run aws ssm describe-instance-associations-status for the instance; it returns results only after the agent has registered.
What network path does the agent need?
With outbound internet access, the instance must be able to send HTTPS on port 443 to ssm.region.amazonaws.com, ssmmessages.region.amazonaws.com and ec2messages.region.amazonaws.com.
Without it, create interface VPC endpoints: com.amazonaws.region.ssm, com.amazonaws.region.ssmmessages and com.amazonaws.region.ec2messages. Systems Manager also uses com.amazonaws.region.s3 to update SSM Agent. With AWS PrivateLink you do not need an internet gateway or a NAT device.
The security group attached to the VPC endpoint must allow incoming connections on port 443 from the instance's private subnet. If it does not, the instance cannot reach the endpoints. With a custom DNS server, forward queries for amazonaws.com to the Amazon DNS server for the VPC.
What is Default Host Management Configuration?
It lets Systems Manager manage EC2 instances without an instance profile on each one. It applies a default IAM role for all instances in the account and Region where it is turned on. It must be turned on Region by Region, and instances can take up to 30 minutes to start using the role.
It has prerequisites. The instance must use Instance Metadata Service Version 2 (IMDSv2); Version 1 is not supported. SSM Agent must be version 3.2.582.0 or later.
SSM Agent tries instance profile permissions first. If an attached instance profile allows ssm:UpdateInstanceInformation, the instance does not use the Default Host Management Configuration permissions, so remove that permission from the profile.
Where the exam catches people
- Opening inbound ports on the instance for Systems Manager: SSM Agent initiates all connections, so only outbound HTTPS matters.
- Creating the interface endpoints but leaving their security group closed: it must allow inbound 443 from the instance's subnet.
- Expecting Default Host Management Configuration to work with IMDSv1: it supports IMDSv2 only.
- Assuming every AMI has SSM Agent: only some AWS managed AMIs come with it preinstalled.
- Turning on Default Host Management Configuration once for the account: it is activated separately in each Region.