Antonio Cloud, Antonio Feijao UK

Sample of an AWS EC2 userdata script that install apache and automatically creates an index.html file as a landing webpage with information about the instance - instanceId, availabilityZone, instanceType and region. This could also be used with launch configuration on an Auto Scaling Group (ASG) to use as multiple instance on Elastic Load Balancing load balancer (ALB) to easy show the usage of multiple instances behind the load balancer.

Other samples on AWS

If you tried it and helped you understand better how it works, please leave a comment.

Happy learnings,