←
AI for Government
Strategic · M8 · lesson 8 of 54 · queued
Preview — browse every lesson free. Enroll to mark lessons complete, open partner links and save your progress. Login & enroll →
AI Infrastructure Cost Optimization
📖
now learning

AI Infrastructure Cost Optimization

15 min

Learning Objectives

After completing this L4 lecture on AI Infrastructure Cost Optimization, you will be able to:

  • Build a defensible Total Cost of Ownership (TCO) model for a government AI workload that accounts for hardware, facilities, personnel, software, network egress, integration, compliance, and decommissioning costs over a five-year horizon.
  • Apply FinOps practices to federal cloud environments (AWS GovCloud, Azure Government, Oracle OCI FedRAMP High, Google Assured Workloads) and align them with OMB A-11, OMB M-19-03 Federal Data Strategy, and GSA Cloud Smart guidance.
  • Choose between build, buy, and rent using a decision framework keyed to FedRAMP boundary, FISMA impact level, NIST AI RMF Manage function controls, and the OMB M-24-10 requirement to inventory rights-impacting and safety-impacting AI.
  • Negotiate GPU capacity, reserved instances, savings plans, and commitment discounts through GSA MAS, SEWP V, NASA SEWP, and NITAAC CIO-SP3 vehicles, and document the cost basis so your CIO and CFO can defend it in a GAO audit.
  • Instrument workloads with tagging, showback, and chargeback so that each mission program understands the per-inference, per-training-run, and per-user cost of AI and can trade off accuracy for price in an explainable way.

Key Topics Covered

This 120-minute workshop is organized around six topics:

  1. Five-year TCO modeling for on-premises versus FedRAMP High commercial cloud.
    2. GPU economics: A100, H100, L4, and Trainium/Inferentia for federal workloads.
    3. Cloud cost anti-patterns: idle clusters, orphaned endpoints, egress sprawl, cross-region training, unbounded vector databases.
    4. Build-vs-buy-vs-rent matrices for large language models, computer vision, tabular ML, and retrieval-augmented generation.
    5. FinOps operating model: tagging taxonomies, monthly anomaly reviews, commitment portfolio management, and chargeback to mission programs.
    6. Policy alignment: OMB M-24-10, OMB Circular A-130, OMB M-22-18 (software supply chain), NIST AI RMF, NIST SP 800-53 Rev. 5, and GAO AI Accountability Framework.

THE FEDERAL AI SPEND PROBLEM

Federal AI spending tripled between FY2021 and FY2024, and the Government Accountability Office has repeatedly flagged that agencies cannot explain what they are getting for the money. GAO-22-105359 found that agencies often cannot separate AI spending from general IT spending, cannot attribute cloud bills to specific AI use cases, and cannot compare the unit economics of competing approaches. When OMB issued M-24-10 in March 2024, it made this worse by requiring agencies to maintain a use-case inventory of safety-impacting and rights-impacting AI. You cannot govern what you cannot cost, and you cannot cost what you have not tagged. An 18F engagement with a cabinet department found that a single generative AI pilot had spent 4.2 million dollars on GPU capacity before anyone in the CFO shop realized it was AI spending; it was invoiced as cloud compute under the enterprise AWS GovCloud contract and delivered three demos and no production workload before OMB passback cancelled it. This lecture exists so you do not become the next case study. The CIO, Chief AI Officer, Chief Data Officer, and Chief Financial Officer all have a stake in AI infrastructure cost. This lecture gives you the common vocabulary and the shared artifacts (TCO model, FinOps dashboard, build-buy-rent decision memo) that let those four roles make decisions together rather than blaming each other after the invoice arrives. The legal perimeter includes OMB Circular A-11 for budget formulation, OMB Circular A-130 for information resource management, OMB M-24-10 for AI inventory and risk categorization, OMB M-22-18 for software supply chain, FISMA under the Federal Information Security Modernization Act, the Clinger-Cohen Act and FITARA for CIO authority, the Antideficiency Act for appropriations discipline, and GAO-21-519SP for accountability evidence.

