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. Before synthesizing the stacks, it stores the application's environment variables directly in AWS Systems Manager Parameter Store as a SecureString, preventing their values from being embedded in the CloudFormation template. It then provisions the required resources such as Lambda functions, API Gateway endpoints, and permissions.
If deployment fails, Atlas restores the previous environment document. The deployment credentials must allow ssm:GetParameter, ssm:PutParameter, and ssm:DeleteParameter for the application's /atlas/<app-name-kebab>/environment parameter. Running CDK synthesis or diff commands does not write or update this parameter.
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