AWS Certified Solutions Architect - Professional 2020

Sign Up Free or Log In to participate!

EBS tagging not possible with block device mapping in cloudformation

I have a cloudformation script launching EC2s from private AMIs. The cloudformation is unable to tag the EBS volumes.

Have anyone experienced this? what was the resolution or workaround?

2 Answers

Hi Max,
I am sure that I saw a notification about having Tags pass though recently.
Have you checked the AWS doco, in particular the Blogs and whats new ?

google: AWS inherit tag CloudFormation EBS blog whats new

I see a Blog post from 2017 about this and another from 2019.

I think that later one about tagging root volumes is the one you want. LoL they use an embedded script to get the instance to Tag itself :-D. That is great, I never thought of that approach. Good stuff.

Also check the ‘latest’ CloudFormation CLI doco to see if there is a tagging allowance now

The other thing to try is to jump onto the AWS Support Forum (top right of the AWS console) and see if you can find any dialogue about this.

🙂

Rusty

Moderator & Coach

MaxTheCloudGuy

AWS does allow tagging when you create a new EBS. But if your AMI already have some EBS attached to it. Your CF script doesn’t need to create a new EBS, you can just map the existing device. AWS doesn’t allow tags for that mapping. I will look at the 2019 blog and see. could you please include the link?

One of my colleagues commented that in the past he has done it with a Lambda function.

I guess; monitor for instances with certain tags, then interrogate the instance config (describe-instance), and then push matching tags to the volumes.

I am sure you can figure it out or find some code samples

🙂

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?