Skip to main content
Fjall provisions and deploys AWS infrastructure from TypeScript you own. This page takes you from an empty directory to a running application.

Prerequisites

  • AWS account: create one if you do not have one
  • Node.js 22+: download (the fjall package declares engines.node >=22.0.0)
  • npm: included with Node.js
  • Fjall account: sign up

Quick Start

Fjall’s single-account setup is three commands in a fixed order: create, connect, deploy. Run every command from the same project directory.

1. Install the CLI

Verify the installation:

2. Log in to Fjall

The CLI checks for saved credentials, then starts the browser device-code flow. When credentials already exist it asks “You already have credentials saved. Overwrite them?” and defaults to No. While it waits for the browser, press E to type an API key instead. For CI and other non-interactive shells, pass the key directly:
Credentials land in ~/.fjall/auth.json, or in $FJALL_CONFIG_DIR/auth.json when you relocate the state root.

3. Create the account project

This scaffolds fjall/account/infrastructure.ts, the declaration of everything Fjall manages in one AWS account, and records your primary region against the organisation. It writes files only, so no AWS resource exists yet.

4. Connect your AWS account

fjall connect installs Fjall’s OIDC trust in the AWS account. Interactively it asks up to three questions first: The CLI then runs four steps: Checking existing connections, Opening AWS CloudFormation, Waiting for CloudFormation, Validating OIDC connection. It opens your browser on a CloudFormation Quick Create page and prints the URL as a fallback. Review the stack, choose Create stack, and the CLI detects the connection on its own. Pass --no-wait to return at the browser hand-off instead of blocking, then confirm later:

5. Deploy account infrastructure

This provisions the account tier: deploy roles, logging, monitoring, compliance, and the container registry. Run it once per AWS account. Tier deploys use the noun-verb form. fjall deploy takes application names only, so fjall deploy account fails with an error naming the correct spelling.

6. Create your first application

The wizard opens on “Choose your starting point?”, then asks for the application name, the database, and the services, and shows a review before writing anything. --name pre-fills the name. --type <tier> pre-selects the tier in the picker rather than skipping the prompt. Add --non-interactive to run without prompts. After the review confirm, the CLI settles the deployment target. It prompts when your organisation derives more than one target, auto-selects when exactly one exists, and skips the step when none do. Two files record the outcome: The binding is what makes the project born bound. A command run here later with another organisation’s credential is refused rather than landing in the wrong account. fjall create app --target <name> chooses the target non-interactively.

7. Deploy

The first deployment takes 10 to 15 minutes while AWS provisions every resource. Later deployments are faster. On completion the CLI lists next steps, including your application URL:
Tier-based applications run on ECS behind an Application Load Balancer, so the URL is an ALB DNS name. Put a custom domain in front of it with fjall domain.
For multi-account setups, run fjall create organisation in place of step 3, then continue with fjall connect (step 4) and fjall org deploy in place of fjall account deploy. The order stays create, connect, deploy. See the Organisation Guide.

Choose a tier

Each tier configures compute, networking, and database resources for one use case. The picker shows all six options at once, in the order below. Standard is the recommended starting point. Resilient requires a Pro plan and Enterprise requires an Enterprise plan. Picking a gated tier without the entitlement shows the plan message and offers to select a different tier. Create an application on a specific tier:
On a terminal this still opens the wizard with Tinkerer pre-selected. Add --non-interactive to skip the prompts.

Patterns

Patterns scaffold a framework-specific application through a separate flow, reached from interactive fjall create by choosing Patterns. The picker lists the two deployable patterns: Payload then offers four tiers: Standard, Lightweight, Resilient, and Custom. Static site skips tiers and asks for its source directory, build command, and output directory instead. --pattern has a long form only, with no -p short flag, and it only takes effect in non-interactive mode. The wizard drops pattern flags and lands in the six-tier picker, so pair --pattern with --non-interactive:
staticsite requires all three of its inputs:
The nextjs pattern is not deployable, so the picker does not offer it and --pattern nextjs is refused at create time. Use --pattern payload for a Next.js application, or --pattern staticsite for a pre-built static export.

What happens during deployment

When you run fjall deploy api, the CLI:
  1. Authenticates with AWS using credentials minted for the resolved target
  2. Synthesises CloudFormation templates from your infrastructure code
  3. Bootstraps the CDK toolkit stack (first run only)
  4. Builds your application and pushes Docker images to ECR
  5. Presents a plan and waits for approval
  6. Deploys the network, storage, database, and compute stacks
  7. Reports the application URL and next steps
The approval gate is on by default in a terminal. The CLI renders the plan one row per resource change (+ create, ~ update, ± replace, - delete), then asks “Approve this plan and deploy?” with No as the default. Rejecting the plan changes nothing. Pass --skip-confirmation or --auto-approve in CI. Destructive rows add a per-resource typed-name consent step that no flag bypasses. See Destructive Changes. When nothing changed since the last deploy, the run ends early and reports the application as already up to date.

Troubleshooting

Command not found

Solution: put the npm global bin directory on your PATH:

AWS credentials error

Solution: check the connection:
fjall connect verifies an existing connection or starts a new one. Expired credentials trigger a re-authentication prompt on your next deployment command.

Deployment timeout

First deployments take 10 to 15 minutes. If a deploy times out, check the CloudFormation console for stack status, then retry:

Need help?

Next Steps

Add Resources

Extend your application with databases, storage, and messaging

Deploy an Application

Learn the full deploy surface, flags, and safety gates

CLI Reference

Browse every Fjall command

Targets and Profiles

Understand deployment targets, accounts, and regions