Codedeploy hook custom timeout when using lambda function

0

Hello, currently the timeout for codedeploy deployment hooks are set at 60 minutes. Is there a way to specify a custom timeout for a lifecycle hook?

This would be helpful as the lambda function it is using can have some error that causes it to time out and in turn not update the lifecycle hook event status in due time.

Nahom
asked 10 days ago87 views
1 Answer
0

Hello!

To begin with, As of the current AWS CodeDeploy functionality, you can indeed specify a custom timeout for a lifecycle hook using the ‘timeout’ parameter in the AppSpec ‘hooks’ section you can refer to this documentation.

You can read more about, "How do I resolve the error that I receive in AWS CodeDeploy when my deployment times out while waiting for a status callback?" in this documentation

However, the default timeout for hooks is 3600 seconds (1 hour), this is the number of seconds to allow the script to execute before it is considered to have failed. 3600 seconds (1 hour) is the maximum amount of time allowed for script execution for each deployment lifecycle event. This means that if you wish to limit your deployment lifecycle event to 15 minutes the value for total timeout should be 900 seconds. You may then decide on how long each script will take, i.e if you have 3 scripts then it can be 900/3 = 300 meaning you will allow each to run for 300 seconds ( 5 min) then after if it timeouts will be considered as failed, you can ensure that CodeDeploy waits long enough for your Lambda function to complete, even if it encounters issues or takes longer than expected to execute.

In case you have additional or follow-up queries regarding AWS CodeDeploy or Lambda, we may require details that are non-public information. Please open a support case with AWS using the following link.

AWS
answered 9 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions