arc deploy

Deploys code to AWS.

Usage

arc deploy [--production|--static|--direct]

Flags

  • [--production, -p] Deploys a CloudFormation stack to a production stack.
  • [--static, -s] Deploys only the files in the static folder.
  • [--direct, -d path/to/function] Overwrite staging Lambda with local source. A faster way to deploy and test small changes to individual functions without redeploying an entire stack.
  • [--name, -n] Deploy a custom named staging stack.
  • [--tags, -t] Adds resource tags to the CloudFormation stack.
  • [--prune] Remove assets not present in the local static folder.
  • [--no-hydrate] Do not automatically run npm, bundle or pip
  • [--dry-run] Creates a CloudFormation template but does not deploy it. A dry-run allows you to check the CloudFormation and SAM output before deploying the actual stack.
  • [--verbose, -v] Displays the full deploy status messages.

Local preferences: @create

When deploying, Architect can automatically scaffold resources (via arc init) found in the application’s manifest that do not yet exist. Options are set with @create in local preferences.

  • autocreate - Set to true to 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

Protip: deploy arbitrary named staging stacks with arc deploy --name my-stack

Deploy a production stack

arc deploy --production

Deploy static assets to S3

arc deploy --static

Deploy code directly to the staging Lambda

arc deploy --direct src/http/get-index

Run deploy without deploying

This is useful for testing @macros; it will still generate sam.json.

arc deploy --dry-run