Bamboo Elastic Agents EC2 Spot instances terminating frequently
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Bamboo allows customers to use Spot instances to save resources and money.
Spot instances may be terminated by AWS at any time. There are several factors that are considered for that purpose. This article explains what happens and the available options.
Diagnosis
Bamboo Elastic Agents are being terminated by AWS without prior warning, in most cases during builds.
Cause
Check what criteria is used by AWS to terminate Spot instances:
Bamboo defines the Spot instance bids based on a combination of Instance Type x Product. Only bid instances will be considered as Spot.
Solution
You can define a specific bid for a combination of Instance Type x Product and configure an Elastic Image in Bamboo that would match that bid. Then, you can either dedicate that Image or Configure a Job requirement by using pre-defined Capabilities to link it to your low-priority Build and Deployment plans.
That way, any other Plans that do not explicitly link to the custom Spot Instances will use regular, on-demand instances.
If you are looking to control when an instance is terminated, you will have to use regular on-demand EC2 instances. That way AWS will provide you with the uptime you require for your workloads
Was this helpful?