Raxx · internal docs

internal · gated

AWS cost breakdown & attribution — shared account 521228113048

Prepared: 2026-08-02 UTC Author: sre-agent Scope: Infrastructure-budget Phase 1 — attribution, tagging, ranked cut list (analysis only) Account: 521228113048 (shared: Raxx CI infra + Avenue project, us-east-2 primary + us-east-1 Lightsail, region-swept) Credentials used: session AWS creds resolved to IAM user aws-developer-alpha (AdministratorAccess) — this is the account's actual active session identity; it is not claude-infisical-bootstrap as referenced in the task brief. Flagging so the operator can confirm which IAM user is the intended standing identity for this account (see Findings below). No resource changes, no deletions, no instance modifications were made. Cost-allocation tags were applied to previously-untagged resources and activated in Billing — both are additive, non-destructive, pre-approved Phase 1 actions.


TL;DR


1. Cost Explorer breakdown — last 2 full months + MTD

All figures are UnblendedCost, USD, pulled via aws ce get-cost-and-usage on 2026-08-02.

By SERVICE

Service June 2026 July 2026 Aug 2026 MTD (2 days)
EC2 - Other (NAT GW, EBS, regional transfer) $19.20 $187.17 $4.17
Amazon Virtual Private Cloud (endpoints, public IPv4) $5.64 $86.19 $3.00
Amazon Elastic Load Balancing $7.92 $48.83 $1.63
Amazon Relational Database Service $8.13 $41.86 $1.41
Amazon Elastic Container Service (Fargate) $8.71 $36.80 $1.19
AWS CloudTrail $1.21 $27.02 $0.78
Amazon EC2 - Compute (spot + on-demand) $0.00 $19.12 $0.11
AWS Key Management Service $3.19 $11.84 $0.39
AWS Secrets Manager $1.38 $8.48 $0.28
AWS WAF $0.00 $8.34 $0.29
Amazon Lightsail $1.56 $6.82 $0.61
Amazon Route 53 $1.01 $5.80 $1.18
Tax $0.50 $3.81 $0.18
AmazonCloudWatch $1.17 $2.89
CodeBuild $1.09 $2.39
Claude Opus 4.8 (Bedrock) $0.31 $1.70
Amazon S3 $0.17 $1.97 $0.09
AWS CodePipeline $0.00 $1.00 $1.00
Amazon ECR $0.01 $0.02
AWS Cost Explorer $0.00 $0.01
Total $61.20 $502.06 $16.31

The daily trend inside July (top-5 services: EC2-Other, VPC, ELB, RDS, ECS) shows a clean step-change from ~$6/day (Jul 1–3) to ~$11–17/day starting 2026-07-04 — the exact date the ci-woodpecker (Raxx CI, ADR-0134) stack went live in us-east-2.

Top-3 drivers (July, by $ and by usage type)

  1. EC2 - Other, $187.17 — dominated by NAT Gateway: hourly charges ($30.29 raxx / $66.96 avenue) and data processing ($66.89 raxx / $0.21 avenue). The raxx NAT gateway processed 1.49 TB in ~28 days on a CI fleet that has no image/dependency cache — this is the single biggest line item in the entire bill.
  2. Amazon VPC, $86.19VpcEndpoint-Hours ($53.76, raxx: 4 interface endpoints × 2 AZ, ec2messages/ssm/ssmmessages/logs) + public IPv4 hourly charges ($22.33 avenue / $10.09 raxx — the AWS-wide Feb-2024 $0.005/hr public-IPv4 charge, unavoidable while these ALBs/NAT gateways are internet-facing).
  3. Amazon ELB, $48.83 — 3 ALBs total: ci-woodpecker-alb (raxx, us-east-2, $15.17) + avenue-dev-api + avenue-staging-api (us-east-1, $33.65 combined).

Usage-type drill-down, other top services (July)


2. Resource → project attribution

Raxx (CI infra, ADR-0134, ci-woodpecker naming, us-east-2)

