get_pricing_attribute_values
Discover valid values for AWS pricing filter attributes, such as instance types or locations, to build precise pricing queries. Specify service code and attribute names, with optional region and regex filters.
Instructions
Get valid values for pricing filter attributes.
**PURPOSE:** Discover what values are available for specific pricing filter attributes of an AWS service.
**WORKFLOW:** Use this after get_pricing_service_attributes() to see valid values for each filter attribute.
**PARAMETERS:**
- Service code from get_pricing_service_codes() (e.g., 'AmazonEC2', 'AmazonRDS')
- region (optional): AWS region (e.g., 'us-east-1', 'eu-west-2'). Defaults to AWS_REGION env var. Set this to match the region you plan to query with get_pricing().
- List of attribute names from get_pricing_service_attributes() (e.g., ['instanceType', 'location'])
- filters (optional): Dictionary mapping attribute names to regex patterns (e.g., {'instanceType': 't3'})
**RETURNS:** Dictionary mapping attribute names to their valid values. Filtered attributes return only matching values, unfiltered attributes return all values.
**EXAMPLE RETURN:**
```
{
'instanceType': ['t2.micro', 't3.medium', 'm5.large', ...],
'location': ['US East (N. Virginia)', 'EU (London)', ...]
}
```
**NEXT STEPS:** Use these values in get_pricing() filters to get specific pricing data.
**ERROR HANDLING:** Uses "all-or-nothing" approach - if any attribute fails, the entire operation fails.
**EXAMPLES:**
- Single attribute: ['instanceType'] returns {'instanceType': ['t2.micro', 't3.medium', ...]}
- Multiple attributes: ['instanceType', 'location'] returns both mappings
- Partial filtering: filters={'instanceType': 't3'} applies only to instanceType, location returns all values
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | AWS region (e.g., "us-east-1", "eu-west-2"). Defaults to AWS_REGION env var (us-east-1). Attributes and values can differ by region, so set this to match the region you plan to query with get_pricing(). | |
| filters | No | Optional dictionary mapping attribute names to regex patterns for filtering their values (e.g., {"instanceType": "t3", "operatingSystem": "Linux"}) | |
| service_code | Yes | AWS service code (e.g., "AmazonEC2", "AmazonS3", "AmazonES") | |
| attribute_names | Yes | List of attribute names (e.g., ["instanceType", "location", "storageClass"]) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |