Skip to main content

Introduction

carlin is a CLI tool for deploying AWS infrastructure using CloudFormation templates. It automates Lambda code building, S3 uploads, stack naming, multi-environment deployments, and CI/CD pipelines.

What is carlin?

carlin started in 2018 as deployment scripts for managing CloudFormation stacks across multiple environments (development, staging, production). After streamlining numerous deployments, we packaged these scripts into a unified CLI tool.

Today, carlin handles:

  • CloudFormation deployments with automatic stack naming
  • Lambda functions with code building and S3 uploads
  • Static websites via S3 and CloudFront
  • CI/CD pipelines with GitHub and Slack integration
  • Environment variables generation from stack outputs
  • Multi-environment configurations with termination protection
  • Deploy reports posted to GitHub PR comments via carlin deploy report

Why Use carlin?

Simplified AWS Deployments

Deploy CloudFormation stacks with a single command:

carlin deploy

carlin automatically:

  • Finds your CloudFormation template
  • Builds Lambda function code
  • Uploads to S3 with versioning
  • Creates or updates stacks
  • Displays outputs

Automatic Lambda Handling

No manual Lambda packaging—carlin detects Lambda functions in templates, builds code with esbuild, uploads to S3, and injects parameters automatically.

Multi-Environment Support

Deploy to multiple environments with built-in protection:

carlin deploy --environment Staging
carlin deploy --environment Production # includes termination protection

This supports the E6: U-curve Principle by balancing automation with safety controls.

Branch-Based Deployments

Test feature branches with automatic stack naming:

# On feature/auth branch
carlin deploy
# Creates: my-app-feature-auth

Infrastructure as TypeScript

Write CloudFormation templates in TypeScript with type safety and dynamic generation:

export const template = {
Resources: {
Bucket: {
Type: 'AWS::S3::Bucket',
Properties: {
BucketName: `my-app-${process.env.NODE_ENV}`,
},
},
},
};

Use Cases

Quick Start

Get started in 5 minutes:

  1. Install carlin:
pnpm add -D carlin
  1. Create CloudFormation template (cloudformation.ts):
export const template = {
Resources: {
MyBucket: {
Type: 'AWS::S3::Bucket',
},
},
Outputs: {
BucketName: {
Value: { Ref: 'MyBucket' },
},
},
};
  1. Deploy:
carlin deploy

Documentation Structure

  • Core Concepts - Stack naming, environments, base stack, templates
  • Commands - Complete command reference

Key Features

Community and Support