I have created an AMI from an Instance with the user data
#!/bin/bash
yum update -y
yum install httpd -y
systemctl enable httpd
systemctl start httpd
which starts the Apache server, within I have a index page where Instance details are stored so when I visit the webpage via the Instance IP address it will display this info which it has done so I created an AMI
from that Instance and then created a Launch Configuration
, Load Balancer
and ASG
with it attached along with my VPC and public subnets
.
I am working towards where it will be a managed Load balancing auto scaling web app that launches Instances based on my Metric which it does but the problem is the 'User Data' is not displaying when new instances are launched and it does not let me connect via the IP Address.
I also have a CPU script that will run my CPU Utilization on my Instance at 100% so it will trigger my metric of if it goes above 60% it will launch new instances every minute or so and i'm also wondering how would I see the load distributed between these Instances to make sure it is distributing equally to all separate Availability Zones? Would there be a log?