amazon-ec2-auto-scaling-group-examples
amazon-ec2-auto-scaling-group-examples copied to clipboard
Can you provide the userdata scripts more easily?
Hi, This is a great project and post that goes with it. However I find it cumbersome (and confusing) to have to launch a cloud9 environment, run configure.sh, then wait a few minutes, just to be able to see the Userdata scripts.
It would be great if you could provide those scripts directly here.
Hello! The user data scripts are accessible directly from the CloudFormation templates for each example that has them. Take a look at the link below and let me know if this is what you’re after. Otherwise, I can definitely look into making those easier to find. https://github.com/aws-samples/amazon-ec2-auto-scaling-group-examples/blob/main/features/lifecycle-hooks/userdata-managed-linux/template.yaml
Hi Scott, thanks for the quick reply! Yes, I did eventually find the CloudFormation templates, and deciphered them. But I still think it is worth making simpler to find.
BTW when I tried using the complete-lifecycle-action CLI in my userdata I came across a bug (as confirmed by support) that if you make the call to soon (like when the instance moves from the warm pool to the ASG) it fails and reports "No active Lifecycle Action found". Thus I needed to put the complete-lifecycle-action in a retry loop in order for it to work.