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 System with values Invoicing, DataWarehouse, etc.

  • To see a Tag in the filter list, you first have to activate the AWS-Generated Cost Allocation Tags. These can take up to 24 hours to appear.

  • 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 
    

    Would you like to connect? Subscribe via email or RSS , or follow me on Twitter!