Automate Command Execution for Multiple Amazon EC2 Instances
In this lab, you’ll practice automating repeatable processes using Systems Manager (SSM). When you’re finished with this lab, you’ll have three EC2 instances configured to use SSM, and an EventBridge Rule that schedules a RunCommand job.
Terms and conditions apply.
Create an IAM Role for Your EC2 Instances
By default, EC2 instances have no permission to connect to Systems Manager. In this challenge, you will be creating an IAM Role that allows Systems Manager access and is to be used by an EC2 Instance Profile.
Launch EC2 Instances Configured for SSM
Now that you have created an IAM role, you next need to test this out by launching some EC2 instances. In this challenge, you will launch three EC2 instances that will use the IAM role that you created in the first challenge.
Run an SSM Run Command Document Manually
Your EC2 instances should now be accessible by SSM. To test the configuration of your EC2 instances, you’ll first try to run an SSM Document manually.
Schedule an SSM Run Command Document
Now that you are sure all the instances are configured with the correct rule, you will need to ensure that all of them are up to date. In this challenge, you will configure a scheduled rule using EventBridge to trigger SSM to run a command document.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.
- Amazon EC2
- Amazon Systems Manager
- Amazon EventBridge (formerly CloudWatch Events)
- Have used the AWS console before