Interactive command. Guides you through selecting and deploying targets with real-time feedback.
Overview
fjall deploy ships your infrastructure to AWS. It handles organisation-level deployments (AWS Organization, SSO, accounts) and application deployments (compute, storage, networking).
Prerequisites
- Logged in with
fjall login. - An AWS account connected with
fjall connect. - In organisation mode, an active deployment target selected with
fjall target set <name>.
Usage
Deploy Targets
target accepts an application name, one of organisation, platform, or account, or domain <name>. All are standalone deployable targets.
Cascade behaviour
organisation cascades: it deploys the organisation infrastructure, then the platform and every member account. Opt out with --no-cascade to deploy the organisation stack alone.
platform and account never cascade. Each deploys its own stack only.
Deploying a domain
fjall deploy domain <name> routes through the same operation as
fjall domain deploy <name> — the two
spellings have identical flags and exit semantics.
Domain-specific semantics:
--allow-replaceis rejected on domain deploys — not silently dropped. Consent to takeover rows with--remediate '<name>/<TYPE>'=recreate— or--remediate '<name>/<TYPE>@<setIdentifier>'=recreatewhen the live record set carries a SetIdentifier (weighted, latency, and failover variants are classified and consented per variant).- Exit
4means the takeover consent was withheld: success-shaped, nothing released, nothing deployed. See Destructive Changes. --planruns the same two-step as application deploys — a domain plan additionally prints any record-takeover ticket, exits2when changes are pending approval (nothing mutated), and resumes via--approval-token.
Interactive Mode
Run without arguments for guided deployment:Deploy Organisation, Platform and Accounts?). Choosing Platform or Account deploys that single stack immediately with no cascade prompt.
Options
Plan and approval options
Destructive-change consent options
These satisfy the destruction gate when a deploy would destroy or replace a stateful resource:-e, --environment <env> does not select an account or region. It is an optional free-form label for CI/CD that flows into CDK synthesis as a context value. The account is chosen by the active target (or --target), not by --environment.Choosing the Deploy Account
In organisation mode, the account a deploy lands in is the active deployment target, an account plus region pair named<accountname>-<regionabbrev> (for example production-us-use1).
At deploy time the account resolves in this order:
- The per-deploy
--target <name>flag, when present. - Otherwise the
activeTargetstored infjall-config.json. With exactly one target it is selected automatically; with several you must runfjall target setfirst.
Deployment Process
1. Pre-flight Checks
Fjall validates:- AWS credentials and permissions
- Target exists and is valid
- Required dependencies installed
- No conflicts with existing resources
- The stacks are not wedged by resources deleted outside CloudFormation (a confirmed out-of-band deletion blocks the deploy and points you at
fjall drift)
2. Infrastructure Synthesis
For each deployment, Fjall:- Compiles the TypeScript CDK code
- Generates CloudFormation templates
- Calculates resource changes
- Identifies security implications
3. Deployment Preview
If the computed plan would destroy or replace a stateful resource, the
deploy stops at an unconditional gate before anything is applied and asks
for consent by exact resource name. No flag skips it. See Destructive
Changes.
4. Deployment Execution
Fjall creates the CloudFormation stacks, monitors progress, handles dependencies, and reports errors immediately.5. Post-Deployment
After a successful deployment, Fjall displays resource endpoints, connection strings, next steps, and updates local configuration.Examples
Deploy the organisation first time
Deploy an application
Infrastructure vs code
Fjall image tags are content-addressed:
<service>-sha-<12 hex chars of the image digest>. Find the tags for an application in its ECR repository (AWS
console or aws ecr list-images). Tags like v1.4.2 are not produced by
Fjall builds and will not resolve.Understanding Output
Success output
Progress indicators
Handling Failures
Common issues
-
Permission denied
Fix: Give your AWS user
AdministratorAccess. -
Resource already exists
Fix: Run
fjall destroyfirst, or choose a different name. -
Invalid credentials
Fix: Run
fjall connectto re-establish your AWS connection, orfjall loginto re-authenticate with Fjall.
Recovery steps
If a deployment fails:- Read the error for the specific failure message.
- Check CloudFormation in the AWS Console for stack-level detail.
- Roll back if needed (CloudFormation auto-rolls-back on failure).
- Fix and retry once you have addressed the issue.
Exit Codes
Best Practices
- Review changes before confirming the deployment preview.
- Deploy incrementally, starting with non-production targets.
- Use verbose mode (
-v) for troubleshooting. - Back up data before major changes.
Next Steps
List resources
Inspect the resources in an application’s infrastructure.
Add resources
Add a database, storage, or compute resource.
Manage secrets
Store and read application secrets in AWS.
Understanding Profiles
See how auth and account selection are derived.
First deployment typically takes 10-15 minutes. Subsequent updates are faster as only changed resources are modified.