Can I configure the timeout duration for an AWS CodeDeploy Deployment task in bamboo?
Asked by steffi_l:

Part of my deployment is a script that can easily run for more than 20 minutes. Bamboo then marks the deployment as failed with "Failed to get CodeDeploy result after 60 attempts.". The actual deployment finishes fine though. Can I somewhere set this up to do more attempts or do them less often, so that my deployment will be marked as successful?


Answers:
author: Steffen Opel _Utoolity_
body: This timeout does not seem to be configurable at this time: Due to Atlassian's [AWS CodeDeploy task](https://confluence.atlassian.com/bamboocloud/using-the-aws-codedeploy-task-740264035.html) being easy to confuse with the various [AWS CodeDeploy tasks](https://utoolity.atlassian.net/wiki/display/TAWS/Deploying+to+AWS+CodeDeploy) offered by Utoolity's [Tasks for AWS](https://marketplace.atlassian.com/plugins/net.utoolity.atlassian.bamboo.tasks-for-aws/server/overview) add-on for Bamboo Server (notably the [AWS CodeDeploy Deployment task](https://utoolity.atlassian.net/wiki/display/TAWS/Using+the+AWS+CodeDeploy+Deployment+task+in+Bamboo)), a user recently asked the similar question [How to increase the number of attempts during AWS CodeDeploy deployment?](https://utoolity.atlassian.net/wiki/display/TAWS/questions/68911113/how-to-increase-the-number-of-attempts-during-aws-codedeploy-deployment) - my colleague @Henrik Opel \[Utoolity\] has [analyzed/summarized](https://utoolity.atlassian.net/wiki/display/TAWS/questions/68911113/answers/68911121) the apparent behavior of Atlassian's CodeDeploy task as follows:
> The 60 attempts limit suggests that you are using Bamboo's built in ["AWS CodeDeploy"](https://confluence.atlassian.com/bamboocloud/using-the-aws-codedeploy-task-740264035.html) task and not the["AWS CodeDeploy Deployment"](https://utoolity.atlassian.net/wiki/display/TAWS/Using+the+AWS+CodeDeploy+Deployment+task+in+Bamboo) task from our (Utoolity's) Tasks for AWS add-on. Checking the source code of the former reveals that both the 15 seconds wait interval and the 60 attempts limit are fixed constants with no apparent override option.
>
> \[...\]

Accordingly, you would need to request a resp. improvement for the Atlassian CodeDeploy task via the public [Bamboo issue tracker](https://jira.atlassian.com/projects/BAM) might want to watch and vote for the following issue to raise Atlassian's priority regarding this notable limitation of the built-in Bamboo CodeDeploy task:

* <https://jira.atlassian.com/browse/BAM-17630>

Workaround via Tasks for AWS {#toc-hId--1328547408}
---------------------------------------------------

Given the recently announced [end-of-life for Bamboo Cloud](https://confluence.atlassian.com/bamboocloud/bamboo-cloud-eol-827125716.html), you could also expedite the required migration to Bamboo Server in order to work around this limitation by using Utoolity's [AWS CodeDeploy Deployment](https://utoolity.atlassian.net/wiki/display/TAWS/Using+the+AWS+CodeDeploy+Deployment+task+in+Bamboo) task instead (part of [Tasks for AWS](https://marketplace.atlassian.com/plugins/net.utoolity.atlassian.bamboo.tasks-for-aws/server/overview)), which also polls the status in 15 second intervals, *but will indeed wait until the deployment succeeds*(or explicitly fails with an error).

Please be aware though that Utoolity's task composition is a bit different from the Bamboo built in one, refer to [How do the Tasks for AWS CodeDeploy tasks differ from the built-in Bamboo CodeDeploy task?](https://utoolity.atlassian.net/wiki/display/TAWS/questions/64979046/how-do-the-tasks-for-aws-codedeploy-tasks-differ-from-the-built-in-bamboo-codedeploy-task) for details.


Tags: aws-code

cloud