Default Host Management Configuration and custom instance profile

0

Hi everyone,

I have a few EC2 instances that have NO instance profile assigned. Since I have Default Host Management Configuration (DHMC) enabled, those instances are now using the DHMC default instance profile.

My question is: If DHMC is already enabled and I later assign a custom instance profile to an instance, will the instance have permissions from both the DHMC default profile and the newly attached custom profile? Or does the custom profile completely override the DHMC default?

Thanks in advance.

1 Answer
1

When you have Default Host Management Configuration (DHMC) enabled and later assign a custom instance profile to an EC2 instance, the custom instance profile will override the DHMC default profile for that specific instance. The instance will not have permissions from both profiles simultaneously.

The DHMC creates and applies a default IAM role to manage EC2 instances in your AWS account and region. However, when you attach a custom instance profile to an instance, you're essentially providing a new set of permissions specific to that instance. This custom profile takes precedence over the DHMC default profile.

It's important to note that if you want the instance to retain the capabilities provided by the DHMC, you should ensure that your custom instance profile includes the necessary permissions. You may want to review the permissions in the AmazonSSMManagedEC2InstanceDefaultPolicy (the policy used by DHMC) and incorporate any required permissions into your custom profile.

Remember that any changes made to the IAM role you choose for an instance apply only to that specific instance, not to all managed EC2 instances in the region and account. If you need to maintain certain DHMC functionalities while using a custom profile, you'll need to explicitly include those permissions in your custom IAM role.

In summary, the custom instance profile will completely override the DHMC default profile for the instance to which it's attached, rather than combining permissions from both profiles.

Sources
Managing EC2 instances automatically with Default Host Management Configuration - AWS Systems Manager
Configure instance permissions required for Systems Manager - AWS Systems Manager

profile picture
answered 23 days ago
profile pictureAWS
EXPERT
reviewed 21 days ago
profile picture
EXPERT
reviewed 23 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions