Tag a Function for Cost Allocation
A 3-step recipe with AWS Lambda. We can help you get access.
Recipe · 3 steps
Tag a Function for Cost Allocation
with AWS Lambda · IT Infrastructure Management
Resolve a function's ARN, apply tags to it, and verify the resulting tag set.
- Look up the function to obtain its full ARN. The tag endpoints are keyed by ARN, not by function name, so this lookup is a hard requirement rather than a convenience. The response also carries the tags already on the function.
- Apply the tags to the resolved ARN. The call merges: keys present are set or overwritten, and keys absent from this payload are left alone. It returns 204 with no body, which is why the tag set has to be read back to be observed.
- List the tags on the function to confirm the merged result, showing both the newly applied keys and any pre-existing keys that survived.
What you'll need to have ready
- functionName: The name or partial ARN of the function to tag.
- tags: Key-value pairs to apply (e.g. {"Environment":"production", "CostCenter":"platform","Owner":"payments-team"}). Existing keys not listed here are left in place.
For your developer
Arazzo workflow aws-lambda:tag-function, 3 operations: GetFunction → TagResource → ListTags. Specs on APIs.io.