TCO, GPU ECONOMICS, BUILD-BUY-RENT, AND FINOPS SUMMARY

Total Cost of Ownership for a federal AI workload has seven buckets. Hardware: servers, GPUs (A100, H100, Blackwell), accelerators, storage, networking, and N+1/N+2 redundancy for FISMA High availability. Facilities: power and cooling, where an H100 draws 700W at peak and a 200-GPU cluster needs 140 kW and roughly 40 tons of cooling, often requiring facilities projects that add six to twelve months and one to three million dollars before training begins. Personnel: platform engineers, SREs, security engineers, data engineers, MLOps engineers, and program management, at a blended fully-loaded federal rate of roughly 220,000 dollars per person-year. Software: operating systems, Kubernetes distributions (OpenShift, Rancher, EKS), orchestration (Kubeflow, Airflow, Argo), MLOps platforms (SageMaker, Vertex AI, Databricks on GovCloud), monitoring (Datadog, New Relic, Splunk), and serving (TorchServe, Triton, vLLM). Network: egress, inter-region transfer, inter-cloud transfer, and TIC 3.0 inspection overhead. Integration: connecting AI platforms to mission systems, ICAM, PIV/CAC, CISA CDM logging, and financial systems, routinely 30 to 50 percent of first-year spend. Compliance and decommissioning: FedRAMP authorization and continuous monitoring, ATO sustainment, SOC 2 evidence, sanitization under NIST SP 800-88, and records disposition under NARA schedules.

GPU and accelerator economics dominate today. A single on-demand H100 on AWS GovCloud (p5.48xlarge) lists at roughly 98 dollars per hour in 2026, or about 860,000 dollars per year if left running; a three-year full upfront reservation cuts that to about 480,000 per year; Capacity Block reservations further reduce rates when training can be scheduled. For inference, H100s are usually wasted; L4, A10G, Inferentia2, Trainium, or TPU v5e handle most government retrieval-augmented generation workloads at a fraction of the cost. A pragmatic mix is roughly 40 percent reserved, 40 percent savings plan, 20 percent on-demand with quarterly rebalance, coordinated through GSA MAS, NASA SEWP V, and NITAAC CIO-SP3 or CIO-SP4.

Build-buy-rent decisions. BUILD on-premises when FISMA High data cannot leave the facility, sustained utilization exceeds 70 percent, engineering is mature (DISA, NSA, DoE national labs), and a five-year authorized budget is in place. BUILD on FedRAMP High cloud for elasticity, modest-but-capable engineering, bursty workloads, and CNCF-native portability. BUY managed services (SageMaker, Vertex AI, Azure AI) when you do not want to run infrastructure, the service meets FedRAMP High, and you accept the lock-in trade-off. RENT foundation-model APIs (OpenAI on Azure Government, Anthropic Claude on AWS Bedrock GovCloud, Google Gemini on Assured Workloads) when custom training is not required, data handling permits vendor processing with documented DPAs, and time-to-value is critical.

FinOps for federal AI has three phases. INFORM: tag every resource with program code, appropriation, CPIC investment ID, OMB M-24-10 use-case ID, environment, and data sensitivity. Untagged resources are presumed waste and subject to monthly termination review. OPTIMIZE: right-size monthly, move cold data to Glacier Deep Archive or Azure Archive, terminate orphans, apply savings plans to stable six-month-plus workloads. OPERATE: publish a monthly AI cost review co-chaired by the CIO and CFO, set guardrails in AWS Budgets or Azure Cost Management or GCP budgets, and integrate anomaly alerts into the SOC runbook because a cost anomaly is often a security anomaly (crypto mining on stolen credentials is the canonical example).

