Command-line tool — Add compute and storage resources to existing applications.
Overview
Thefjall add command extends your existing applications with new compute or storage resources. It intelligently handles connections between resources and updates your infrastructure code.
Usage
Resource Types
Storage Resources
Add databases to your application:Compute Resources
Add compute services:Examples
Add Aurora Database
Add Lambda Function
Add ECS Service with Options
Options
| Option | Description | Example |
|---|---|---|
--app <name> | Target application | --app app |
--type <type> | Lambda function type | --type basic |
--name <name> | Custom resource name | --name OrderProcessor |
--subtype <type> | Resource subtype | --subtype spot |
-v, --verbose | Show detailed logs | fjall add -v |
Resource Subtypes
ECS Subtypes
fargate- Serverless containers (default)spot- Cost-optimised Spot instancesfreetier- t2.micro instances
Storage Types
aurora- Serverless Aurora for productioninstance- Traditional RDS instancesfreetier- Free tier RDS database
Connection Management
Automatic Connections
When adding resources, Fjall automatically:- Detects existing resources
- Prompts for connections
- Configures security groups
- Sets environment variables
Environment Variables
Connected resources receive automatic environment variables:Advanced Examples
Add Multiple Resources
Chain commands for complex setups:Cost-Optimised Setup
Use free tier and spot instances:Resource Naming
Fjall uses intelligent naming:-
Default naming:
appName + ResourceType- App:
app - Storage:
appStorage,appStorage1,appStorage2
- App:
-
Custom naming: Use
--nameflagfjall add storage:aurora --name Analytics- Creates:
appAnalytics
Best Practices
- Plan connections: Think about which resources need to communicate
- Use descriptive names: Help identify resources later
- Consider costs: Use spot/freetier subtypes for development
- Security: Only connect resources that need access
Post-Add Steps
After adding resources:- Review changes: Check the modified
infrastructure.ts - Deploy: Run
fjall deploy [app-name] - Verify: Use
fjall viewto check resource status
Troubleshooting
Connection Issues
If resources can’t connect:Naming Conflicts
If a resource name exists:- Fjall auto-increments:
storage,storage1,storage2 - Or use custom name:
--name UniqueStorage
Always run
fjall deploy after adding resources to apply changes to AWS.