I'm trying to create an AWS auto-scaling group, and I want my instances to have a tag with Key=Name and Value=processor%i, where the "%i" is dynamically replaced with a 1, 2, 3, etc as the instances are added.
Is this possible? I can't find any documentation suggesting how to do this.
This isn't possible to have AWS do automatically and is pretty tricky to do reliably when coding a system yourself. You can either have a lifecyle hook trigger a lambda function, or have a userdata script run on boot to tag the instance.
There are two problems: 1) You need to keep track of the current counter somewhere 2) If multiple instances are starting at the same time, there may be a race condition where both try and get tagged the same