npx deploy

Deploys code in /src to staging. If ARC_DEPLOY=production is set, the code in /src will be deployed to production. (A lot of other things happen under the hood, outlined below.)

If the local .arc file has defined (and created) @static buckets, then the contents of .static are deployed to the appropriate S3 bucket. More about working with static assets here.

Looking under the hood at deploy

arc's deploy process does a number of things during each deploy! In summary:

  • Checks for valid package.json & package-lock.json files in each function
  • Removes each function's local node_modules folder and does a fresh install of all modules
  • Populates each function with arc shared code via /src/shared
  • Compresses and uploads each function directory to its corresponding Lambda

Reminder: All arc NPM scripts require profile and region variables set, either as environment variables or in @aws within your .arc manifest. Learn more in the Prerequisites guide.