AWS Skill Pack

A skill pack for cost review, IAM least-privilege checks, and safe resource changes via the AWS CLI.

⚡ intermediate
⏱️ 90 minutes
👤 SuperML Team

· Agentic AI · 5 min read

📋 Prerequisites

  • Terraform Skill Pack (previous lesson)

🎯 What You'll Learn

  • Build a Reviewer skill that flags likely-wasteful AWS resources from CLI output
  • Build a Validator skill that checks IAM policies for overly broad permissions
  • Apply the allowed-tools frontmatter field to constrain an AWS-facing skill

What This Pack Covers

Two skills: one that reviews AWS resources for likely cost waste, and one that checks IAM policies for permissions broader than they need to be. AWS is the domain in this course where Security and Governance’s allowed-tools field earns its place most clearly — a skill with unrestricted AWS CLI access is a meaningfully bigger risk than one explicitly scoped to read-only calls.

Skill 1: aws-cost-review

---
name: aws-cost-review
description: Reviews AWS resources for likely cost waste — unattached EBS volumes, idle EC2 instances, and unused Elastic IPs. Use when the user asks to review AWS costs, find unused resources, or audit spend.
metadata:
  version: "1.0.0"
allowed-tools: Bash(aws ec2 describe*) Bash(aws cloudwatch get-metric-statistics*)
---

## Available commands (read-only)

- `aws ec2 describe-volumes --filters Name=status,Values=available` —
  volumes not attached to any instance (billed, unused)
- `aws ec2 describe-instances` — cross-reference against CloudWatch CPU
  metrics to identify instances that are running but consistently idle
- `aws ec2 describe-addresses` — Elastic IPs not associated with a
  running instance (AWS bills for these when unattached)

## Review checklist

1. **Unattached EBS volumes.** List every volume with no attachment,
   its size, and an estimated monthly cost based on its type and size.
2. **Idle instances.** For running instances, check average CPU
   utilization over the past 14 days via CloudWatch. Flag anything
   consistently under 5% as a likely candidate for downsizing or
   termination — but note this needs a human to confirm the workload
   isn't intentionally bursty or a standby/failover instance.
3. **Unattached Elastic IPs.** List every Elastic IP not currently
   associated with a running instance.

Report total estimated monthly waste across all findings, not just a
list — the aggregate number is usually what actually prompts action.

## Constraints

This skill only reads resource and metric data. It never terminates,
stops, or releases anything — report findings and let the user decide
and act.

Pattern: Reviewer — assessing existing resources against cost-efficiency criteria and reporting findings, per Skill Design Patterns. The allowed-tools field pre-approves only the specific read-only AWS calls this skill needs, so a future edit can’t quietly add a terminate-instances call without that change being visible in the frontmatter diff — exactly the governance mechanism described in Security and Governance.

Skill 2: aws-iam-least-privilege-check

---
name: aws-iam-least-privilege-check
description: Reviews an IAM policy document for overly broad permissions — wildcard actions, wildcard resources, and missing conditions on sensitive actions. Use when reviewing a new IAM policy, or when the user asks if a policy follows least privilege.
metadata:
  version: "1.0.0"
---

## Review checklist

1. **Wildcard actions.** Flag any `"Action": "*"` or a service-level
   wildcard like `"s3:*"` — these grant far more than almost any real
   use case needs. Suggest the specific actions the described use case
   actually requires instead.
2. **Wildcard resources.** Flag any `"Resource": "*"` paired with a
   write or delete action — read-only wildcards are lower risk than
   destructive-action wildcards, and the review should reflect that
   difference in severity.
3. **Missing conditions on sensitive actions.** Actions like
   `iam:PassRole` or `sts:AssumeRole` without a `Condition` block are
   a common privilege-escalation vector — flag these specifically, not
   just generically as "broad permissions."
4. **Full admin policies.** Flag any policy attaching
   `AdministratorAccess` or an equivalent full-access managed policy to
   anything other than a small, explicitly justified set of break-glass
   roles.

Report every finding with the specific line from the policy document, not
just a general summary — a policy review that says "this policy is too
broad" without pointing at exactly which statement is unhelpful.

Pattern: Validator, checking a structured policy document against a fixed rule set — but notice this is the first Validator in this course working over structured JSON/policy syntax rather than prose or code, which is worth testing deliberately (below), since a skill correctly parsing plain-language content doesn’t guarantee it correctly parses a nested JSON policy document.

Testing Both Skills

For aws-cost-review, the aggregate cost estimate is the part most worth checking carefully — test against a scenario with several findings and confirm the total is actually computed correctly, not just each finding reported in isolation. For aws-iam-least-privilege-check, test against a policy with an obvious "Action": "*", one with a subtler wildcard resource paired with a write action, and one that’s already reasonably scoped — confirm the well-scoped policy gets a clean pass rather than the skill finding something to flag regardless, a failure mode worth checking for any Validator skill, not just this one.

Summary

  • aws-cost-review is a Reviewer flagging unattached volumes, idle instances, and unused Elastic IPs, scoped via allowed-tools to read-only calls
  • aws-iam-least-privilege-check is a Validator catching wildcard actions/resources, missing conditions on sensitive actions, and inappropriate admin-access grants
  • allowed-tools matters more here than in earlier packs, since AWS CLI access spans everything from harmless reads to genuinely destructive account-level changes
  • Test that a well-scoped, clean input actually passes cleanly — not just that bad input gets caught

Next, a different kind of pack — scaffolding and debugging LangGraph state machines, for teams building agents rather than just using them.

Part of a structured course

Agent Skill Library: Build Real, Reusable Skills

A project-based course — build eight real, production-quality Agent Skills for Python, SQL, GitHub, Kubernetes, Terraform, AWS, LangGraph, and banking compliance, then compose them into one agent.

Lesson 6 of 9 ⏱ 5 weeks intermediate Free

Related Tutorials

⚡intermediate ⏱️ 120 minutes

Banking Skill Pack

An enterprise skill pack for transaction review, KYC/AML documentation checks, and regulatory-aware validation.

Agentic AI6 min read
agent skillsbankingfintech +4
⚡intermediate ⏱️ 90 minutes

GitHub Skill Pack

A skill pack for pull request hygiene, issue triage, and release notes using the GitHub CLI.

Agentic AI5 min read
agent skillsgithubskill pack +1
⚡intermediate ⏱️ 90 minutes

Kubernetes Skill Pack

A skill pack for diagnosing pod failures, reviewing manifests, and safe rollout procedures.

Agentic AI5 min read
agent skillskubernetesskill pack +1
⚡intermediate ⏱️ 90 minutes

LangGraph Skill Pack

A skill pack for scaffolding LangGraph state machines, node design, and graph debugging.

Agentic AI5 min read
agent skillslanggraphskill pack +1