Skip to main content
README.md2.5 KB
View on GitHub

Notes

This example deploys one AWS::SSM::Parameter resource through a CloudFormation component against a local Floci emulator. It requires Docker or Podman; no AWS account is needed.

The local stack declares the emulator. An aws/emulator identity in atmos.yaml connects the CloudFormation component to it, including the endpoint configuration. See Atmos emulators.

The example mirrors the Terraform emulator example using CloudFormation for the same resource lifecycle.

Usage

Before running the lifecycle, install Docker or Podman and Python 3 (python3 on PATH). The demo lifecycle hooks use Python 3 to record their events.

Create a short command alias in this project's atmos.yaml:

atmos config set aliases.cft "aws cloudformation"

Validate the stacks, start the sandbox, deploy, inspect outputs, then tear everything down:

atmos validate stacks # validate configuration before deployment
atmos emulator up aws -s local # start the shared local sandbox
atmos cft deploy demo -s local # create/update the stack (changeset-driven apply + auto-approve)
atmos cft output demo -s local # inspect the stack's Outputs

atmos cft delete demo -s local --auto-approve # delete the stack without prompting
atmos emulator down aws -s local # stop and remove the sandbox container

The configured cft alias forwards to aws cloudformation. The built-in aws cfn shorthand also works. To preview changes, use plan or diff; to print the template, use render; to validate it through CloudFormation, use validate.

Use atmos emulator list to see configured instances and atmos emulator ps to see running instances. Add -s local to filter either command to this stack.

The atmos test custom command validates the stacks and runs the full deploy/delete lifecycle end to end.