CloudFormation Operational Commands
Detailed command guidance for the CloudFormation skill.
Changesets
diff/plan and apply/deploy manage changesets implicitly. For manual, two-phase control (e.g.
create + review in one CI job, execute in another), use the explicit verb group:
atmos aws cloudformation changeset create vpc -s devatmos aws cloudformation changeset list vpc -s devatmos aws cloudformation changeset execute vpc -s dev --changeset-name=<name>atmos aws cloudformation changeset delete vpc -s dev --changeset-name=<name>
changeset execute and changeset delete prompt for confirmation (skip with --auto-approve), same
as top-level apply/delete. Change-set creation expands macros/transforms (Fn::Transform, SAM);
CAPABILITY_AUTO_EXPAND has no effect here. It is required for direct macro-based CreateStack/
UpdateStack calls without change-set review. Declare applicable CAPABILITY_IAM/CAPABILITY_NAMED_IAM
acknowledgments in capabilities: independently.
Apply, diff, and delete behavior
- apply/deploy order: create changeset, print predicted changes (stderr), then confirm, then execute. A
no-op changeset (CloudFormation's
FAILED"didn't contain changes") is deleted and reported asNo changes; the stack-policy, termination-protection, and Outputs follow-ups still run. Changeset names areatmos-<stack>-<timestamp>(theatmos-prefix is not repeated for stacks already namedatmos-...). - Never-deployed stacks: the first CREATE changeset makes CloudFormation register an empty
REVIEW_IN_PROGRESSstack.diff/plan, a declinedapply, a failed changeset, and a changeset that cannot be executed delete that stub (only when this run created it and it is stillREVIEW_IN_PROGRESS); a pre-existing stack is never deleted.changeset createkeeps the changeset and its stub on success (execute needs them) but deletes a no-op or failed one (No changes; changeset not kept). - ROLLBACK_COMPLETE: the first create failed and CloudFormation cannot update the stack.
apply/diff/changeset createfail withaws/cloudformation stack is in ROLLBACK_COMPLETE and cannot be updatedand a hint:atmos aws cloudformation delete <component> -s <stack>, then apply again. Atmos never deletes it. - Targets: publish-only
aws/s3printsPublished template to s3://... (TemplateURL: https://...)and recordspackage_s3_uri/package_url; external targets print the delivered file and target; anaws/stacksettarget is rejected (applycannot deliver to it) with a hint to usestackset create|update --target <name>. - delete: prints
Deleted stack <name>after the stream ends with the stack'sDELETE_COMPLETE; a missing stack (also with--retain-resources) prints<name> does not exist; nothing to deleteand exits 0; aDELETE_FAILEDresult hints--retain-resources=<failed logical IDs>; termination protection and a--retain-resourcesoutsideDELETE_FAILEDeach have their own error.stackset deleteof a missing StackSet is the same idempotent no-op;changeset delete --changeset-name <unknown>is a not-found error with a hint tochangeset list. output --all --format=json|yamlprints one document keyed by stack, then component;tableprints a<component> in stack <stack>:title above each table.
Observability: tree, logs, watch
atmos aws cloudformation tree vpc -s dev # nested-stack/resource dependency graphatmos aws cloudformation logs vpc -s dev [--chart] [--follow] # combined event log across nested stacksatmos aws cloudformation watch vpc -s dev # attach to an in-progress (or terminal) operation
logs --chart renders a per-resource timeline instead of a flat chronological list; --follow
tails new events continuously and is mutually exclusive with --chart. watch is for attaching to
an operation already in progress — including one started outside Atmos — distinct from the live
streaming apply/deploy/delete already show while they run.
Deployed-Stack Retrieval
atmos aws cloudformation get template vpc -s dev [--original]atmos aws cloudformation get policy vpc -s dev
get template answers "what's actually deployed right now" via GetTemplate (--original fetches
the user-submitted body and prints it byte-for-byte as returned; the default processed body is
re-serialized as YAML); get policy fetches the live stack policy via GetStackPolicy. Both map a
missing stack to a stack-not-found error with a hint. This is the inverse of render (local-only) — useful for drift
investigation and for inspecting a stack before adopting it into Atmos management (stack
import/adoption itself is not supported).
Output details
output <component> <key>prints only that Output value, bare and pipeable. With--format=jsonoryaml, the value is encoded. A missing key fails and lists the available keys. The key cannot be combined with--all,--affected,--tags, or--labels.- A stack that is not deployed is an error, for
output,!aws.cloudformation.output, andatmos.Component(...).outputs. Not deployed meansREVIEW_IN_PROGRESS,ROLLBACK_*,CREATE_FAILED, orDELETE_*. - A deployed stack with no Outputs prints
Stack <name> has no outputsfor the table format. Structured formats still print an empty document, so stdout stays parseable. - An unsupported
--formaterror names the value and lists the valid formats. JSON is written without HTML escaping, so<MASKED>appears literally. - In bulk runs, JSON and YAML print one document keyed by stack, then component. Table output titles each component.