Run custom commands (install Apache) on EC2 instances with AWS Systems Manager and Resource Groups
• Updated: July 6, 2021
• By László Bodor

If you need to run custom scripts/commands on EC2 instances and you want to do this without logging in with SSH you can do that by using AWS Systems Manager. Adding also Resource Groups to the mix you can execute the commands on a high number of instances simultaneously without having to do this instance by instance.
For the YAML document used in Systems Manager documents go to Github here: https://github.com/majestic-cloud/systems-manager-scripts/blob/main/install-apache.yaml
See the full demo here:
Tags
aws command EC2 install apache resource groups run script systems manager