Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Code Deploy disable block traffic and allow traffic

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.

like image 670
gary69 Avatar asked Oct 22 '25 04:10

gary69


2 Answers

It can be set from the Edit Deployment Group page.

enter image description here

like image 185
gary69 Avatar answered Oct 24 '25 17:10

gary69


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.

like image 27
Marcin Avatar answered Oct 24 '25 16:10

Marcin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!