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.
* Our Labs are Available for Enterprise and Professional plans only. Terms and conditions apply.
Miguel Saavedra is an author, solutions architect, and Instructor specializing in AWS, big data, automation, and security. He has worked in several companies in the finance/fintech, education, and medical industries as well as some government projects. He has published and conducted research on both cloud and on-premise solutions for big data focusing on network analytics, and machine learning. He also designs highly available and automated CICD toolchains for high throughput microservices on AW... moreS.
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.