I've just created a new Launch Configuration to use with an Auto Scaling group. When a new EC2 instance is launched, I would like the script to be executed.
In details:
- I have a script
deploy.shthat updates my application code using git... - When a new instance is launched by Auto Scaling, it should execute the script that I've provided via User Data in the Launch Configuration (attached on autoscaling group).
My user data is:
#!/bin/bash
/home/ec2-user/deploy.sh
This doesn't work.