Does anyone know if there is a way to disable the BlockTraffic and AllowTraffic steps in AWS CodeDeploy? These steps are not in my appspec but they run anyway and take a very long time.
It can be set from the Edit Deployment Group page.

BlockTraffic: During this deployment lifecycle event, internet traffic is blocked from accessing instances that are currently serving traffic. This event is reserved for the CodeDeploy agent and cannot be used to run scripts.
AllowTraffic: During this deployment lifecycle event, internet traffic is allowed to access instances after a deployment. This event is reserved for the CodeDeploy agent and cannot be used to run scripts. **
As exaplaiend in this thread the event hooks can't be disabled. The reason for their long execution time is that they CodeDeploy uses health check of your balancer. Thus you need to adjust the health checks setting if you want these processes to be faster.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With