Skip to content

Atlas CLI

This section provides an overview of the commands that can be executed from the root of the API directory.

atlas cdk-bootstrap

Command that prepares the AWS environment for the specified account and region to enable deployments via CDK. Required for deploying Atlas-based APIs.

Options:

  • --account-id: AWS Account ID

  • --region: AWS Region

Example:

dotenv -f .atlas/.env.local run atlas cdk-bootstrap --account-id 012345678910 --region sa-east-1

atlas cdk-deploy

Deploys the API’s infrastructure to AWS using AWS CDK. This command synthesizes and applies all CloudFormation stacks defined by Atlas, provisioning the required resources such as Lambda functions, API Gateway endpoints, and permissions.

Options:

  • --use-local: Install Atlas in libs Lambda layer using a neighboring local source instead of the default remote source

  • --with: Extra dependencies for Atlas (e.g., aws,cdk,debug)

  • --domainless: Deploy the application to a nameless CloudFront domain

Example:

dotenv -f .atlas/.env.local run atlas cdk-deploy

atlas prepare-local-lambda-layers

Creates the API’s Lambda layers locally for debugging purposes. The generated layers are stored in /tmp/atlas/local/layers, and each execution replaces the previous ones.

Options:

  • --use-local: Install Atlas in libs Lambda layer using a neighboring local source instead of the default remote source

  • --with: Extra dependencies for Atlas (e.g., aws,cdk,debug)

Example:

atlas prepare-local-lambda-layers