ANTI-PATTERNS and CASE STUDIES. Shadow GPU clusters purchased by research groups outside agency visibility; egress sprawl from training in cloud and serving on-premises with 180,000 dollars per month of first-month egress at one civilian agency; unbounded vector databases where Pinecone, Weaviate, or OpenSearch bills grow linearly with ingested SharePoint corpora; over-reserved capacity locked for three years on inflated forecasts. Case studies include IRS Login.gov reprocurement unit-economics benchmark, EPA ECHO bursty-workload elastic cloud savings, and SEC Consolidated Audit Trail storage-dominant TCO driving Parquet, partitioning, and tiered storage.

Why This Matters for Government

The Federal AI Spend Problem

Federal AI spending tripled between FY2021 and FY2024, and the Government Accountability Office has repeatedly flagged that agencies cannot explain what they are getting for the money. GAO-22-105359 found that agencies often cannot separate AI spending from general IT spending, cannot attribute cloud bills to specific AI use cases, and cannot compare the unit economics of competing approaches. When OMB issued M-24-10 in March 2024, it made this worse by requiring agencies to maintain a use-case inventory of safety-impacting and rights-impacting AI. You cannot govern what you cannot cost, and you cannot cost what you have not tagged.

An 18F engagement with a cabinet department found that a single generative AI pilot had spent $4.2M on GPU capacity before anyone in the CFO shop realized it was AI spending. It was invoiced as 'cloud compute' under the department's enterprise AWS GovCloud contract. The pilot delivered three demos and no production workload. The program was cancelled by OMB passback. This lecture exists so you do not become the next case study.

The CIO, Chief AI Officer, Chief Data Officer, and Chief Financial Officer all have a stake in AI infrastructure cost. This lecture gives you the common vocabulary and the shared artifacts (TCO model, FinOps dashboard, build-buy-rent decision memo) that let those four roles make decisions together rather than blaming each other after the invoice arrives.

Core Concept: Total Cost of Ownership

TCO is the sum of all direct and indirect costs over the useful life of an infrastructure asset. For a federal AI workload, TCO has seven buckets.

Hardware. Servers, GPUs, accelerators, storage, networking, and the N+1 or N+2 redundancy required to meet FISMA High availability targets. GPUs depreciate faster than general-purpose compute because generational leaps (V100 to A100 to H100 to Blackwell) shift the price-per-FLOP curve every 18 to 24 months.

Facilities. Power, cooling, space, and physical security. An H100 draws 700W at peak. A 200-GPU H100 cluster needs 140 kW of power and roughly 40 tons of cooling. For a federal data center, that often means a new PDU, new CRAC units, and a facilities project that adds six to twelve months and $1M to $3M before you train a single model.

Personnel. The hidden giant. A production on-premises AI platform needs platform engineers, SREs, security engineers, data engineers, MLOps engineers, and a program manager. At a blended federal rate of $220,000 fully loaded, a 10-person platform team costs $2.2M per year regardless of whether a single workload runs. Cloud shifts some of this cost to the provider but not all of it; you still need FinOps, platform, and security staff.

Software. Operating systems, Kubernetes distributions (OpenShift, Rancher, EKS), orchestration (Kubeflow, Airflow, Argo), MLOps platforms (SageMaker, Vertex AI, Databricks on GovCloud), monitoring (Datadog, New Relic, Splunk), and model-serving frameworks (TorchServe, Triton, vLLM). Commercial licenses stack quickly.

Network. Egress fees, inter-region transfer, inter-cloud transfer, and the TIC 3.0 traffic inspection overhead. A federal workload that moves 100 TB per month out of AWS GovCloud to an on-premises data lake pays roughly $9,000 per month in egress, plus whatever the TIC provider charges.

Integration. Connecting the AI platform to mission systems, IAM (ICAM, PIV, CAC), logging (CISA CDM), and financial systems. Integration is routinely 30 to 50 percent of the first-year spend and is almost always underestimated.

