Serialization
The AWS lexicon serializes resources into CloudFormation JSON templates.
Building
Section titled “Building”Run chant build to produce a CloudFormation template from your declarations:
chant build# Writes dist/template.jsonThe generated template includes:
AWSTemplateFormatVersionheaderParameterssection (if any parameters are declared)Resourcessection with typed resource definitionsOutputssection for exported values- Full support for intrinsic functions (
Fn::Sub,Ref,Fn::GetAtt, etc.)
Deploying
Section titled “Deploying”The output is standard CloudFormation JSON. Deploy with any CF-compatible tool:
# AWS CLIaws cloudformation deploy \ --template-file dist/template.json \ --stack-name my-stack \ --capabilities CAPABILITY_IAM
# Rain (faster, with diff preview)rain deploy dist/template.json my-stack
# SAM CLI (if using serverless transforms)sam deploy --template-file dist/template.json --stack-name my-stackCompatibility
Section titled “Compatibility”The output is compatible with:
- AWS CloudFormation service (direct deployment)
- AWS SAM CLI
- AWS CDK (as an escape hatch via
CfnInclude) - Rain and other CloudFormation tooling
- Any tool that accepts CloudFormation JSON templates