Using the Free Tier API - Amazon Billing
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Using the Free Tier API

Amazon Web Services China Region Free Tier offers free usage each month for Amazon Web Services and products. You can use the Free Tier API to programmatically track your free tier usage against the monthly usage limits.

Use the API to understand when your free usage will change to pay-as-you-go pricing each month. This helps you avoid unintended charges by comparing forecasted usage to the free tier limit for each service throughout the month. For example, to know when your usage might exceed the free offer limit for Amazon Glue, you can use the API to track your Amazon Web Services account usage. You can then decide whether to keep the service or make any changes before the free tier limit ends.

You can also use the API to create visualizations or write scripts to automate changes to Amazon resources based on your API responses.

Example: Find your free tier offers for Amazon Glue

The following Amazon Command Line Interface (Amazon CLI) command uses the GetFreeTierUsage API operation to filter by free tier usage for Amazon Glue.

Request

aws freetier get-free-tier-usage --filter '{"Dimensions": {"Key": "SERVICE", "Values": ["Glue"], "MatchOptions": ["CONTAINS"]}}'

Response

The following response returns two Always Free offers from Amazon Glue.

{ "freeTierUsages": [ { "actualUsageAmount": 287.0, "description": "1000000.0 Request are always free per month as part of AWS Free Usage Tier (Global-Catalog-Request)", "forecastedUsageAmount": 2224.25, "freeTierType": "Always Free", "limit": 1000000.0, "operation": "Request", "region": "global", "service": "AWS Glue", "unit": "Request", "usageType": "Catalog-Request" }, { "actualUsageAmount": 176.36827958, "description": "1000000.0 Obj-Month are always free per month as part of AWS Free Usage Tier (Global-Catalog-Storage)", "forecastedUsageAmount": 1366.8541667450002, "freeTierType": "Always Free", "limit": 1000000.0, "operation": "Storage", "region": "global", "service": "AWS Glue", "unit": "Obj-Month", "usageType": "Catalog-Storage" } ] }
Example: Find your free tier offers for Amazon Elastic Compute Cloud

The following Amazon CLI command uses the GetFreeTierUsage API operation to filter by free tier usage for Amazon EC2.

Request

aws freetier get-free-tier-usage --filter '{"Dimensions": {"Key": "SERVICE", "Values": ["EC2"], "MatchOptions": ["CONTAINS"]}}'

Response

The following response returns two 12 Months Free offers from Amazon EC2.

{ "freeTierUsages": [ { "actualUsageAmount": 15.97777618, "description": "30.0 GB-Mo for free for 12 months as part of AWS Free Usage Tier (Global-EBS:VolumeUsage)", "forecastedUsageAmount": 23.96666427, "freeTierType": "12 Months Free", "limit": 30.0, "operation": "", "region": "global", "service": "Amazon Elastic Compute Cloud", "unit": "GB-Mo", "usageType": "EBS:VolumeUsage" }, { "actualUsageAmount": 750.0, "description": "750.0 Hrs for free for 12 months as part of AWS Free Usage Tier (Global-BoxUsage:freetier.micro)", "forecastedUsageAmount": 1125.0, "freeTierType": "12 Months Free", "limit": 750.0, "operation": "RunInstances", "region": "global", "service": "Amazon Elastic Compute Cloud", "unit": "Hrs", "usageType": "BoxUsage:freetier.micro" } ] }

The Amazon CLI and the Amazon Software Development Kits (SDKs) include support for the Free Tier API. For a list of languages that support the Free Tier API, choose the operation name, and in the See Also section, choose your preferred language.

For more information about the Free Tier API, see the Amazon Billing and Cost Management API Reference.

To use the Amazon Billing and Cost Management console to track your free tier usage, such as receiving email alerts, see Tracking your Amazon Web Services China Region Free Tier usage.

For more information about using Free Tier with Amazon EC2, see the Tutorial: Get started with Amazon EC2 Linux instances in the Amazon EC2 User Guide.

You can also create budgets for your Amazon costs and then set up notifications and alerts when your budgets exceed or are forecasted to exceed your costs and usage. For more information, see Managing your costs with Amazon Budgets in the Amazon Cost Management User Guide.