Determining total AWS cost of a system using tags
It turns out that reports in AWS Cost Manager support filtering by Tags. So let's say you want to find out the total cost of the Invoicing system. You can assign an
invoicing tag to all AWS resources of the Invoicing system and the filtering will do the heavy-lifting for you.
A few other considerations:
A tag contains a name and a value. For example, you can have a tag called
To consolidate costs over different environments, setup AWS Organization. With tags and AWS Organization setup, you can see the total cost of the invoicing system across all environments. That could be useful for measuring business impact.
In CloudFormation, you can add a tag to the whole stack during the deployment. CloudFormation will propagate the tags to all the resources created in the stack. For example:
aws create-stack ... --tags Key=System,Value=Invoicing
Alternatively, you can add a tag to an individual resource within the CloudFormation template:
MyLambda: Type: AWS::Serverless::Function Properties: Tags: - Key: System Value: Invoicing
This blog is written by Marcel Krcah, an independent consultant for product-oriented software engineering. If you like what you read, sign up for my newsletter