AWS Systems Manager provides you safe, secure remote management of your instances at scale without logging into your servers, replacing the need for bastion hosts, SSH, or remote PowerShell. It provides a simple way of automating common administrative tasks across groups of instances such as registry edits, user management, and software and patch installations. Through integration with AWS Identity and Access Management (IAM), you can apply granular permissions to control the actions users can perform on instances. All actions taken with Systems Manager are recorded by AWS CloudTrail, allowing you to audit changes throughout your environment.
You will now emulate CPU stress on the instances in your automatic scaling group by issuing a remote command to each instance.
Review ssm-stress.json to understand the options. There are no changes to be made. Then go ahead and send the command:
aws ssm send-command --cli-input-json file://ssm-stress.json
Browse to the AWS Systems Manager console to monitor the status of your run commands.
Browse to the CloudWatch console to monitor the status of your alarms configured by the target tracking policy.
Browse to the Auto Scaling console and watch the activity history. Notice that in a few minutes, it will begin to scale up the instances according to the CloudWatch alarms the target tracking policy has configured for you (check the Activity History tab and the Instances tab).
If your account is new, or if you are using an account that was created for you within an AWS-led event, then your EC2 Auto Scaling group might be unable to scale out to the desired instance count due to hitting EC2 Spot instance count limits. The functionality of this step in the workshop still works despite launching a smaller number of instances, so you can simply ignore these errors.