Compliance and decommissioning. FedRAMP authorization and continuous monitoring, ATO sustainment, SOC 2 evidence collection, and the eventual decommissioning of the workload, including data sanitization under NIST SP 800-88 and records disposition under NARA schedules.

GPU and Accelerator Economics

GPU pricing is the dominant driver of AI infrastructure cost today. A single on-demand H100 on AWS GovCloud (p5.48xlarge, 8 x H100) lists at roughly $98/hour in 2026, or $860,000 per year if left running. A three-year reservation with full upfront payment cuts that to roughly $480,000 per year. A Capacity Block reservation that guarantees capacity for a training run cuts the effective rate further if you can schedule training in advance.

For inference, the calculus is different. An H100 is wasted on most inference workloads. An L4 or an A10G handles most government retrieval-augmented generation workloads at one-quarter the cost. Inferentia2 and Trainium on AWS, or TPU v5e on Google Assured Workloads, are cheaper still for workloads that fit their compiler constraints. The question is not 'what is the fastest GPU' but 'what is the cheapest accelerator that meets the latency SLO.'

Reserved capacity is a commitment. If your mission needs shift, reservations become sunk cost. GSA's cloud acquisition guidance and OMB M-22-18 push agencies toward shorter commitments and portable workloads. A pragmatic mix is 40 percent reserved, 40 percent savings plan, 20 percent on-demand, with a quarterly rebalance.

Build, Buy, Rent: A Decision Framework

Build on-premises when: (1) FISMA High data cannot leave the facility per statute or mission policy; (2) sustained utilization exceeds 70 percent of a multi-rack cluster; (3) your agency has mature infrastructure engineering (DISA, NSA, DoE national labs); (4) you have a five-year authorized budget.

Build on FedRAMP High cloud when: (1) you need elasticity; (2) you have modest but capable engineering; (3) your workloads are bursty; (4) you want multi-cloud portability and can carry a CNCF-native architecture on Kubernetes.

Buy a managed service (SageMaker, Vertex AI, Azure AI) when: (1) you do not want to run infrastructure; (2) the service meets FedRAMP High; (3) you accept the lock-in trade-off; (4) your ATO strategy can inherit the provider's controls.

Rent foundation-model APIs (OpenAI on Azure Government, Anthropic Claude on AWS Bedrock GovCloud, Google Gemini on Assured Workloads) when: (1) you do not need custom training; (2) your data handling policy permits vendor processing with documented DPAs; (3) usage is variable; (4) you want time to value in weeks, not quarters.

The decision is rarely uniform across an agency portfolio. Most mature agencies run a mixed model: rent for generative AI chat assistants, buy for production vision and tabular ML, build on FedRAMP cloud for custom foundation model fine-tuning, and build on-premises for national-security-adjacent workloads. The job of the L4 architect is to make each choice explicit and defensible.

FinOps for Federal AI

FinOps is the operating model that keeps cloud costs under control after the architecture decision is made. The FinOps Foundation framework maps well to federal environments with some adaptation.

Inform phase. Tag every resource with program code, appropriation, CPIC investment ID, OMB M-24-10 use-case ID, environment (dev/test/prod), and data sensitivity. Untagged resources are presumed waste and are subject to monthly termination review. Stand up a cost-and-usage report ingested into a federal data warehouse (Snowflake on GovCloud, Redshift, or Postgres) and build showback dashboards per program.

Optimize phase. Right-size instances monthly based on CloudWatch, Azure Monitor, or GCP Cloud Monitoring data. Move cold data to S3 Glacier Deep Archive or Azure Archive. Terminate orphaned endpoints, idle SageMaker notebooks, unattached EBS volumes, and forgotten dev clusters. Apply savings plans and reservations to workloads with at least six months of stable history.

Operate phase. Publish a monthly AI cost review co-chaired by the CIO and CFO. Set spending guardrails with AWS Budgets, Azure Cost Management, or GCP budgets. Integrate FinOps anomaly alerts into the agency's SOC runbooks because a cost anomaly is often a security anomaly (crypto mining on stolen credentials is the canonical example).

