Skip to main content

@webframp/aws/pricing

v2026.04.22.1

AWS Pricing API model for looking up service costs.

Authentication

Uses the default AWS credential chain. The Pricing API is public data and doesn't require special IAM permissions, but does require valid AWS credentials.

Regions

The AWS Pricing API is only available in us-east-1 and ap-south-1. Configure the model with one of these regions.

Usage

# Create pricing lookup model
swamp model create @webframp/aws/pricing aws-pricing

# List available services
swamp model method run aws-pricing list_services

# Get EC2 instance types
swamp model method run aws-pricing get_attribute_values \
  --input serviceCode=AmazonEC2 \
  --input attributeName=instanceType

# Get pricing for a specific EC2 instance
swamp model method run aws-pricing get_ec2_price \
  --input instanceType=t3.medium \
  --input region=us-east-1

Common Service Codes

  • AmazonEC2 - Elastic Compute Cloud
  • AmazonRDS - Relational Database Service
  • AmazonS3 - Simple Storage Service
  • AWSLambda - Lambda Functions
  • AmazonDynamoDB - DynamoDB
  • AmazonElastiCache - ElastiCache
  • AmazonEKS - Elastic Kubernetes Service

Repository

https://github.com/webframp/swamp-extensions

Labels

awspricingcostfinopscloud

Contents

Quality score

How well-documented and verifiable this extension is.

100%

Grade A

  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned

Install

$ swamp extension pull @webframp/aws/pricing

@webframp/aws/pricingv2026.03.30.1aws/pricing.ts
list_servicesList all AWS services available in the Pricing API
get_attribute_valuesGet possible values for a service attribute
ArgumentTypeDescription
serviceCodestringAWS service code (e.g., AmazonEC2)
get_priceGet pricing for a service with optional filters
ArgumentTypeDescription
serviceCodestringAWS service code (e.g., AmazonEC2)
fieldstringAttribute name to filter on
valuestringValue to match
get_ec2_priceGet EC2 instance pricing (convenience method)
ArgumentTypeDescription
instanceTypestringEC2 instance type (e.g., t3.medium)

Resources

services(7d)— List of available AWS services and their attributes
attributes(7d)— Attribute values for a service
prices(1d)— Pricing data for a service