I have configured an auto scaling group using launch configuration with userdata script to install nodejs while launching the instance. And codedeploy application is configured for the auto scaling group to deploy an app from s3 bucket.
when a new instance is launched by the autoscaling group codedeploy and userdata seems to be run in parallel and deployment is failing as nodejs is not available.
is there a way to make sure that codedeploy is run only after userdata is completed?
can we configure multiple lifecycle hooks? i have seen a lifecycle hook is created for codedeploy. can we modify this to run only after userdata is completed?