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
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-linux-log-user-data/
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:
user-data: yum-config-manager –save –setopt=.skip_if_unavailable=true
user-data:
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
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.