- Newest
- Most votes
- Most comments
Your understanding is partially correct, but there are some important nuances to consider regarding Custom Billing Views and cost allocation for containerized workloads.
When you create a Custom Billing View using the cost allocation tag MyViews:View1, it will include all resources across your organization that have this tag applied, regardless of which account they're in. This includes both the resources in account A1 and the tagged containers in account A2.
However, the behavior you're describing with EC2-based ECS/EKS containers is related to how AWS allocates costs for these resources, rather than a limitation of Custom Billing Views themselves.
For EC2-based ECS/EKS: The costs for the EC2 instances themselves are not automatically split or allocated to individual containers. This means that while you might see the costs for any directly attributable resources (like EBS volumes attached to containers), the shared EC2 instance costs won't be automatically divided among the containers running on them, even with split cost allocation enabled.
For ECS/EKS with Fargate: Fargate provides a clearer cost allocation because each task or pod has its own discrete resources. This makes it easier to attribute costs directly to specific containers, which is why you see it working as expected in your Fargate scenario.
To get a more accurate view of container costs on EC2 instances, you would need to implement additional cost allocation strategies, such as using custom metrics or third-party tools to estimate resource usage per container and then allocating costs proportionally.
In summary, while the Custom Billing View will include all resources tagged with MyViews:View1 across accounts, the limitation you're experiencing with EC2-based containers is due to the nature of shared resources and how AWS attributes their costs, not because of the Custom Billing View feature itself.
Sources
Introducing custom billing views: tailored cost and usage view for your stakeholders | AWS Cloud Financial Management
Creating custom billing views - AWS Cost Management
Controlling cost management data access with Billing View - AWS Cost Management
Relevant content
- asked a year ago
- asked 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 10 months ago
"For EC2-based ECS/EKS: The costs for the EC2 instances themselves are not automatically split or allocated to individual containers. This means that while you might see the costs for any directly attributable resources (like EBS volumes attached to containers), the shared EC2 instance costs won't be automatically divided among the containers running on them, even with split cost allocation enabled."
-- I am confused - isnt that exactly the reason for the creation of 'Split Cost Allocation Data' - to split costs of these shared resources ??? In other words provide the same visibility into container level costs for 'ecs/eks on ec2' , as 'ecs/eks with fargate'. If thats not the purpose - what is the point of splitting?