Resource Type Created Tags before this pass
nat-0cb9b22fda9da565e (ci-nat-gw) NAT Gateway 2026-07-03 Project=moosequest, Component=ci-woodpecker, ADR=ADR-0134, Card=4012
i-082ee835595d90ae0 (ci-woodpecker-server) EC2 t4g.small 2026-07-04 same scheme
i-0a656c6631ddc45b3 (ci-monitoring) EC2 t4g.small 2026-07-08 same scheme, Card=1022
~12 ephemeral ci-woodpecker-agent instances (spot c5a/c6a/c7a.xlarge, ASG ci-woodpecker-agents-asg) EC2 spot continuous scale-to-zero same scheme
ci-woodpecker-alb ALB 2026-07-04 same scheme
ci-woodpecker-pg15 (ci-woodpecker DB) RDS db.t4g.micro 2026-07-04 same scheme
ci-woodpecker-waf WAFv2 Web ACL same scheme
4 interface + 1 gateway VPC endpoint (ec2messages, ssm, ssmmessages, logs, s3) VPC Endpoints 2026-07-03 same scheme
raxx-ci-artifacts S3 2026-07-09 Project=moosequest, ADR=ADR-0136, Card=4108
moosequest-tf-state-us-east-2 S3 2026-07-03 Project=moosequest, Purpose=terraform-state
raxx-tickets (FreeScout) Lightsail instance pre-existing project=raxx, component=freescout, environment=prod
raxx-vault (Infisical) Lightsail instance pre-existing none — untagged
raxx-iac-state-prod S3 2026-05-21 none — untagged
raxx-support-attachments S3 2026-05-07 none — untagged
raxx-waf-logs-prod S3 2026-05-18 none — untagged

Avenue (avenue-* naming, us-east-1, dev + staging)

