Recent functionality added to AWS CodeDeploy causes it to add a lifecycle hook to an Auto-scaling group whenever that Auto-scaling group has been targeted by a new deployment group. The lifecycle hook causes a deployment to be triggered whenever a new instance is spun up by the ASG. I don't want this lifecycle hook to be created, but there doesn't seem to be any way that I can see to prevent it from being created automatically. I can always go in and delete the lifecycle hook after the fact, but it would be great if I could just prevent it from being created in the first place. How can I preempt the lifecycle hook?
Since you are not interested in the ASG lifecycle events, change your codedeploy's deployment group configuration just EC2 instance tags to which you want to deploy instead of specifying an ASG.
This should solve your problem, but not recommended.