Systems Manager Fleet Manager

Fleet Manager, a capability of AWS Systems Manager, is a unified user interface (UI) experience that helps you remotely manage your server fleet running on AWS, or on premises. With Fleet Manager, you can view the health and performance status of your entire server fleet from one console. You can also gather data from individual instances to perform common troubleshooting and management tasks from the console. This includes viewing folder and file contents, Windows registry management, operating system user management, and more.

Systems Manager has some basic pre-requisites to follow before you can manage EC2 instances. In this lab environment we’ve setup all of the pre-requisites for you except one related to your instance profile. In the steps below you will modify your IAM instance profile and attach it to an EC2 Instance. Once done, you will be able to use Systems Manager to manage your EC2 instance.

  1. Update EC2 Instance Roles

    • In your AWS Console, navigate to IAM.
    • From the left menu, select Roles and search for the role with SampleApp in its name. Click the role to bring up the details.
    • In the Permissions tab, click Add permission then Attach Policies.
    • Search for the policy “AmazonSSMManagedInstanceCore”, click the box next to the policy and then the button Attach Policy
  2. Attach IAM role to instances

    • Navigate to EC2 Instances.
    • Filter and select one of the instances named “Lab App host”
    • From the Actions menu, select Security and then Modify IAM Role
    • Select the same SampleApp role which you modified in the previous step, click Save
    • Repeat the steps for the other “Lab App host” EC2 instance
  3. Update Launch Template

    We’ve updated the IAM role on the running EC2 instances. But now we must update the launch template which was used to create these instances, this way if another EC2 is launched via the autosclaing group, it will have the proper role attached

    • Navigate to EC2 Launch Templates.
    • Click the template with LabLaunchTemplate as the name
    • Click Actions and then Modify Template (Create new version)
    • Enter an appropriate description, such as Updating Instance Role
    • Scroll to the bottom and expand the Advanced Details section.
    • In the IAM instance profile field, select the IAM role you previously modified. Leave all values unchanged and click Create Template Version
    • On the next screen, click the Actions menu and select Set default version
    • From the dropdown, select the latest version and click Set as default version
  4. Locate instances in Fleet Manager

    Due to the SSM agents exponential backoff logic, it may take 10 minutes for instances to appear in Fleet Manager. You can reboot the EC2 instances to speed up the process.

    • Navigate to the Fleet Manager section of Systems Manager, and you should see the 2 EC2 Instances in the Managed Instances list FleetManager

    Fleet Manager is a powerful tool which provides rich instance information and enables Operating System level actions without the need to logon to instances. Click on the “node actions” button to see what functionality exists.