Skip to main content
Interactive command — Guides you through selecting and deploying targets with real-time feedback.

Overview

The fjall deploy command deploys your infrastructure to AWS. It handles both organisation-level deployments (AWS Organization, SSO, accounts) and application deployments (compute, storage, networking).

Usage

fjall deploy [target] [options]

Deployment Types

Organisation Deployment

Deploy your AWS organisation structure:
fjall deploy organisation
This deploys:
  • AWS Organization root
  • Organisational units
  • Service control policies
  • Cost allocation tags

Platform Deployment

Deploy platform infrastructure:
fjall deploy platform
This deploys:
  • AWS SSO configuration
  • Shared services
  • IPAM pools
  • Transit gateways

Application Deployment

Deploy a specific application:
fjall deploy app
This deploys:
  • Application infrastructure (ECS, Lambda, etc.)
  • Databases (RDS, Aurora, DynamoDB)
  • Networking resources
  • Load balancers

Interactive Mode

Run without arguments for guided deployment:
fjall deploy
Prompts:
? What would you like to deploy today?
 Application - Cloud applications
    Organisation - AWS foundation

? Select application to deploy:
 app
    api-service
    web-frontend

Options

OptionDescriptionExample
-v, --verboseShow detailed deployment logsfjall deploy -v
--np, --no-promptSkip confirmation promptsfjall deploy --np
-i, --infra-onlyDeploy infrastructure onlyfjall deploy -i
-d, --deploy-onlyDeploy code only (applications)fjall deploy -d
--platformDeploy platform infrastructurefjall deploy --platform
--accountDeploy account infrastructurefjall deploy --account
--target <target>Non-interactive deploymentfjall deploy --target app

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

2. Infrastructure Synthesis

For each deployment:
  • Compiles TypeScript CDK code
  • Generates CloudFormation templates
  • Calculates resource changes
  • Identifies security implications

3. Deployment Preview

🚀 Deploying app...
 Build complete
 Synthesis complete

Resources to create:
  + AWS::ECS::Cluster (AppCluster)
  + AWS::ECS::Service (AppService)
  + AWS::RDS::DBCluster (AppDatabase)
  + AWS::ElasticLoadBalancingV2::LoadBalancer
  + AWS::EC2::SecurityGroup (3)

Security Changes:
  ⚠️  New IAM policies will be created

Deploy? (y/N)

4. Deployment Execution

Fjall:
  • Creates CloudFormation stacks
  • Monitors deployment progress
  • Handles dependencies automatically
  • Reports any errors immediately

5. Post-Deployment

After successful deployment:
  • Displays resource endpoints
  • Shows connection strings
  • Provides next steps
  • Updates local configuration

Examples

Deploy Organisation First Time

# Deploy organisation structure
fjall deploy organisation

# Deploy platform services
fjall deploy platform

# Deploy first account
fjall deploy account

Deploy Application

# Interactive selection
fjall deploy

# Direct deployment
fjall deploy app

# Skip prompts
fjall deploy app --np

Infrastructure vs Code Deployment

# Deploy infrastructure changes only
fjall deploy app --infra-only

# Deploy application code only (faster)
fjall deploy app --deploy-only

Understanding Output

Success Output

 Deployment complete!

Outputs:
  LoadBalancerURL: http://app-123456.us-east-1.elb.amazonaws.com
  DatabaseEndpoint: app-db.cluster-abc123.us-east-1.rds.amazonaws.com
  
Your application is now live! 🎉

Progress Indicators

AppStack | 0/12 | 10:45:23 AM | REVIEW_IN_PROGRESS
AppStack | 2/12 | 10:45:45 AM | CREATE_IN_PROGRESS | AWS::EC2::VPC
AppStack | 4/12 | 10:46:12 AM | CREATE_IN_PROGRESS | AWS::RDS::DBCluster
AppStack | 12/12 | 10:52:33 AM | CREATE_COMPLETE

Handling Failures

Common Issues

  1. Permission Denied
     User does not have permission to create IAM roles
    
    Fix: Ensure your AWS user has AdministratorAccess
  2. Resource Already Exists
     Stack with id AppStack already exists
    
    Fix: Use fjall destroy first or choose different name
  3. Invalid Credentials
     Unable to locate credentials
    
    Fix: Run fjall profile set to configure credentials

Recovery Steps

If deployment fails:
  1. Check the error - Read the specific error message
  2. View CloudFormation - Check AWS Console for details
  3. Rollback if needed - CloudFormation auto-rollback on failure
  4. Fix and retry - Address the issue and redeploy

Best Practices

  1. Always review changes - Check the deployment preview
  2. Deploy incrementally - Start with dev/staging environments
  3. Use verbose mode - Add -v for troubleshooting
  4. Keep backups - Ensure data is backed up before major changes

Next Steps

After deployment:
  • View resources: fjall view --app app
  • Check costs: fjall view cost --app app
  • Monitor logs: fjall view logs --app app
  • Add resources: fjall add storage:aurora --app app
First deployment typically takes 10-15 minutes. Subsequent updates are faster as only changed resources are modified.