Skip to content

CLI Commands

Install globally (recommended):

Terminal window
npm install -g @effortless-aws/cli

CLI available as effortless or short alias eff:

Quick start

Terminal window
# Deploy everything defined in your project
eff deploy
# Check what's deployed
eff status
# Remove a specific handler's resources
eff cleanup --handler createUser --all

Typical workflow

  1. Write handlers using defineApi, defineTable, etc.
  2. If handlers use param() for secrets — run eff config to set missing values
  3. Run eff deploy — creates all AWS resources automatically (warns about missing parameters)
  4. Remove or rename a handler → run eff deploy again (stale API routes are cleaned up)
  5. To remove orphaned Lambdas/tables, run eff cleanup to see what’s left, then eff cleanup --all to delete

deploy

Deploy handlers to AWS. See Architecture → Deploy Algorithm for the full flow.

Terminal window
eff deploy [target] [options]

Without target, deploys all handlers matching patterns from effortless.config.ts. With target, deploys a specific handler by name or file path.

Terminal window
# Deploy all handlers from config
eff deploy
# Deploy a specific file
eff deploy ./src/api.ts
# Deploy a specific handler by name
eff deploy createUser

Options:

FlagAliasDescriptionDefault
--project <name>-pProject name (or name in config)from config
--stage <name>-sDeployment stage"dev"
--region <name>-rAWS region"eu-central-1"
--verbose-vShow detailed output

What happens during deploy:

  • Creates or updates Lambda functions, IAM roles, and related resources for each handler
  • Creates or updates Lambda Function URLs for API handlers
  • Creates or updates DynamoDB tables for table handlers
  • Creates or updates SQS queues for FIFO queue handlers
  • Uploads static sites to S3 + CloudFront
  • Removes stale Lambda Function URLs that no longer have a matching handler
  • Creates a shared dependency layer from dependencies in package.json
  • Warns about missing SSM parameters declared via param() (see config)

status

Compare handlers in your code with what’s deployed in AWS. See Architecture → Resource Discovery for how resources are found.

Terminal window
eff status [options]

Discovers handlers from your code and queries AWS resources by tags, then shows the diff:

  • new — handler exists in code but hasn’t been deployed yet
  • deployed — handler is in both code and AWS (shows last deploy time, memory, timeout)
  • orphaned — handler exists in AWS but was removed from code
Status for my-app/dev:
new [api] createUser POST /api/users
deployed [api] listExpenses GET /api/expenses 3m ago 256MB 30s
deployed [table] expenses 1h ago
orphaned [api] oldHandler
API: https://xxx.lambda-url.eu-central-1.on.aws
Total: 1 new, 2 deployed, 1 orphaned

Options:

FlagAliasDescriptionDefault
--project <name>-pProject name (or name in config)from config
--stage <name>-sDeployment stage"dev"
--region <name>-rAWS region"eu-central-1"
--verbose-vShow detailed output

logs

Stream CloudWatch logs for a handler.

Terminal window
eff logs <handler> [options]

Shows recent logs from the handler’s Lambda function. Use --tail to continuously poll for new logs.

Terminal window
# Show recent logs (last 5 minutes)
eff logs processOrder
# Tail logs in real time
eff logs processOrder --tail
# Show logs from last hour
eff logs processOrder --since 1h

Lambda metadata (request IDs, START/END/REPORT lines) is stripped for readability. Only the actual log output is shown.

Options:

FlagAliasDescriptionDefault
--tail-fContinuously poll for new logs
--since <duration>How far back to start (5m, 1h, 30s)"5m"
--project <name>-pProject name (or name in config)from config
--stage <name>-sDeployment stage"dev"
--region <name>-rAWS region"eu-central-1"
--verbose-vShow detailed output

cleanup

Delete deployed resources. See Architecture → Resource Discovery for how resources are found by tags.

Terminal window
eff cleanup [options]

Lists all resources tagged by Effortless and deletes them. Requires either --all or --handler to actually delete — without them, just shows what would be deleted.

Terminal window
# Preview what would be deleted
eff cleanup --dry-run
# Delete all resources for the project
eff cleanup --all
# Delete resources for a specific handler
eff cleanup --handler createUser
# Clean up layer versions
eff cleanup --layer --dry-run
eff cleanup --layer --all
# Clean up orphaned IAM roles
eff cleanup --roles --dry-run
eff cleanup --roles --all

Options:

FlagAliasDescriptionDefault
--handler <name>-hDelete only this handler’s resources
--layerClean up Lambda layer versions
--rolesClean up orphaned IAM roles
--allDelete all found resources (required without --handler)
--dry-runShow what would be deleted without deleting
--project <name>-pProject name (or name in config)from config
--stage <name>-sDeployment stage"dev"
--region <name>-rAWS region"eu-central-1"
--verbose-vShow detailed output

config

Manage SSM Parameter Store values used by your handlers. See Architecture → Three-Phase Pattern for how config params flow from code to runtime.

Handlers declare config parameters via config: { stripeKey: param("stripe/secret-key") }. The CLI discovers all declared parameters from your code and helps you create, list, and update them in AWS.

Terminal window
# Interactive setup — prompts for each missing parameter
eff config
# List all parameters and their status
eff config list
# Set a specific parameter
eff config set stripe/secret-key

Default (interactive setup)

Terminal window
eff config [options]

Discovers all param() declarations from your handlers, checks which SSM parameters exist, and interactively prompts for missing ones. Each value is stored as SecureString.

Missing parameters (my-service / dev)
? /my-service/dev/stripe/secret-key (checkout): sk_test_...
✓ created
? /my-service/dev/webhook-secret (checkout): whsec_...
✓ created
Created 2 parameter(s) (SecureString)

Empty input skips the parameter.

list

Terminal window
eff config list [options]

Shows all declared parameters with their status:

Config parameters (my-service / dev)
✓ checkout /my-service/dev/stripe/secret-key set
✗ checkout /my-service/dev/webhook-secret missing
1 missing — run eff config to set them

set

Terminal window
eff config set <key> [options]

Create or update a specific parameter. The full SSM path is built automatically: /${project}/${stage}/${key}.

Terminal window
eff config set stripe/secret-key --stage prod
# prompts for value, stores as SecureString at /my-service/prod/stripe/secret-key

Options (all subcommands):

FlagAliasDescriptionDefault
--project <name>-pProject name (or name in config)from config
--stage <name>-sDeployment stage"dev"
--region <name>-rAWS region"eu-central-1"
--verbose-vShow detailed output

layer

Show or build the dependency layer. See Architecture → Lambda Layer for how layers are built internally.

Effortless automatically creates a shared Lambda layer from your dependencies in package.json. Only rebuilt when dependencies actually change.

Terminal window
# Show layer info (default)
eff layer
# Build layer locally for debugging
eff layer --build

Options:

FlagAliasDescriptionDefault
--buildBuild layer directory locally
--output <dir>-oOutput directory (with --build)".effortless"
--verbose-vShow all packages