I recently created an ec2 server using some user-data to install various modules. This was a standalone instance without an associated IAM role and with a bog standard security group (allow port 80), everything about this instance worked fine.
Using exactly the same instance type and user-data I created another instance that used an existing security group associated with a load balancer (though the instance wasn't added to the load balancer) and with an associated IAM role and for the life of me I could not get the httpd service to start on it. Is this expected behaviour? I can't see anything different in how these instances were configured other than the security group and the IAM role. Would it be a case that because the 2nd instance wasn't behind the LB but it had the LBs security group that Apache refused to run, and that if I added it to the LB it would then start working?
0 Answers