AWS Certified Solutions Architect - Professional 2020

Sign Up Free or Log In to participate!

Cannot stress the CPU

I was unable to stress the CPU following the instructions in the auto-scale lab. The instance starts but the CPU never spikes according to the CloudWatch monitoring. Double-checked launch config, auto-scaling group settings, everything seems to be in order. I tried it in both us-west-1 and us-east-1, I also tried creating an instance, sshing into it and running the user data script manually. Other than having to sprinkle some sudos stress tool worked fine. Not sure what to try next. Any ideas?

p.s. Using the updated user data script from the github repo.

Added some logging to see what’s going on when executing the userdata script following the instructions at

Seems to be a timeout issue.

Cloud-init v. 0.7.6 finished at Mon, 20 Apr 2020 13:30:34 +0000. Datasource DataSourceEc2. Up 42.94 seconds

user-data: so will have to try and fail each time (and thus. yum will be be much

user-data: slower). If it is a very temporary problem though, this is often a nice

user-data: compromise:


user-data: yum-config-manager –save –setopt=.skip_if_unavailable=true


user-data: Cannot find a valid baseurl for repo: amzn-main/latest

user-data: Could not retrieve mirrorlist error was

user-data: 12: Timeout on

Amazon Linux AMI release 2018.03

Kernel 4.14.171-105.231.amzn1.x86_64 on an x86_64

Alper Sunar

Could not find any outbound traffic limitations with the security groups, nacls etc. Assigning the public IP addresses when creating the launch configuration worked. Still trying to figure out why user data script does not work if I pick Do not assign a public IP address to any instances.

1 Answers

You might not have created a default route and internet gateway from your VPC to the internet.  From the messages, it looks like the machine could not reach the public internet.  Private IP can’t reach out to the internet by themselves.  You need to have a NAT or IGW plus a default route…normally going to the IGW or NAT.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?