Skip to main content

Overview

The Custom pattern starts your application as a blank canvas. Instead of a preset tier, you choose a network configuration, then add each compute, database, and storage resource yourself with fjall add.
Use Custom when no preset tier fits, when you are learning how Fjall composes resources, or when you need full control over the architecture.

Prerequisites

Interactive Flow

A Custom application is created in three short steps, then you add resources afterwards.
The review then confirms a blank canvas:
A Custom application does not prompt for compute, database, or storage during creation. Pick a network preset (or No network for standalone resources), confirm, then add resources with fjall add.

Adding Resources

Add each resource to the generated infrastructure.ts with fjall add <type> --name <PascalCaseName>. The --name is required and PascalCase.
Valid resource types: database, storage, compute, messaging, cdn, network, pattern, vpc-peer, vpc-peer-accepter, cross-plan-connection. Database variant is a property, not part of the type. Pass --type <variant> where the variant is one of Aurora, Instance, GlobalAurora, ClickHouse, or DynamoDB.

Building Custom Architectures

Each fjall add writes a factory call into infrastructure.ts. The examples below show the generated code for common architectures so you can see what each combination produces.

Microservices Architecture

Event-Driven Architecture

Batch Processing

Hybrid Architecture

Mix and Match Resources

The Custom pattern supports any combination of compute and database types.

When to Use

Choose Custom for:
  • Unique architectural requirements
  • Proof of concepts
  • Learning how Fjall composes resources
  • Maximum control over every resource
Choose a preset tier for:
  • Standard architectures (Standard or Resilient)
  • Quick deployment with opinionated defaults
  • Free experimentation (Tinkerer)

Tips

  • Plan your architecture before adding resources.
  • Start with one compute resource and add more incrementally.
  • Use PascalCase names that describe each resource (Api, UserDb, Uploads).
  • Match resource types to cost targets (t4g.micro instances and FARGATE_SPOT for low-cost workloads).

Common Custom Architectures

Next Steps

Compute Factory

ECS, Lambda, and EC2 options for compute resources.

Database Factory

Aurora, Instance, DynamoDB, and ClickHouse variants.

Storage Factory

Add S3 buckets to your application.

Deploy Application

Ship your custom architecture to AWS.