GAMECOST01-BP01 Implement attribution of cost per player, game feature, and environment
Cost attribution for game servers is usually simpler to perform than game backend services because a game server is usually optimized to be able to host a specific number of concurrent players per instance which can be amortized across the cost of running the instance.
Level of risk exposed if this best practice is not established: High
Implementation guidance
For game backend services, it is recommended to de-couple the components of your game into distinct features that can be managed as separate logical or physical resources to make it straightforward to analyze costs.
For example, although it may seem straightforward to implement a
single monolithic application to host game backend services, this
pattern makes it hard to derive the total cost per player and game
feature over time as you add more features because the compute,
networking, and storage costs of resources are shared across the
features. Consider adopting a serverless architecture for your
game backend services with services such as
Amazon API Gateway
It is also recommended to separately manage each of your game development environments so that you can attribute costs for the different environments. Typically, game developers will manage separate environments for development, test, staging and production environments, as described in the operations pillar of this games industry lens. Each environment usually has different scalability, performance, and usage requirements and may be managed by separate teams. To control costs, organize these environments so that you can properly monitor and attribute the costs of each environment.
For more information, refer to the following documentation:
Implementation steps
-
De-couple game backend services into distinct features using serverless or containerized architectures like AWS Lambda, Amazon API Gateway, and AWS Fargate to enable granular cost attribution per feature.
-
Apply cost allocation tags to individual resources (for example, Lambda functions, DynamoDB tables, and S3 buckets) to associate costs with specific game features for better cost analysis.
-
Manage separate environments for development, testing, staging, and production, organizing and monitoring their costs independently to align with scalability and usage requirements.