Find answers, ask questions, and connect with our
community around the world.

Home Forums AWS AWS Certified DevOps Engineer Professional Concern Regarding Inclusion Of ‘Long Running’ In A Question

  • Concern Regarding Inclusion Of ‘Long Running’ In A Question

  • DamoJ

    Member
    April 17, 2026 at 6:33 pm

    Re the question:

    You are using a cluster of Amazon Linux EC2 instances to host an online forum. AWS CodeDeploy is used for deploying the new version of the application. The AppSpec file has been modified to use custom, non-default settings to fit your application deployment needs. You configured a deployment script during the lifecycle event to download the application code and install a few packages needed for operation. This deployment script completes in about 1 to 2 minutes. During deployment, CodeDeploy reports that the deployment has failed but upon checking the generated logs, the deployment script has successfully finished.

    Which of the following could be the possible cause of the failed deployment?

    The correct answer talks about ‘waiting for the long-running script to finish’. The inclusion of ‘long-running’ was my reason to doubt this answer, but it turned out to be correct. The answer confirmed what I suspected – that the default timeout value is 3600 seconds (1 hour). So a 1 to 2 minute script could not be considered ‘long running’ and I’m unsure why this term was included in the answer.

  • Nikee-TutorialsDojo

    Administrator
    April 21, 2026 at 9:09 am

    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

Viewing 1 - 2 of 2 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
Skip to content