1 · Executive Summary
Top 3 quick wins
- Schedule dev compute off-hours (EC2 + RDS + ECS run 24/7 at <5% CPU) — the single biggest win.
- Collapse the 2 us-east-2 NAT Gateways to 1 — ~$30/mo for HA dev doesn't need.
- Add S3 lifecycle to the 461 GB CodePipeline artifact bucket + release the idle Elastic IP.
DEV is spending $300.88 USD/mo. The bill is dominated by always-on infrastructure (3 NAT Gateways, 24/7 compute at <5% CPU) rather than heavy usage — exactly the pattern that responds to scheduling + consolidation. "Total opportunity" nets out overlap between scheduling and rightsizing.
2 · Where the money actually goes (by USAGE_TYPE)
Cost Explorer broken down past the service name. This turns "EC2 - Other $79.60" into "almost entirely NAT Gateway hours", and reveals that the "VPC" line is public-IPv4 address charges, not NAT.
EC2 - Other $79.60 USD EC2 - Other
| Usage Type | Cost | Quantity |
|---|---|---|
USE2-NatGateway-Hours | $59.58 USD | 1,324.0 Hrs |
NatGateway-Hours | $16.96 USD | 377.0 Hrs |
USE2-EBS:VolumeUsage.gp3 | $2.05 USD | 25.7 GB-Month |
USE2-EBS:VolumeUsage.gp2 | $0.71 USD | 7.1 GB-Month |
USE2-NatGateway-Bytes | $0.12 USD | 2.6 GB |
USE2-EBS:SnapshotUsage | $0.10 USD | 2.0 GB-Month |
NatGateway-Bytes | $0.07 USD | 1.5 GB |
EC2 Compute $34.34 USD Amazon Elastic Compute Cloud - Compute
| Usage Type | Cost | Quantity |
|---|---|---|
USE2-BoxUsage:t3.medium | $27.47 USD | 660.3 Hrs |
USE2-BoxUsage:t3.micro | $6.87 USD | 660.6 Hrs |
RDS $71.59 USD Amazon Relational Database Service
| Usage Type | Cost | Quantity |
|---|---|---|
USE2-InstanceUsage:db.t3.medium | $44.95 USD | 661.0 Hrs |
Aurora:ServerlessV2Usage | $22.71 USD | 189.3 ACU-Hr |
USE2-RDS:GP2-Storage | $2.05 USD | 17.8 GB-Month |
Aurora:StorageIOUsage | $0.94 USD | 4,699,173.0 IOs |
USE2-RDS:ChargedBackupUsage | $0.94 USD | 9.8 GB-Month |
VPC $28.81 USD Amazon Virtual Private Cloud
| Usage Type | Cost | Quantity |
|---|---|---|
USE2-PublicIPv4:InUseAddress | $16.55 USD | 3,310.0 Hrs |
USE1-PublicIPv4:InUseAddress | $5.64 USD | 1,127.3 Hrs |
USW1-PublicIPv4:InUseAddress | $3.31 USD | 662.1 Hrs |
USE2-PublicIPv4:IdleAddress | $3.31 USD | 662.0 Hrs |
ECS $28.10 USD Amazon Elastic Container Service
| Usage Type | Cost | Quantity |
|---|---|---|
USW1-Fargate-vCPU-Hours:perCPU | $15.41 USD | 331.0 Hrs |
USE1-Fargate-vCPU-Hours:perCPU | $7.63 USD | 188.5 Hrs |
USW1-Fargate-GB-Hours | $3.38 USD | 662.0 Hrs |
USE1-Fargate-GB-Hours | $1.68 USD | 376.9 Hrs |
KMS $15.86 USD AWS Key Management Service
| Usage Type | Cost | Quantity |
|---|---|---|
us-east-2-KMS-Requests | $10.53 USD | 3,510,922.0 Requests |
us-east-2-KMS-Keys | $5.33 USD | 5.3 Keys |
S3 $11.22 USD Amazon Simple Storage Service
| Usage Type | Cost | Quantity |
|---|---|---|
USE2-TimedStorage-ByteHrs | $11.20 USD | 486.8 GB-Month |
USE2-Requests-Tier1 | $0.02 USD | 3,623.0 Requests |
CloudWatch $7.34 USD AmazonCloudWatch
| Usage Type | Cost | Quantity |
|---|---|---|
CW:MetricMonitorUsage | $5.75 USD | 19.2 Metrics |
USE2-TimedStorage-ByteHrs | $0.73 USD | 24.4 GB-Month |
USE2-VendedLog-Bytes | $0.43 USD | 1.2 GB |
USE2-CW:AlarmMonitorUsage | $0.29 USD | 3.6 Alarms |
USE2-DataProcessing-Bytes | $0.08 USD | 0.4 GB |
USE1-DataProcessing-Bytes | $0.06 USD | 0.1 GB |
ELB $8.49 USD Amazon Elastic Load Balancing
| Usage Type | Cost | Quantity |
|---|---|---|
LoadBalancerUsage | $8.48 USD | 377.0 Hrs |
3 · Findings & Recommendations
Every row traces to data pulled in this run (resource IDs, 14-day CloudWatch utilisation, Cost Explorer figures). Estimated savings are conservative; "depends on usage" is used where a number can't be stated honestly.
| Severity | Service | What was found | Why it costs | Recommended action | Est. saving | Effort | Risk (dev) |
|---|---|---|---|---|---|---|---|
| 🔴 High | NAT / VPC | 2 NAT Gateways in one dev VPC (vpc-03c82a8758c864319) across 2 AZs: nat-036532e40e659d887, nat-005e3dad36dde530d. CE: USE2-NatGateway-Hours $59.58 (1,324 hrs); data processing only $0.12. |
Each NAT Gateway bills ~$0.045/hr (~$32/mo) just to exist — independent of traffic. The second one only buys multi-AZ HA, which dev does not need. | Collapse to a single NAT Gateway: point both AZ private-subnet route tables at one NAT GW. | ≈ $30.00 / mo | Easy | Low |
| 🔴 High | NAT / VPC | 1 NAT Gateway in us-east-1: nat-068bdc424cdc727a3 (vpc-0e6fd1c5bb41b13ff). CE: NatGateway-Hours $16.96 (377 hrs). |
~$32/mo base. us-east-1 hosts only the Aurora cluster, one Fargate service and the ALB — little that needs general outbound internet. | Confirm what actually needs outbound NAT in us-east-1; if the Fargate task can use VPC endpoints or a public subnet, delete this NAT GW. | up to ≈ $32.00 / mo (if removable) | Medium | Medium |
| 🟡 Medium | NAT / VPC | Only a DynamoDB gateway endpoint exists in us-east-2; there is no S3 gateway endpoint in either active region. | S3 traffic from private subnets is routed through the NAT Gateway (data processing $). S3 gateway endpoints are FREE. | Add an S3 gateway VPC endpoint (free) in us-east-2 and us-east-1. | depends on usage (NAT bytes currently $0.19) | Easy | Low |
| 🔴 High | EC2 | i-0de72b3cd014203f7 (mongodb-hptdev) t3.medium, running 24/7, CPU avg 0.57% (max 0.58%) over 14d. CE BoxUsage:t3.medium $27.47 (660 hrs). |
A t3.medium sitting at <1% CPU is dramatically over-provisioned and runs all night and weekend for no one. | Downsize to t3.small (huge headroom remains) and/or schedule off-hours. Downsize alone roughly halves the cost. | ≈ $14.00 / mo (downsize) | Easy | Low |
| 🟡 Medium | EC2 | i-08d062e27e5ed5397 (DB Schema Visualizer) t3.micro, 24/7, CPU avg 0.21%. CE BoxUsage:t3.micro $6.87. |
A near-idle helper VM running around the clock. | Stop when not in use (scheduler) or terminate if obsolete. | up to $6.87 / mo (if stopped) | Easy | Low |
| 🔴 High | RDS | vm12fd58plkqejf MySQL db.t3.medium, single-AZ, 20 GB gp2, CPU avg 4.0%, 11.8 connections, 16.5/20 GB free, backups 1 day. CE InstanceUsage:db.t3.medium $44.95 (661 hrs). |
The largest line after NAT. 4% CPU = heavily over-provisioned, and it runs 24/7. | Move to Graviton db.t4g.medium (~20% cheaper, same 2 vCPU/4 GB) and/or stop off-hours. Consider db.t4g.small if 2 GB RAM suffices. | ≈ $9.00 / mo (t4g.medium); up to ≈ $30 / mo with off-hours stop | Medium | Low |
| 🟡 Medium | RDS | Aurora cluster revique-api-dev-databaseb269d8bb (aurora-postgresql), 1 writer (db.serverless), min 0.5 / max 2.0 ACU, single-AZ, retention 3d, writer CPU avg 24%. CE Aurora ServerlessV2 $22.71 (189 ACU-hr). |
A 0.5-ACU floor keeps billing a baseline even when the dev API is idle overnight. | Lower min capacity toward 0 ACU (Serverless v2 auto-pause) so it scales down off-hours in dev. | depends on idle hours | Medium | Low |
| 🔴 High | ECS | Cluster dev / service xray-service (us-west-1), FARGATE 0.5 vCPU / 1 GB, 24/7, CPU avg 0.22%, mem 14.5%, in an otherwise-empty region. CE us-west-1 Fargate $18.79 + PublicIPv4 $3.31. |
An idle X-Ray daemon running 24/7 in a lone region, plus a billed public IPv4. Cross-region sprawl with almost no utilisation. | Relocate to us-east-2 (consolidate regions) or run on a schedule; drop the task to 0.25 vCPU / 0.5 GB. | up to ≈ $22.00 / mo (remove) or ≈ $9 / mo (downsize) | Medium | Low |
| 🟡 Medium | ECS | revique-api-dev-service (us-east-1), FARGATE 0.5 vCPU / 1 GB, CPU avg 0.02%, mem 4%. Part of CE us-east-1 Fargate $9.31. |
Over-provisioned and effectively idle. | Downsize to 0.25 vCPU / 0.5 GB; schedule off-hours. | ≈ $4.65 / mo (downsize) | Medium | Low |
| 🟡 Medium | KMS | KMS API requests = 3.51M ($10.53) — 66% of the KMS bill; key storage is only $5.33. 2 customer-managed CMKs detected (2fbbb815-…, da0f2137-…). |
3.5M requests/month almost always means SSE-KMS encrypt/decrypt on every S3 object or Secrets Manager fetch. | For non-sensitive buckets (e.g. the 461 GB CodePipeline artifact bucket) switch SSE-KMS → SSE-S3 (free) to cut per-object KMS calls. | depends on usage | Medium | Low |
| 🟡 Medium | S3 | v1-toolssetup-codepipelineartifactstores3bucket-1nb59ovu097p0 = 461.8 GB / 46,238 objs, no lifecycle; codepipeline-us-east-2-695553060848 = 35.8 GB (versioned), no lifecycle. Together ~85% of the 486 GB S3 footprint. CE storage $11.20. |
CodePipeline artifacts accumulate forever without an expiry rule. | Add lifecycle rules: expire artifacts >30–90 days, abort incomplete multipart uploads, expire noncurrent versions. | ≈ $7.00 / mo | Easy | Low |
| 🟡 Medium | CloudWatch | 89 of 90 log groups have retention = never-expire (29.2 GB stored); largest is /aws/codebuild/PaymentNodeBuildProject 3.7 GB. Custom metrics $5.75 (19 metrics). |
Logs grow unbounded; storage and future ingestion keep climbing. | Set 30–90d retention on dev log groups (CodeBuild/Lambda first). Review the 19 custom metrics for any that aren't used. | ≈ $1 / mo now + prevents growth | Easy | Low |
| 🟢 Low | EC2 / EIP | 1 unassociated Elastic IP in us-east-2: 3.12.227.180. CE PublicIPv4 IdleAddress $3.31 (662 hrs). |
Unassociated EIPs bill ~$0.005/hr (~$3.60/mo). | Release it unless reserved for a specific upcoming use. | $3.31 / mo | Easy | Low |
| 🟢 Low | EBS | 1 orphaned snapshot (source volume gone); volume vol-0779845806bdbce5a 8 GB is still gp2. |
Minor orphaned-snapshot storage; gp3 is ~20% cheaper than gp2 at equal perf. | Delete the orphaned snapshot after confirming, and convert the 8 GB gp2 → gp3. | < $1 / mo | Easy | Low |
| 🟡 Medium | CodePipeline | 17 pipelines; 7 last configured in 2021–2022 (HPT-2.0, -develop, -hot-fix, -prd, -staging, -uat, revique-poc). CE CodePipeline $6.00 (~6 active pipelines @ ~$1). | Pipelines for retired branches may still count as 'active' and bill monthly. | Check each pipeline's last execution date; delete those with no run in 90+ days. | ≈ $4 / mo | Easy | Low |
Sum of itemised high+medium savings ≈ $105.51 USD/mo (rightsizing & cleanup), before the off-hours scheduling lever below.
4 · The big lever: schedule DEV off-hours
DEV compute runs 24/7 at <5% CPU
The MongoDB EC2 (0.57% CPU), Schema-Visualizer EC2 (0.21%), the db.t3.medium MySQL (4%) and both Fargate services (0.02–0.22%) all run around the clock — including nights and weekends when no one is in the office.
saved by running them business hours only (e.g. Mon–Fri 9am–7pm Pakistan time ≈ 50 of 168 hrs/week, ~68% reduction) via an EventBridge Scheduler + Lambda (or Instance/RDS scheduler).
| EC2 - Compute (2 instances) | $34.34 USD/mo |
| RDS db.t3.medium (MySQL) | $44.95 USD/mo |
| ECS Fargate (2 services) | $28.10 USD/mo |
| Schedulable compute total | $107.39 USD/mo |
| Est. saving @ ~68% off-hours | $73.03 USD/mo |
Note: Aurora Serverless v2 already auto-scales; lowering its min ACU toward 0 adds further off-hours savings. RDS stop/start auto-restarts after 7 days — use a scheduler that re-stops.
5 · If you only do 5 things
Ranked by saving ÷ effort.
- ≈ $73.03 USD/mo Schedule dev compute off-hours. EC2 (mongodb t3.medium @0.57% CPU, schema-visualizer t3.micro), RDS db.t3.medium (4% CPU) and the two Fargate services all run 24/7. Running them only Mon–Fri business hours (~50 of 168 hrs/week) cuts ~68% off $107.39 USD of compute.
- ≈ $30.00/mo Collapse 2 NAT Gateways → 1 in us-east-2. Drop nat-005e3dad36dde530d (or -036532e…), re-route both AZ private subnets to the survivor.
- ≈ $22.00/mo Remove / relocate the us-west-1 xray-service Fargate task (CPU 0.22%) and free its public IPv4. Eliminates an almost-idle workload running alone in a third region.
- ≈ $7.00/mo Add S3 lifecycle to the CodePipeline artifact buckets (461.8 GB + 35.8 GB, no expiry). Expire artifacts >30–90d and abort incomplete multipart uploads.
- ≈ $7.00/mo Release the idle Elastic IP (3.12.227.180, $3.31) and retire the 2021–22 stale pipelines (~$4) after confirming no recent executions.
6 · Appendix
Resource counts
| EC2 instances (us-east-2) | 2 |
| EBS volumes (us-east-2) | 2 |
| EBS snapshots owned (us-east-2) | 1 |
| Elastic IPs (us-east-2) | 5 |
| NAT Gateways (us-east-2) | 2 |
| NAT Gateways (us-east-1) | 1 |
| VPC endpoints (us-east-2) | 1 |
| RDS instances (all regions) | 2 |
| Aurora clusters (us-east-1) | 1 |
| ECS Fargate services (us-east-1 + us-west-1) | 2 |
| Customer-managed KMS keys (us-east-2) | 2 |
| S3 buckets (account-wide) | 37 |
| CloudWatch log groups (us-east-2) | 90 |
| CloudWatch alarms (us-east-2) | 4 |
| Application LBs (us-east-1) | 1 |
| CodePipelines | 17 |
| CodeBuild projects | 19 |
| CodeCommit repos | 14 |
Audit coverage & skipped steps
- AWS API calls: 264 total, 36 returned empty/not-available (no permission, no such resource, or feature not enabled).
- Compute Optimizer not enrolled/Active — rightsizing recs skipped.
- Trusted Advisor unavailable (requires Business/Enterprise Support plan).
- Compute Optimizer enrollment: Inactive — enabling it (free) would add AWS's own ML rightsizing recs.
- Cross-region: us-east-1 & us-west-1 were scanned because Cost Explorer showed Fargate, Aurora, ALB and a NAT Gateway billing outside us-east-2.
Raw audit data saved to dev-optimization-data.json for re-runs/comparison.
Wasteful resources detail
Unattached EBS volumes
- none found
Orphaned snapshots
- snap-00bb3ec4def08ae0e (8 GB, src vol-000ad959d1efd0b0d)
Idle Elastic IPs
- 3.12.227.180
Top S3 buckets by size
- v1-toolssetup-codepipelineartifactstores3bucket-1nb59ovu097p0 — 461.8 GB
- hpt-2.0-develop — 46.4 GB
- codepipeline-us-east-2-695553060848 — 35.8 GB
- hpt-2.0-uat — 17.7 GB
- hpt-2.0-prd — 5.7 GB
- hpt-2.0-staging — 4.4 GB