Skip to main content

@webframp/aws-cost-audit

v2026.04.14.2

AWS cost audit workflow — identifies infrastructure waste by combining Cost Explorer spend data, resource inventory, and networking inspection. Generates a report with savings recommendations.

Quick Start

swamp extension pull @webframp/aws-cost-audit

swamp model create @webframp/aws/cost-explorer aws-costs --global-arg region=us-east-1
swamp model create @webframp/aws/networking aws-networking --global-arg region=us-east-1
swamp model create @webframp/aws/inventory aws-inventory --global-arg region=us-east-1

swamp workflow run @webframp/cost-audit

Required IAM Permissions

  • ce:GetCostAndUsage
  • ec2:DescribeInstances, ec2:DescribeNatGateways, ec2:DescribeAddresses
  • rds:DescribeDBInstances
  • dynamodb:ListTables, dynamodb:DescribeTable
  • lambda:ListFunctions
  • s3:ListBuckets
  • elasticloadbalancing:DescribeLoadBalancers, elasticloadbalancing:DescribeTargetGroups, elasticloadbalancing:DescribeTargetHealth
  • cloudwatch:GetMetricStatistics

Repository

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

Labels

awscostfinopsauditnetworkingworkflow

Install

$ swamp extension pull @webframp/aws-cost-audit

@webframp/cost-auditdd789d8f-82ff-42d4-9e26-c5201c36a929

AWS cost audit workflow — gathers spend data from Cost Explorer, resource inventory, and networking details, then enriches with CloudWatch metrics and identifies top cost drivers. Results feed into the cost-audit report for savings recommendations.

gather-cost-and-resourcesCollect cost data and resource inventory in parallel
1.get-cost-by-serviceaws-costs.get_cost_by_service— Get cost breakdown by AWS service
2.get-cost-by-usage-type-ec2aws-costs.get_cost_by_usage_type— Get EC2 cost breakdown by usage type
3.get-cost-by-usage-type-rdsaws-costs.get_cost_by_usage_type— Get RDS cost breakdown by usage type
4.get-cost-by-usage-type-s3aws-costs.get_cost_by_usage_type— Get S3 cost breakdown by usage type
5.get-cost-by-usage-type-lambdaaws-costs.get_cost_by_usage_type— Get Lambda cost breakdown by usage type
6.get-cost-trendaws-costs.get_cost_trend— Get daily cost trend over the period
7.get-cost-comparisonaws-costs.get_cost_comparison— Compare current period costs to previous period
8.inventory-allaws-inventory.inventory_all— Gather full resource inventory including stopped instances and EBS
9.list-nat-gatewaysaws-networking.list_nat_gateways— List NAT Gateways for networking waste analysis
10.list-load-balancersaws-networking.list_load_balancers— List load balancers for utilization analysis
11.list-elastic-ipsaws-networking.list_elastic_ips— List Elastic IPs to find unattached addresses
enrich-metricsGather data transfer metrics for networking resources
1.get-data-transfer-metricsaws-networking.get_data_transfer_metrics— Get data transfer metrics for NAT Gateways and load balancers
deep-divePerform deeper cost analysis based on initial findings
1.get-top-cost-driversaws-costs.get_top_cost_drivers— Identify the top cost drivers by service and usage type

@webframp/cost-audit-reportworkflow
cost_audit_report.ts

Aggregates cost, inventory, and networking data from the cost-audit workflow into a savings report

awscostfinopsaudit