The aws pricing command is a part of the AWS Command Line Interface (CLI) and allows you to query and retrieve pricing information for various services and products offered by Amazon Web Services (AWS). It provides a convenient way to access and analyze pricing details without the need to navigate through the AWS Management Console.
Here’s an overview of the aws pricing command and its functionality:
- Service and Product Information: The aws pricing command allows you to retrieve information about AWS services and products. You can query the available services, obtain a list of product categories, and explore the offerings within each category.
- Pricing Details: Using the aws pricing command, you can access pricing details for AWS services and products. This includes retrieving the current pricing information, such as hourly rates, usage tiers, data transfer costs, and any applicable discounts or promotions.
- Filter and Search Options: The aws pricing command provides options to filter and search for specific pricing information. You can specify parameters such as service codes, product codes, regions, and usage types to narrow down your search and retrieve pricing data that meets your requirements.
- Historical Pricing: In addition to current pricing, the aws pricing command also allows you to retrieve historical pricing information. You can query the pricing history to analyze cost trends over time or evaluate the impact of pricing changes on your AWS usage.
- Cost Estimation: The aws pricing command supports cost estimation by providing pricing data that can be used to calculate the projected costs of using specific AWS services or products. This can help you plan and estimate your AWS expenses more accurately.
The aws pricing command provides a programmatic way to access and retrieve AWS pricing information, making it easier to analyze costs, estimate expenses, and compare pricing across different services and regions.
aws pricing Command Examples
1. List service codes of a specific region:
# aws pricing describe-services --region us-east-1
2. List attributes for a given service code in a specific region:
# aws pricing describe-services --service-code AmazonEC2 --region us-east-1
3. Print pricing information for a service code in a specific region:
# aws pricing get-products --service-code AmazonEC2 --region us-east-1
4. List values for a specific attribute for a service code in a specific region:
# aws pricing get-attribute-values --service-code AmazonEC2 --attribute-name instanceType --region us-east-1
5. Print pricing information for a service code using filters for instance type and location:
# aws pricing get-products --service-code AmazonEC2 --filters "Type=TERM_MATCH,Field=instanceType,Value=m5.xlarge" "Type=TERM_MATCH,Field=location,Value=US East (N.Virginia)" --region us-east-1