I am trying to set up an auto-scaling group in conjunction with CodeDeploy. Everything works fine, except for the fact that when creating a new instance, CodeDeploy is launched before the user script data (defined in the launch configuration) is completed.
The default value for this user data script downloads and installs the code deployment agent, and I expanded it by installing several Windows functions, the IIS rewriter, and msdeploy.
In my appspec.yml, I use the AfterInstall hook to deploy my IIS website, and this obviously fails when msdeploy is not installed (yet).
How am I mistaken about this, or is there a way to get CodeDeploy to wait for the completion of the user data script?
source
share