While preparing for my AWS DevOps Engineer Professional exam I had to understand and memorize the CodeDeploy LifeCycle hooks. As usual, AWS provides decent documentation. Here is an example about how the Run order of hooks is documented. However, I could not find a table with all three cased combined. So I created one and it did help me a lot during the study. And also, I had a question in the exam about the "AfterAllowTestTraffic" hook.
Table 1: Run order of hooks for Lambda, ECS and EC2 Blue-Green deployments
Note 1: The greyed out hooks in the table are reserved for CodeDeploy operations. They cannot be used to run scripts.
Note 2: Hooks on EC2 can be used to run scripts on instances, while hooks for Lambda and ECS can be used only to run Lambda functions.
Table 2: Run order of hooks for EC2 In-Place deployments without ELB and with ELB and EC2 Blue-Green deployments
Happy coding CodeDeploy lifecycle hooks!
Top comments (0)