

# Amazon GameLift Servers pricing and cost planning
<a name="gamelift-intro-pricing"></a>

Understanding the Amazon GameLift Servers pricing structure and implementing cost-effective strategies in your game hosting solution is essential for optimizing your gaming infrastructure budget. For detailed service information, including example pricing scenarios and pricing tools, see [Amazon GameLift Servers Pricing](https://aws.amazon.com/gamelift/pricing/).

New AWS customers can use Amazon GameLift Servers without incurring charges under the Free Tier for up to 12 months. Stay within Free Tier usage limits to avoid charges.

## Pricing models
<a name="gamelift-intro-pricing-models"></a>

Amazon GameLift Servers offers several pricing models designed to accommodate different usage scenarios and business needs. Each model has a different cost basis. You can control costs by adjusting the cost factors in each model.

**Managed hosting**

Managed EC2 and managed container fleets use Amazon EC2 instances that Amazon GameLift Servers manage. When you set up game hosting, you choose the type of Amazon EC2 instance to use.
+ **Compute costs** – Pay for hourly EC2 instance usage for hosting game sessions. Cost factors for instances include:
  + AWS Region
  + Instance family, type, and size
  + Use of Spot versus On-Demand instances
  + Operating system (managed container fleets run on Linux only)
+ **Data transfer** – Pay for traffic between game clients and hosted game servers

**Anywhere hosting**

Anywhere hosting runs on game hosting resources that you supply and manage, so there are no compute costs. Instead costs are based on:
+ **Game sessions** – Pay based on the number of game sessions placed on Anywhere computes
+ **Connection minutes** – Pay for server process connection minutes

Use the **Pricing calculator for Amazon GameLift Servers** to estimate costs for different Amazon GameLift Servers configurations. Use the calculator when designing your game hosting solution or to forecast costs for configuration changes. See [Generate Amazon GameLift Servers pricing estimates](https://docs.aws.amazon.com/gameliftservers/latest/developerguide/gamelift-calculator.html).

# Generate Amazon GameLift Servers pricing estimates
<a name="gamelift-calculator"></a>

With AWS Pricing Calculator, you can [create a pricing estimate for Amazon GameLift Servers](https://calculator.aws/#/createCalculator/GameLiftServers). You don't need an AWS account or in-depth knowledge of AWS to use the calculator.

AWS Pricing Calculator calculator guides you through the decisions that affect service costs to give you an idea of how much Amazon GameLift Servers might cost for your game project. If you're not yet sure how you plan to use Amazon GameLift Servers, then use the default values to generate an estimate. When planning for production usage, the calculator can help you test out potential scenarios and generate more accurate estimates.

## Estimate Amazon GameLift Servers managed hosting
<a name="gamelift-calculator-hosting"></a>

This option provides a cost estimate for hosting your games on Amazon GameLift Servers managed servers, including the costs for server instance usage and data transfer. With Amazon GameLift Servers managed hosting, there is no additional cost for FlexMatch matchmaking.

If you are hosting or plan to host game servers in more than one AWS Region or on more than one instance type, create an estimate for each Region and instance type.

### Amazon GameLift Servers instances
<a name="gamelift-calculator-hosting-instances"></a>

This section helps you estimate the type and number of compute resources that you need to host game sessions for your players. Amazon GameLift Servers uses [Amazon Elastic Compute Cloud (Amazon EC2) instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) to manage game servers. In Amazon GameLift Servers, you deploy a fleet of instances with a specific instance type and operating system. If you have or plan to have multiple fleets, create an estimate for each fleet.

To get started, open the [Configure Amazon GameLift Servers page](https://calculator.aws/#/createCalculator/GameLiftServers) of AWS Pricing Calculator. Add a **Description**, choose a **Region**, and then choose **Estimate Amazon GameLift Servers hosting (Instance \$1 Data Transfer Out)**. Under **Amazon GameLift Servers instances**, complete the following fields:
+ **Peak concurrent players (peak CCU)**

  This is the maximum number of players who can connect to your game servers at the same time. This field indicates how much hosting capacity Amazon GameLift Servers needs to meet peak player demand. Enter the daily peak number of players that you expect to host using instances in your chosen AWS Region.

  For example, if you want to let 1,000 players connect to your game at any one time, keep the default value of **1000**.
+ **Average CCU per hour as a percentage of peak daily CCU **

  This is the average number of concurrent players per hour over a 24-hour period. We use this value to estimate the amount of sustained hosting capacity that Amazon GameLift Servers needs to maintain for your players. If you're not sure what percentage value to use, keep the default value of **50** percent. For games with stable player demand, we recommend entering a value of **70** percent.

  For example, if your game has an average hourly CCU of 6,000 and a peak CCU of 10,000, then enter the value of **60** percent.
+ **Game sessions per instance**

  This is the number of game sessions that each of your game server instances can host concurrently. Factors that can affect this number include the resource requirements of your game server, the number of players to host in each game session, and player performance expectations. If you know the number of concurrent game sessions for your game, then enter that value. Alternatively, keep the default value of **20**.
+ **Players per game session**

  This is the average number of players who connect to a game session, as defined in your game design. If you have game modes with different number of players, estimate an average number of players per game session across your entire game. The default value is **8**.
+ **Instance idle buffer %**

  This is the percentage of unused hosting capacity to maintain in reserve to handle sudden spikes in player demand. Buffer size is a percentage of the total number of instances in a fleet. The default value is **10** percent.

  For example, with a 20 percent idle buffer, a fleet supporting players with 100 active instances maintains 20 idle instances.
+ **Spot instance %**

  Amazon GameLift Servers fleets can use a combination of On-Demand Instances and Spot Instances. While On-Demand Instances offer more reliable availability, Spot Instances offer a highly cost-efficient alternative. We recommend using a combination to optimize both cost savings and availability. For information about how Amazon GameLift Servers uses Spot Instances, see [On-Demand Instances versus Spot Instances](gamelift-compute.md#gamelift-compute-spot).

  For this field, enter the percentage of Spot Instances to maintain in a fleet. We recommend a Spot Instance percentage between 50 and 85 percent. The default value is **50** percent.

  For example, if you deploy a fleet with 100 instances and specify **40** percent, Amazon GameLift Servers works to maintain 60 On-Demand Instances and 40 Spot Instances. 
+ **Instance type**

  Amazon GameLift Servers fleets can use a range of Amazon EC2 instance types that vary in computing power, memory, storage, and networking capabilities. When you configure an Amazon GameLift Servers fleet, choose an instance type that best fits your game's needs. For information about selecting an instance type with Amazon GameLift Servers, see [Choose compute resources for a managed fleet](gamelift-compute.md).

  If you know the instance type that you're using or plan to use in your Amazon GameLift Servers fleet, choose that type. If you're not sure what type to choose, consider choosing **c5.large**. This is a high-availability type with average size and capabilities.
+ **Operating system**

  This field specifies the operating system that your game servers run on—either Linux or Windows. The default value is **Linux**.

### Data transfer out (DTO)
<a name="gamelift-calculator-hosting-dto"></a>

This section helps you estimate the cost for traffic between your game clients and the game servers. Data transfer fees apply to outbound traffic only. Inbound data transfer has no cost.

On the [Configure Amazon GameLift Servers page](https://calculator.aws/#/createCalculator/GameLiftServers) of AWS Pricing Calculator, expand **Data transfer out (DTO)**, and then complete the following fields:
+ **DTO estimate type**

  You can choose to estimate DTO in either of the following two ways, depending on how you track data transfer for your game.
  + **Per month (in GB)** – If you track monthly traffic for your game servers, choose this type.
  + **Per player** – If you track data transfer by player, choose this type. This is the default type.

    In the following field, you estimate per-player DTO based on the number of player hours that you calculated in the previous section.
+ **DTO per month (in GB)**

  If you chose the **Per month (in GB)** DTO estimate type, then enter your estimated monthly DTO usage in GB from each instance, per Region.
+ **DTO per player**

  If you chose the **Per player** DTO estimate type, then enter your game's estimated DTO usage per player in KB/sec. The default value is **4**.

When you're done configuring your Amazon GameLift Servers pricing estimate, choose **Add to my estimate**. For more information about creating and managing estimates in AWS Pricing Calculator, see [Create an estimate, configure a service, and add more services](https://docs.aws.amazon.com/pricing-calculator/latest/userguide/create-estimate.html) in the *AWS Pricing Calculator User Guide*.

# Cost optimization strategies
<a name="gamelift-pricing-cost-optimization"></a>

Use these strategies with a managed hosting solution to help reduce your cloud hosting costs while maintaining high performance and player experience.

## Best practices
<a name="gamelift-pricing-cost-optimization-bestpractices"></a>

Follow these tips to incorporate cost optimization practices for your game hosting. At a minimum, we recommend that you schedule regular reviews of your Amazon GameLift Servers costs and usage patterns. If you have pricing-related questions, reach out to your 

**Fleet configuration**
+ **Use the pricing calculator** – Use this tool with your game hosting data to explore options and test out potential configuration scenarios for cost savings. See [AWS Pricing Calculator for Amazon GameLift Servers](https://calculator.aws/#/createCalculator/GameLiftServers).
+ **Save in development** – For development and testing, use smaller, less expensive instance types and run them only when you need to. 
+ **Match instance type to game** – Choose Amazon EC2 instance families, types, and sizes for your fleets that best suit your game's requirements. See the Instance types section in [Choose compute resources for a managed fleet](gamelift-compute.md#gamelift-compute-instance).
+ **Use Graviton instance types** – Graviton instances are powered by ARM-based processors. They offer better price-performance, higher energy efficiency, and lower costs than comparable x86-based instances with the On-Demand pricing model. 
+ **Use Spot instances** – Spot instances are usually lower cost than On-Demand but may not always be available. Combine Spot and On-Demand fleets to balance low cost and high availability (50-85% Spot usage recommended). Use Spot instances for non-critical game modes or during off-peak hours. To monitor Spot instance viability, track metrics such as `InstanceInterruptions` and `GameServerInterruptions`. See [On-Demand Instances versus Spot Instances](gamelift-compute.md#gamelift-compute-spot).
+ **Run servers on Linux** – Build your game server runtime for Linux. Instances that are deployed with Linux are generally more cost-efficient than those with Windows.
+ **Optimize resource utilization** – Configure fleets for maximum efficiency by running as many concurrent game server processes as possible while maintaining performance. See [Optimize game server runtime configuration on managed Amazon GameLift Servers](fleets-multiprocess.md).
+ **Create a multi-region strategy** – Deploying game hosting to multiple locations can give your players lower latency and better backup options. Balance regional coverage and cost efficiency by deploying hosting in your largest player markets first and using secondary locations for overflow capacity during peak times. See [Build a multi-location queue](queues-design-multiregion.md).

**Fleet capacity scaling**
+ **Scale to zero** – When fleets are not in use, manually set fleet capacity to zero to avoid unnecessary charges. See [Manually set capacity for an Amazon GameLift Servers fleet](fleets-updating-capacity.md).
+ **Add auto scaling** – Avoid over-provisioning hosting resources by using auto scaling to adjust game hosting capacity. Match capacity to fluctuating player demand and other key metrics. See [Auto-scale fleet capacity with Amazon GameLift Servers](fleets-autoscaling.md).
+ **Maintain a buffer** – To handle sudden spikes in player demand without making players wait, use target tracking to maintain a buffer of idle game servers. Customize the buffer based on the size and usage patterns of your player base. See [Target-based auto scaling](fleets-autoscaling-target.md).

**Game session placement**
+ **Use placement queues** – Amazon GameLift Servers queues rely on an algorithm to determine the "best possible" hosting locations for game sessions, based on the cost of hosting resources and other factors. See [Configure game session placement](queues-intro.md).
+ **Customize queue priorities** – You can change how a queue prioritizes hosting costs when placing game sessions. See [Prioritize game session placement](queues-design-priority.md).
+ **Monitor placement metrics** – Track how queues are choosing locations for game sessions to identify optimization opportunities. See [Amazon GameLift Servers metrics for queues](monitoring-cloudwatch.md#gamelift-metrics-queue).

**Data transfer**
+ **Track data transfers** – Monitor how data is transferred between your game clients and servers and take steps to optimize activity.
+ **Use data compression** – Consider implementing data compression techniques for data transfers between game clients and servers. Compression plays a crucial role in reducing bandwidth usage as well as improving gameplay performance and latency.

## Resource cost and utilization tools
<a name="gamelift-pricing-cost-optimization-tools"></a>

Explore how to use AWS tools to monitor and optimize your game hosting costs with Amazon GameLift Servers. For information on additional tools, see [AWS Billing and Cost Management](https://docs.aws.amazon.com/account-billing/).

**AWS cost management tools**
+ **Billing console** – Review your AWS bills and usage. See [Getting set up with Billing](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html).
+ **Free Tier usage alerts** – Set up notifications when approaching Free Tier limits. See [Tracking your AWS Free Tier usage](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/tracking-free-tier-usage.html).
+ **Amazon CloudWatch billing alerts** – Configure alerts when usage hits custom thresholds. See [Create a billing alarm to monitor your estimated AWS charges](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html).

**Cost allocation and tracking**
+ **Cost allocation tags** – Tag your fleets and other resources to organize and track hosting costs. See [Organizing and tracking costs using AWS cost allocation tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html).
+ **Cost reports** – Create reports categorized by assigned tags. See [Using the monthly cost allocation report](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/configurecostallocreport.html).
+ **AWS Cost Explorer** – Analyze costs, trends, and forecasts with filtering and customizable views. See [Analyzing your costs and usage with AWS Cost Explorer](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-what-is.html).
+ **AWS Budgets** – Track and take action on your AWS costs and usage. See [Managing your costs with AWS Budgets](https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html).

## Performance monitoring with Amazon GameLift Servers and Amazon CloudWatch
<a name="gamelift-pricing-cost-optimization-metrics"></a>

Monitor these key metrics to optimize resource utilization. View metrics in the Amazon GameLift Servers console or use Amazon CloudWatch dashboards. For details on all available metrics for Amazon GameLift Servers , see [Monitor Amazon GameLift Servers with Amazon CloudWatch](monitoring-cloudwatch.md).
+ **Instance metrics** – `ActiveInstances`, `IdleInstances`, `PercentIdleInstances`
+ **Server process metrics** – `ActiveServerProcesses`, `HealthyServerProcesses`
+ **Game session metrics** – `ActiveGameSessions`, `AvailableGameSessions`
+ **Player session metrics** – `CurrentPlayerSessions`
+ **Queue metrics** – `AverageWaitTime`, `QueueDepth`
+ **Matchmaking metrics** – `CurrentTickets`, `MatchesPlaced`
+ **Hardware performance** – `CPUUtilization`, `NetworkIn`/`NetworkOut`, `DiskReadBytes`/`DiskWriteBytes`
+ **Resource utilization metrics**
  + Use `PercentIdleInstances` to determine optimal fleet size.
  + Track `PercentAvailableGameSessions` to ensure sufficient game hosting capacity.
  + Monitor `InstanceInterruptions` and `GameServerInterruptions` to determine Spot Instance viability.