Create a CloudFormation Artifact

Convert existing AWS CloudFormation templates into Bluebricks packages.

Prerequisites

  • Bluebricks CLI installed

  • Authenticated with Bluebricks (bricks login)

  • Existing CloudFormation template (JSON format)

  • AWS account with appropriate IAM permissions

Quick Start

  1. Prepare your CloudFormation template:

    • Must be named bluebricks.json

    • Must be in JSON format (YAML not supported)

  2. Run blueprint prepare:

    # Option 1: In-place (keeps original files)
    bricks blueprint prepare --source . --iac-type cloudformation
    
    # Option 2: With output directory (copies files to src/cloudformation/)
    bricks blueprint prepare --source . --output ./dist --iac-type cloudformation
  3. Verify the generated package:

    ls -la
    # In-place: Shows bricks.json + original files
    # With output: Shows bricks.json + src/cloudformation/ directory
  4. Publish the package:

    bricks blueprint publish

That's it! Your CloudFormation template is now a Bluebricks package ready for deployment.

Template Requirements

File naming:

  • Template must be named exactly bluebricks.json

  • Must be in JSON format (not YAML)

File handling:

  • Files are copied to src/cloudformation/ when using the --output flag

  • In-place preparation keeps files in their original location

Example structure:

Example bluebricks.json:

What Happens

Bluebricks automatically:

  • Analyzes your CloudFormation template

  • Extracts Parameters and maps them to props

  • Extracts Outputs and maps them to outs

  • Generates optimized bricks.json

  • Copies template to src/cloudformation/ when using the --output flag

Generated Package Structure

After preparation (in-place):

After preparation (with output directory):

Example generated bricks.json:

Test Your Package

See also

Last updated

Was this helpful?