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 withfjall add.
Prerequisites
| Requirement | Detail |
|---|---|
| Fjall CLI | Installed and authenticated (fjall login) |
| Node.js | Version 22 or later |
| AWS account | Connected via fjall connect |
Interactive Flow
A Custom application is created in three short steps, then you add resources afterwards.No network for standalone resources), confirm, then add resources with fjall add.
Adding Resources
Add each resource to the generatedinfrastructure.ts with fjall add <type> --name <PascalCaseName>. The --name is required and PascalCase.
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
Eachfjall 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
- 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.microinstances andFARGATE_SPOTfor low-cost workloads).
Common Custom Architectures
| Architecture | Resources to add |
|---|---|
| API + worker | compute Api (ECS Fargate), compute Worker (ECS Fargate Spot), database SharedDb (Aurora) |
| Static site + API | compute Web (Lambda with function URL), compute Api (ECS Fargate), database AppDb (Instance) |
| Data pipeline | compute Ingest (Lambda), compute Process (ECS Fargate Spot), database Store (Aurora) |
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.