Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to bamboo tags elastic-agent instances

Hi! How can I create custom tag for EC2 instances, started via Bamboo? Bamboo Server version 7.2.4. 

1 answer

1 accepted

0 votes
Answer accepted

Hi Mithrim, welcome to the Atlassian Community!

Unfortunately this is still not supported by Bamboo - please watch and vote for the following issue to raise Atlassian's priority to finally address this extremely long standing feature gap:

Potential workarounds

The issue comments describe a few approaches - nowadays I'd look into automating this on the AWS side by listening to the EC2 instance startup via EventBridge and applying the tag via a Lambda function provisioned as an Serverless Application Model (SAM) app.

Thanks for asking my question. I'm already find decision, may be it will be useful for somebody.

import os
import subprocess
import json

cmd = 'aws ec2 describe-tags > /tmp/aws_tags.json'
with open("/tmp/aws_tags.json", "r") as read_file:
    tags = json.load(read_file)

for elem in tags.values():
    for elem1 in elem:
        if elem1['ResourceType'] == 'instance' and 'known tag' in elem1['Value']:
            cmd = f"aws ec2 create-tags --resources {elem1['ResourceId']} --tags Key=Name,Value=new_tag"
  , shell=True)


This python script run on instance startup ang change tags via aws cli

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo Data Center - Early Access Program 2

We’re preparing for Bamboo 8.0, which will be our first Data Center release. To make sure our app vendors and customers with written in-house apps are prepared, we’re launching Bamboo 8.0 Early Acces...

76 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you