Detailed setup

To work locally all you need is Node, any additional supported runtimes you plan to use, and the Architect CLI.

AWS deployment requirements

  1. Node for Architect
  2. Python for the AWS CLI
  3. Any additional supported runtimes you plan to use
  4. AWS CLI
  5. AWS credentials
  6. Architect CLI

Supported runtimes

Architect supports the following runtime versions:

  • Node 12.x using npm
  • Deno 1.6.x
  • Ruby 2.5 using bundle
  • Python 3.8 using pip3

Working locally with the Architect sandbox requires target runtimes to be available in your $PATH.

To change the default runtime add it to the app.arc under the @aws pragma:

# Valid runtimes: 
# - nodejs12.x (default)
# - deno
# - python3.8
# - ruby2.5

@aws
runtime python3.8

This setting can be overridden on a function-by-function basis with config.arc.

Architect supports the following standard AWS managed runtimes in live infra, but not while working locally (at present):

  • Go: 1.x,
  • .NET: 2.1
  • Java: 8

Architect can support any custom runtime in live infra using either Lambda Layers or Lambda container images.


AWS CLI

The AWS Command Line Interface is the main interface for interacting with all parts of AWS using your computer's terminal. Architect uses the AWS CLI to package and deploy CloudFormation. Follow this guide to installing the AWS CLI for your preferred environment.


Credentials

You'll need an Amazon Web Services account and credentials set up on your development machine. If you haven't done it before, here's a useful guide for Configuring the AWS CLI.

On *nix systems AWS Credentials are listed in:

~/.aws/credentials

Or on Windows systems:

C:\Users\USER_NAME\.aws\credentials

If that file doesn't exist, create it, and add something like the following (assuming you have multiple AWS accounts):

[default]
aws_access_key_id=xxx
aws_secret_access_key=xxx

[work]
aws_access_key_id=xxx
aws_secret_access_key=xxx

[personal]
aws_access_key_id=xxx
aws_secret_access_key=xxx

You will also need to set a default profile and region with the environment variables

  • AWS_PROFILE
  • AWS_REGION

To set these variables on Linux, macOS, or UNIX, use export in your ~/.bashrc (or equivalent shell configuration):

export AWS_PROFILE=work
export AWS_REGION=us-west-1

Or for Windows, add this to your PowerShell $profile:

$env:AWS_PROFILE='work'
$env:AWS_REGION='us-west-1'

If you prefer, you can also use: Control Panel » System » Advanced System Settings » Environment Variables.

Install Architect

The following command uses npm, the package manager for Node, to install Architect globally. This will allow you to use Architect in any directory on your computer.

npm i -g @architect/architect

Or, if you prefer, you can install Architect locally into a project:

npm init @architect ./testapp