AWS Elastic Beanstalk - tag EBS volumes
Asked Answered
P

1

9

We're using AWS Elastic Beanstalk for our compute environments. The tagging works quite well and the EC2 instances are tagged with the environment name as the "Name" key. However I noticed that the corresponding EBS Volumes are not tagged at all. Does anybody know how to configure Elastic Beanstalk to also tag the EBS volumes. This would be quite helpful inside the billing reports.

Your help is much appreciated

Pinkney answered 14/7, 2017 at 18:12 Comment(2)
If it doesn't already do this, then I doubt you can control it. You might need to tag them afterwards either manually or you could build a Lambda function that does this, triggered by AttachVolume via CloudTrail Logs. Or look at answersforaws.com/code/graffiti-monkey.Forebode
Thanks @jarmod. Just had a look at graffiti-monkey and I like it. I will use it for tagging all running instances. Since elastic beanstalk will replace instances I'm looking for a solution that will immediately tag new instances. I'll have a look at the CloudTrail>AttachVolume>Lambda approach but was wondering if there is an easier way perhaps using .ebextenstionsPinkney
L
0

I believe that setting the LaunchTemplateTagPropagationEnabled attribute to true should do this (see https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html).

It seems like you can use start-up scripts to call the AWS CLI to achieve the same goal too: https://github.com/aws/elastic-beanstalk-roadmap/issues/258

Loblolly answered 28/5 at 23:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.