arc deploy
Deploy an Architect project to AWS by creating or updating a CloudFormation Stack with resources declared in the project manifest.
CloudFormation Stack names are created from the name specified in the @app pragma and are unique to an AWS region. Changing the project name or region will create a new CloudFormation Stack.
Usage
arc deploy [flags]
Flags
--direct path/to/function: Directly deploy the specified Lambda. A faster way to deploy and test small changes to individual functions without redeploying an entire Stack.--dry-run: Generate a CloudFormation template but do not deploy it. A dry run allows you to check the CloudFormation and SAM output before deploying the actual stack.--eject: Generate a CloudFormation template but do not deploy it. Instead, print out theaws cloudformationCLI invocation to execute the deployment.--fast,-f: Deploy the stack, but do not block the process until deployment completed.--name,-n: Deploy a custom named staging Stack. E.g.--name CIwill deploy aAppnameStagingCICloudFormation Stack.--no-hydrate: Do not automaticallyhydratefunctions prior to deployment.--production,-p: Deploys a CloudFormation Stack to a production Stack. If not specified, will default to deploy to a staging Stack.--prune: Remove static assets deployed to S3 bucket not present in the local@staticfolder.--static,-s: Deploys only the files in the@staticfolder.--tags,-t: Adds resource tags to the CloudFormation stack. The required tag format iskey=value, e.g.--tags key1=value1 key2=value2--verbose,-v: Displays verbose logging.--debug,-d: Displays debug (and verbose) logging.
Local preferences: @create
When deploying, Architect can automatically scaffold resources (via init) found in the application’s manifest that do not yet exist. Options are set with @create in local preferences.
autocreate- Set totrueto enable automatic creation of boilerplate Lambda handlers and static assets if they do not exist.templates- Specify templates for automatic resource scaffolding.<pragma name> path/to/template.ext- Does not enable
autocreate
@create
autocreate true
templates
http path/to/template/http.js
events path/to/template/events.py
Examples
Deploy a staging Stack
arc deploy
Deploy a production Stack
arc deploy --production
Deploy a named staging Stack
arc deploy --name my-stack
💁 Named stacks use
stagingenvironment variables set with theenvcommand.
Deploy static assets to S3
arc deploy --static
Deploy the index route directly to staging
arc deploy --direct src/http/get-index
Run deploy without deploying
This is useful for testing @plugins; it will still generate sam.json.
arc deploy --dry-run