home / skills / partme-ai / full-stack-skills / cloudformation

cloudformation skill

/skills/cloudformation

This skill guides you in creating and managing AWS CloudFormation templates and resources as code, with best practices for scalable infrastructure.

npx playbooks add skill partme-ai/full-stack-skills --skill cloudformation

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
696 B
---
name: cloudformation
description: Provides comprehensive guidance for AWS CloudFormation including template creation, stack management, resources, and best practices. Use when the user asks about CloudFormation, needs to define AWS infrastructure, create CloudFormation templates, or manage AWS resources as code.
license: Complete terms in LICENSE.txt
---

## When to use this skill

Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]

## How to use this skill

[待完善:根据具体工具添加使用指南]

## Best Practices

[待完善:根据具体工具添加最佳实践]

## Keywords

[待完善:根据具体工具添加关键词]

Overview

This skill provides comprehensive guidance for AWS CloudFormation, helping you define, deploy, and manage AWS infrastructure as code. It covers template authoring, stack lifecycle operations, resource configuration, and common troubleshooting. Use it to build repeatable, version-controlled infrastructure and adopt best practices for security and cost control.

How this skill works

The skill inspects your CloudFormation goals and current architecture and then suggests template structures, resource definitions, and parameterization patterns. It generates or reviews CloudFormation YAML/JSON snippets, explains intrinsic functions and mappings, and recommends stack management commands. It also highlights potential pitfalls like circular dependencies, drift, and IAM over-permissioning.

When to use it

  • When defining AWS infrastructure as code for reproducible deployments.
  • When creating or reviewing CloudFormation templates (YAML or JSON).
  • When planning stack updates, rollbacks, or change sets for safe deployments.
  • When auditing templates for security, cost efficiency, or compliance issues.
  • When troubleshooting stack failures, drift, or resource creation errors.

Best practices

  • Use modular templates and nested stacks to separate concerns and improve reusability.
  • Parameterize environment-specific values and store secrets in AWS Secrets Manager or SSM Parameter Store, not plain text.
  • Use ChangeSets to preview updates and avoid accidental destructive changes.
  • Apply least-privilege IAM for resources and avoid broad wildcard permissions in templates.
  • Enable stack policies and drift detection for critical resources and maintain template version control.

Example use cases

  • Generate a VPC, subnets, and security groups with public and private routing in YAML.
  • Create an autoscaling group with launch template, health checks, and CloudWatch alarms.
  • Migrate manual AWS resources into CloudFormation by reverse-engineering current state.
  • Review a template to identify IAM permission risks and suggest safer policies.
  • Prepare a multi-account deployment pattern using cross-account roles and SSM parameters.

FAQ

Can this skill produce complete CloudFormation templates?

Yes. It can generate full YAML/JSON templates or focused resource snippets based on your requirements and best practices.

Will it handle template validation and error diagnosis?

It can validate logical structure, point out common syntax and semantic errors, and suggest fixes, but you should run aws cloudformation validate-template and test in non-production first.

How does it help with secrets and credentials?

It recommends using AWS Secrets Manager or SSM Parameter Store and shows how to reference secure parameters in templates rather than embedding sensitive values.