Infrastructure as Code

Infrastructure as Code is a skill for Claude Code, Codex from robisson/build-like-amazon-agent-skills. It costs 40 tokens per session (4,037 once invoked), scanned A, original, MIT.

A way to define servers, storage, networks, permissions, and monitoring in version-controlled code. Infrastructure as Code lets teams review and deploy these settings like application code, while immutable infrastructure replaces servers instead of patching them in place.

In plain words
What is it for?
Use it to create or change development, testing, and production environments; manage cloud services and permissions; and apply reproducible cost or incident fixes.
Why use it?
It prevents environments from drifting apart and makes infrastructure changes repeatable, reviewable, and easier to recover.

Skill for Claude CodeCodex

Part of the build-like-amazon plugin — 28 skills, 14 commands, 10 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/robisson/build-like-amazon-agent-skills/infrastructure-as-code
Any agent
npx skills add robisson/build-like-amazon-agent-skills --skill infrastructure-as-code
Clone the repo
git clone --depth 1 https://github.com/robisson/build-like-amazon-agent-skills

Made for: Claude Code, Codex.

Or install build-like-amazon, the plugin that ships this one along with the rest of its 28 skills, 14 commands, 10 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Infrastructure as Code

README.md
[![agentmods](https://agentmods.dev/badge/skills/robisson/build-like-amazon-agent-skills/infrastructure-as-code.svg)](https://agentmods.dev/skills/robisson/build-like-amazon-agent-skills/infrastructure-as-code)
Your own site
<a href="https://agentmods.dev/skills/robisson/build-like-amazon-agent-skills/infrastructure-as-code"><img src="https://agentmods.dev/badge/skills/robisson/build-like-amazon-agent-skills/infrastructure-as-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,037 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00040 $0.04037
Opus 5 $0.00020 $0.02018
Sonnet 5 $0.00008 $0.00807
Haiku 4.5 $0.00004 $0.00404

Measured 5d ago against content hash 940478890f1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Infrastructure as Code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/infrastructure-as-code/SKILL.md · 397 lines

How it starts

The opening of the file, as written. The whole thing — 397 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Infrastructure as Code

Overview

Infrastructure as Code (IaC) means every piece of infrastructure—compute, storage, networking, permissions, monitoring—is defined in version-controlled code that can be reviewed, tested, and deployed through the same pipeline as application code. There is no "clicking in the console." There are no snowflake environments. The code IS the infrastructure, and the infrastructure IS the code.

Immutable infrastructure means you never patch in place. You replace. A server is never SSH'd into and modified; it is destroyed and rebuilt from the code. This eliminates configuration drift, makes deployments predictable, and ensures every environment is reproducible.

When to Use

  • Always. All infrastructure must be defined in code. There are no exceptions.
  • When creating a new service or microservice
  • When modifying any infrastructure component (networking, IAM, storage, compute)
  • When setting up a new environment (dev, staging, production)
  • When responding to an incident that requires infrastructure changes
  • When optimizing costs (changes must be in code so they're reproducible and reviewable)

Amazon Context

At Amazon, teams own their infrastructure end-to-end. There is no separate "ops team" that provisions resources. The team that builds the service provisions, deploys, monitors, and operates the infrastructure. CDK (Cloud Development Kit) and CloudFormation are the primary tools, with CDK preferred for new projects because it provides type safety, composition, and testing capabilities that raw CloudFormation templates lack.

Infrastructure changes go through the same code review and deployment pipeline as application code. A CDK change that modifies IAM permissions gets the same scrutiny as a code change that handles authentication. In many ways, it deserves MORE scrutiny—a bad IAM policy can expose the entire account.

The Process

1. Immutable Infrastructure

Principles
  • Never modify running infrastructure. To change a server's configuration, create a new server with the new configuration and destroy the old one.
  • No SSH in production. If you need to SSH in, your automation is incomplete. Fix the automation.
  • Identical artifacts across environments. The same AMI/container image deployed to dev is deployed to production. Only configuration (env vars, secrets references) differs.
  • Rebuild from scratch regularly. If you can't destroy and recreate your entire environment from code in under an hour, your IaC is incomplete.

Read the full file on GitHub · 397 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 397 lines · 40 tokens per session scan A 940478890f1f

Subscribe to this mod's changes

Infrastructure as Code is a skill published in the GitHub repository robisson/build-like-amazon-agent-skills (14 stars, last pushed 3mo ago), licensed MIT. It adds 40 tokens to every session and 4,037 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

google-cloud-solution-guided-gke-ai-migration

Guides the migration of existing AI workloads (Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted GKE inference using gcloud and kubectl. Use when the user has an existing AI inference workload (on Cloud Run, the Gemini API, Gemini Enterprise Agent Platform, or a custom VM) and wants to move it to…

google/skills · 157 tokens

gke-alert-configuration

Configures alerting policies in Terraform for Google Kubernetes Engine (GKE) clusters, workloads, and services using PromQL and Google Cloud Managed Service for Prometheus. Use when writing, analyzing, validating, or deploying Terraform alerting policies to monitor GKE service latency, traffic, error rates using…

google/skills · 120 tokens

google-cloud-solution-n-tier-serverless-web-app

Assists in designing and implementing secure n-tier serverless web applications and microservices on Google Cloud. Use when users need architecture designs, security checklists, Terraform code, or deployment guidance for multi-tier serverless apps, regional data residency / European sovereignty compliance, zero-trust…

google/skills · 91 tokens

cloud-run-basics

Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs), or handle always-on pull-based background processing (worker pools).

google/skills · 53 tokens

managed-airflow-dag-troubleshooting

Provides guidance for troubleshooting Apache Airflow DAGs (failed DAG runs and task instances) in Managed Service for Apache Airflow (MSAA; formerly Cloud Composer). Use when figuring out reasons for DAG run or task instance failures. Don't use when looking for overall recommendations for Managed Airflow environment…

google/skills · 68 tokens

cloud-monitoring-list-time-series-request

Generates valid Cloud Monitoring ListTimeSeries requests and aggregation specifications from metric descriptors and resource parameters. Use when asked to create, generate, format, or build ListTimeSeries requests, JSON payloads, filter expressions, or aligner/reducer aggregations for Cloud Monitoring metrics and…

google/skills · 74 tokens