Anti-Patterns and Case Studies

Anti-pattern 1: Shadow GPU clusters. A research group buys a DGX box under a single-award purchase, runs it in a closet, and the agency has no visibility into cost, security, or utilization. GAO has flagged this in multiple engagements. Mitigation: agency-wide AI platform with a chargeback model so research groups do not need to shadow-buy.

Anti-pattern 2: Egress sprawl. A mission program trains in AWS GovCloud and serves from an on-premises data center. Every inference pulls model weights across TIC. The first-month egress bill was $180,000 at one civilian agency. Mitigation: co-locate training and serving, cache at the edge, or move the data lake to the cloud.

Anti-pattern 3: Unbounded vector databases. A RAG pilot indexes every document in the agency's SharePoint. The Pinecone/Weaviate/OpenSearch bill grows linearly with the corpus while the marginal value per document decreases. Mitigation: tiered retrieval, document-age decay, and a corpus-governance board that curates what gets indexed.

Anti-pattern 4: Over-reserved capacity. The agency reserved 256 A100s for three years based on a forecast that assumed 2x growth per year. Growth was 1.2x. Half the reservation is idle. Mitigation: shorter reservation terms, laddered commitments, and savings plans that apply across instance families.

Case study: IRS ID.me reprocurement. After the 2022 ID.me controversy, the IRS pivoted to Login.gov. The cost model changed dramatically because Login.gov is a shared service operated by GSA with per-authentication pricing rather than a capacity-based private contract. Agencies that plan to build identity AI in-house should benchmark against Login.gov unit economics before committing capital.

Case study: EPA ECHO and environmental enforcement. EPA's ECHO platform handles very bursty analytical workloads during quarterly enforcement cycles. A naive always-on reservation wastes 70 percent of capacity. EPA's move to elastic cloud with spot and savings plans saved an estimated 45 percent while improving peak performance.

Case study: SEC consolidated audit trail (CAT). The SEC learned expensively that storage and query costs on a multi-petabyte event store dominate TCO. Columnar formats (Parquet), aggressive partitioning, and tiered storage are non-negotiable at SEC-scale data volumes.

Exercises and Deliverables

Exercise 1. Build a five-year TCO model for your most expensive AI workload. Include hardware, facilities, personnel, software, network, integration, compliance, and decommissioning. Compare on-premises, FedRAMP High cloud, managed service, and API rental. Identify the break-even utilization.

Exercise 2. Tag audit. Export last month's cloud bill. Classify every line item by program, environment, and AI use case per OMB M-24-10. Report the percentage of untagged spend. Draft a tagging remediation plan.

Exercise 3. Commitment portfolio review. List every reservation and savings plan expiring in the next 12 months. For each, decide renew, resize, or let lapse. Document the rationale so your CFO can defend it in a GAO audit.

Exercise 4. Build-vs-buy-vs-rent memo. Pick one upcoming AI initiative. Write a two-page memo with TCO, risk, and schedule across the four options. Route through your CIO, CAIO, CFO, and General Counsel.

Deliverable: a one-page AI Cost Optimization Plan that identifies three actions you will take in the next 90 days to reduce AI infrastructure cost by at least 20 percent without degrading mission outcomes.

Start Your CLUB Certification

This lecture is part of L4: AI Architect, 120 hours of comprehensive government AI training aligned with NIST AI RMF, OMB M-24-10, and GAO AI Accountability Framework. Explore CLUB Certification.

L4 4.1.1 Designing Agency-Wide AI Platforms (180 min)
L4 4.1.2 Multi-Cloud, Multi-Model Strategy (150 min)
L4 4.1.3 Data Mesh and Data Fabric for Government (150 min)
L4 4.1.6 Sovereign AI: Data Residency and National Security
L4 4.1.8 Technical Debt Management in AI