AwsSystemsManager - MariMendM/devops-sandbox GitHub Wiki

AWS Systems Manager

Page of tips and how-tos for AWS SSM.


Check Managed Instances in fleet

In AWS Systems Manager console, navigate menu 'Node Management / Fleet Manager'. All Managed EC2 Instances in the fleet are displayed. If instances are missing here, they possibly do not have correct IAM Role (AmazonEC2RoleforSSM) assigned and/or do not have SSM-agent installed.

Run a command

  1. In AWS Systems Manager console, navigate menu 'Node Management / Run Command';
  2. In 'Command document', choose one of the available commands:
    • Example: AWS-RunAnsiblePlaybook;
    • To search by commands, input text and hit ENTER;
  3. In 'Command parameters', define values for parameters:
    • Example: paste Ansible's playbook into 'playbook' or paste URL where playbook is located into 'playbook url';
    • Each command document has its own parameters;
  4. In 'Targets', provide ways to Systems Manager identify managed instances in which command shall be executed:
    • If using tags, provide the key/value of each tag desired; do not forget the button 'add' for each pair! /images/aws-systems-manager/runcommand-tags.png
    • If choosing instances manually, select them from the fleet (only managed instances will be provided for selection);
    • If using resource groups, the previous creation of a group inside AWS Resource Groups is mandatory;
  5. In 'Rate control', define values for concurrency and error threshold according needs:
    • Consider the number of managed instances targeted by the command;
  6. In 'Output options' is recommended to choose at least one of the methods to provide log information in case anything goes wrong;
  7. In 'SNS notifications', provide SNS configuration in case messages are desired;
  8. Finally, 'AWS cli command' provides the command assembled by choosing above options; it can be used alternatively to the console.

All the execution history can be found in 'Command history'. Commands of the history can be rerun or copied into new command, but not edited.