Home › Forums › AWS › AWS Certified DevOps Engineer Professional › Concern Regarding Inclusion Of ‘Long Running’ In A Question › Reply To: Concern Regarding Inclusion Of ‘Long Running’ In A Question
-
Hi DamoJ,
The correct answer comes down to a few key phrases in the scenario and how they connect. The statement that says “AppSpec file was modified to use custom, non-default settings” is the most important clue. In AWS CodeDeploy, this means the default 3600-second timeout may no longer apply, and a much shorter timeout could have been configured for the lifecycle hook.
Next, the detail that the deployment script takes about 1 to 2 minutes becomes relevant in that context. On its own, that runtime is not long, but if a custom timeout (for example, 60 seconds) were set, then the script would exceed it. This is what the question loosely refers to as a “long-running script”, not long in absolute terms, but longer than the allowed execution time.
The final clue is that CodeDeploy reports a failure while the logs show the script completed successfully. This mismatch is characteristic of a timeout issue: CodeDeploy marks the deployment as failed as soon as the timeout is reached, even if the script continues running and eventually finishes in the background.
Because of these combined clues: custom AppSpec settings, script duration exceeding a possible timeout, and the discrepancy between logs and deployment status, the most logical explanation is that CodeDeploy timed out while waiting for the script to finish. That’s why the option that says “CodeDeploy has reached timeout while waiting for the long-running script to finish” is the correct answer.
Best regards,
Nikee @ Tutorials Dojo