aws-cloudformation

A set of rules for AWS CloudFormation, a service that describes and creates cloud infrastructure from YAML or JSON templates. It covers template structure, resources, parameters, dependencies, and protection policies.

In plain words
What is it for?
Use it when writing or reviewing CloudFormation templates, nested stacks, stack sets, resource definitions, parameters, outputs, and deployment settings.
Why use it?
It reduces inconsistent infrastructure definitions and helps make updates safer for resources that contain data.

Cursor rule for Cursor

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 rules/jimmypocock/cursor-rules/aws-cloudformation
Clone the repo
git clone --depth 1 https://github.com/jimmypocock/cursor-rules

Made for: Cursor.

Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 844 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.00005 $0.00844
Opus 5 $0.00003 $0.00422
Sonnet 5 $0.00001 $0.00169
Haiku 4.5 $0.00001 $0.00084

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

Security

Grade A, and why

aws-cloudformation 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 2d 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.

.cursor/rules/aws-cloudformation.mdc · 122 lines

How it starts

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


Description: AWS CloudFormation Development Standards Globs: **/.yaml, **/.yml, **/.json, **/.template

AWS CloudFormation Development Standards

@base.mdc

Template Structure

  • Organize templates with clear sections (Parameters, Mappings, Resources, Outputs)
  • Use a consistent logical resource naming convention
  • Add metadata for improved template documentation
  • Implement description fields for templates and resources
  • Group related resources together in the template
  • Keep templates modular and focused on specific components
  • Use nested stacks for complex architectures
  • Implement stack sets for multi-account/region deployments

Resource Definitions

  • Define resources with appropriate properties
  • Use intrinsic functions (Ref, GetAtt, etc.) appropriately
  • Implement resource dependencies correctly
  • Use DependsOn only when explicit dependencies are required
  • Configure deletion policies for stateful resources
  • Set up update policies for controlled updates
  • Implement creation policies for resource initialization
  • Use UpdateReplacePolicy to protect data during updates

Parameters

  • Define parameters for configurable values
  • Specify appropriate parameter types
  • Set default values when applicable
  • Add parameter descriptions for clarity
  • Implement parameter constraints (AllowedValues, Min/Max)
  • Group similar parameters using parameter groups
  • Organize parameters in a logical order
  • Use SSM Parameter Store references for sensitive values

Mappings

  • Create mappings for environment-specific configurations
  • Structure mappings with logical hierarchies
  • Implement region-specific configurations via mappings
  • Use mappings for instance types, AMIs, and similar variations
  • Document mapping structure and usage
  • Keep mappings updated with latest values
  • Use FindInMap function correctly
  • Implement proper fallbacks for mapping lookups

Conditions

  • Create conditions for resource inclusion/exclusion
  • Implement environment-specific conditions
  • Use conditions for feature toggles
  • Combine conditions logically when necessary
  • Document condition purpose and logic
  • Keep condition expressions readable
  • Test condition outcomes in different scenarios
  • Implement default behaviors for condition failure

Read the full file on GitHub · 122 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. 2d ago First seen · 122 lines · 5 tokens per session scan A 793a5e782d6a

Subscribe to this mod's changes

aws-cloudformation is a cursor rule published in the GitHub repository jimmypocock/cursor-rules (8 stars, last pushed 1y ago), licensed MIT. It adds 5 tokens to every session and 844 once invoked, about $0.0000 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-31.