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: 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 http://repo.us-west-1.amazonaws.com/latest/main/mirror.list error was
user-data: 12: Timeout on http://repo.us-west-1.amazonaws.com/latest/main/mirror
Amazon Linux AMI release 2018.03
Kernel 4.14.171-105.231.amzn1.x86_64 on an x86_64
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 0.0.0.0/0 going to the IGW or NAT.