Resource Type Created
avenue-dev-nat-0, avenue-staging-nat-0 2× NAT Gateway 2026-06-17, 2026-06-26
avenue-dev-api, avenue-staging-api 2× ALB 2026-06-18, 2026-06-28
avenue-dev-postgres, avenue-staging-postgres 2× RDS db.t4g.micro 2026-06-17, 2026-06-26
avenue-dev, avenue-staging 2× ECS/Fargate cluster
avenue-trail, avenue-staging-trail 2× multi-region CloudTrail trail
11 KMS keys (alias/avenue-{dev,staging}-{feedback,logs,media,rds,secrets}, avenue-tf-state, avenue-tf-state-dr) KMS 2026-06-17 to 2026-07-05
22 Secrets Manager secrets (avenue/*, 2× RDS-managed rotation secrets) Secrets Manager 2026-06-17 to 2026-07-05
6 S3 buckets (avenue-{cloudtrail,tf-state,tf-state-dr,tf-plan-artifacts}*, avenue-{dev,staging}-{feedback,media}) S3 2026-06-17 to 2026-07-03
2 Route 53 health checks (against bdca7f-{dev,staging}-api.moosequest.app) Route 53

All Avenue resources are already fully tagged by their Terraform modules (project=avenue, env=dev\|staging, managed-by=terraform) — no gaps found.

Third tenant found — flagged, not tagged, not attributed

prototype-site-{dev,staging,prod}-{site,cflogs}-521228113048 (6 S3 buckets, us-west-1, CloudFormation-managed stacks named prototype-site-{dev,staging,prod}) and two Route 53 hosted zones (apl-project-monkey.net, boingboing-inc.net, $0.50/mo each = $1.00/mo) do not match Raxx or Avenue naming/tagging conventions anywhere in this account. Cost impact is immaterial (S3 buckets are near-empty; the zones are $1.00/mo total), but I did not guess an owner and did not tag these — misattributing a third project's resources as Raxx or Avenue would corrupt the cost-allocation data this whole exercise exists to produce. Operator: confirm ownership of these 8 resources before the next cost sweep folds them into either bucket.


3. Tags applied and cost-allocation activation

Applied via lightsail tag-resource / s3api put-bucket-tagging (additive, non-destructive — no existing tags were touched or removed):

Resource project service env
raxx-vault (Lightsail instance) raxx infisical-vault prod
raxx-vault-ip (static IP) raxx infisical-vault prod
raxx-vault-pre-cert-fix-20260723-2323 (snapshot) raxx infisical-vault prod
raxx-tickets (Lightsail instance) (already had project=raxx) freescout (added) prod (added)
raxx-tickets-ip (static IP) raxx freescout prod
raxx-tickets-backup-2026-07-{03..09} (snapshots) raxx freescout prod
raxx-iac-state-prod (S3) raxx terraform-state prod
raxx-support-attachments (S3) raxx support-attachments prod
raxx-waf-logs-prod (S3) raxx waf-logs prod

Deliberately NOT re-tagged: every ci-woodpecker-* and avenue-* resource, because they are Terraform-managed. Adding CLI-set tags on top of a Terraform-owned resource creates drift that the next terraform apply will silently revert, undoing the tagging work without anyone noticing. These resources are already comprehensively tagged by their modules; the gap is a key-casing inconsistency (see Finding below), not missing coverage.

Cost-allocation tags activated in AWS Billing (aws ce update-cost-allocation-tags-status, zero errors): project, Project, env, Environment, Component, component, managed-by, ManagedBy, Purpose, purpose, Name. All were inactive before this pass — Cost Explorer's tag-based cost views have never worked in this account until now. AWS documents up to 24h propagation before these appear queryable in Cost Explorer's tag filter.

Finding — tag key casing splits cost-allocation views: the ci-woodpecker Terraform module tags with Project (capital P); the avenue Terraform module tags with project (lowercase). AWS cost-allocation tags are case-sensitive keys — activating both (done above) works around it for this account, but any Cost Explorer report grouped by "the project tag" will silently miss all Raxx CI resources unless the operator also groups by Project. Recommend a follow-up ticket to standardize the CI Terraform module's tag key to lowercase project to match Avenue's convention (and the AWS-recommended lowercase convention) — not done here since it's a Terraform-file change, out of scope for this read/tag-only pass.


4. Ranked cut list — Phase 3 draft, nothing executed

Ordered by projected $/mo saved. No cut in this list weakens a security control without the risk explicitly stated. All are drafts for operator review; none were applied.

# Item Owner Current $/mo Proposed change Projected $/mo Risk Effort
1 Raxx CI NAT data processing — 1.49 TB/mo egress through NAT with no build cache sre-agent (Raxx CI) $66.89 Add a Docker layer / package-manager cache (ECR pull-through cache for base images + pip/npm cache in the existing raxx-ci-artifacts S3 bucket, reachable via the free S3 gateway endpoint already in place — no NAT cost) so repeat CI jobs stop re-pulling the same layers over NAT $66.89 → ~$25–35 (est., needs a week of post-change data to confirm) Low — pure caching, no security-control change Medium (Terraform + pipeline change, 1 ADR-0134 follow-up card)
2 Avenue CloudTrail trail consolidation — 2 multi-region trails both logging 100% of account activity Avenue (their call) $27.02 Consolidate to 1 multi-region trail covering both dev+staging (or confirm the second trail exists for a real access-isolation reason before touching it) ~$13.50 saved if consolidated Medium — verify neither trail is relied on for separate IAM-scoped log access before merging Low (if confirmed safe)
3 Raxx CI VPC interface endpoints — 2-AZ redundancy on a non-customer-facing box sre-agent (Raxx CI) $53.76 Collapse ec2messages/ssm/ssmmessages/logs interface endpoints from 2 AZ to 1 AZ (CI tooling, not prod/customer-facing — an AZ outage here means CI pauses, not a customer incident) ~$26.88 saved Low-medium — reduces HA of SSM Session Manager access to the CI box during a single-AZ event; do not apply the same change to any customer-facing VPC endpoint Low (Terraform var change)
4 Avenue dev/staging scheduled shutdown outside working hours — NAT + ALB + RDS + ECS all currently run 24/7 in a dev environment Avenue (their call — not Raxx's infra) ~$150–180 combined (NAT $67 + ALB $34 + RDS $29 + ECS $37, dev+staging) Stop/scale-to-zero NAT GW, ALB, ECS tasks, and RDS outside business hours (e.g., 8 hrs/day M–F ≈ 76% reduction) via scheduled Lambda or EventBridge ~$115–135 saved if fully scheduled Low technically, but this is Avenue's environment and Avenue's call — flagging the lever, not proposing to execute it Medium (needs an owner on the Avenue side)
5 KMS Avenue-key cleanup — 11 keys at ~$1/mo each, several per-purpose keys per env that could consolidate Avenue (their call) $11.84 Consolidate feedback/media/logs KMS keys per env (5 keys/env → 2–3/env) if Avenue's compliance posture allows shared-purpose keys ~$4–6 saved Low, but key consolidation has compliance implications Avenue should own Low
6 Lightsail snapshot retention (raxx-tickets) — 7 daily backups retained with no visible expiry sre-agent (Raxx) $1.77 (all snapshots, all buckets) Add a retention policy (e.g., keep 7 rolling, auto-delete after 14–30 days) via the existing backup automation <$1/mo None Low
7 S3 lifecycle policies — no IA/Glacier tiering anywhere in the account sre-agent + Avenue $1.97 total Add lifecycle rules on the CloudTrail-log and WAF-log buckets (both write-once, rarely-read) to transition to IA after 30 days, Glacier after 90 <$1/mo None Low
8 ALB → Cloudflare Tunnel for ci-woodpecker-alb — stated per the task's request for an honest security tradeoff sre-agent (Raxx CI), needs architect sign-off $23.51 (ALB $15.17 + WAF $8.34) + ~$7.44 of the public-IPv4 line Replace public ALB + AWS WAF with a Cloudflare Tunnel to the Woodpecker origin ~$30/mo Medium-high — this reverses a considered, recent decision. ADR-0134 explicitly chose ALB + AWS WAF + Google OIDC for the Woodpecker UI; a tunnel would drop AWS WAF managed-rule coverage and shift trust to Cloudflare's edge instead. Not a quick win — needs an ADR amendment, not a Phase-3 cut High

Not on this list, deliberately: downsizing the Raxx CI spot agent fleet or the t4g.small server/monitoring boxes. Compute is $19.12/mo of the $502.06 total — the cheapest line item in the whole stack. Cutting compute would save single-digit dollars while risking CI throughput; the actual overspend is 100% networking (NAT + VPC endpoints), which items #1 and #3 already address.

Path to $200–250/mo

Items #1–3 and #6–7 (the ones sre-agent can execute without needing another team's sign-off) total ~$95–105/mo in projected savings, bringing the account to roughly $395–405/mo — real progress, but not the stated $200–250 target on their own. Item #4 (Avenue dev/staging scheduling) is the only lever large enough to close the remaining gap, at ~$115–135/mo, and it is explicitly Avenue's infrastructure and Avenue's decision. The operator should treat #4 as the deciding factor for whether $200–250/mo is reachable this cycle, or whether the target needs to move to ~$300–320/mo pending Avenue's own environment-scheduling decision.


5. Findings for operator attention (not cuts — process/attribution gaps)

  1. Session credential mismatch. This pass ran as IAM user aws-developer-alpha (AdministratorAccess), not claude-infisical-bootstrap as referenced in the task brief and in project_aws_iam_state.md. Both have full admin. Confirm which is the intended standing identity — if aws-developer-alpha is a leftover/unexpected user, that's worth a separate IAM hygiene look.
  2. Third-tenant resources in the shared account (prototype-site-*, apl-project-monkey.net, boingboing-inc.net) — see section 2. Immaterial cost, but unattributed; confirm ownership.
  3. Tag key casing split (Project vs project) between the Raxx CI and Avenue Terraform modules — see section 3.
  4. ADR-0134's own "revisit when" trigger reads "Monthly EC2 cost exceeds $150/month." Taken literally (EC2 compute only), that trigger has NOT fired — compute is $19.12/mo. The actual overrun is against the ADR's stated whole-stack budget of ~$107/mo (VPC+ALB+WAF+IAM+RDS+agents), which the full-month-equivalent run rate of ~$254/mo breaches by 137%. Recommend the ADR's revisit trigger be reworded to cover total stack cost, not EC2-compute-only, so this class of overrun trips the trigger automatically next time.

References