Static

Get the URL of a static assset


Install runtime helpers for Node

cd path/to/lambda
npm init -f
npm install @architect/functions

Install runtime helpers for Ruby

cd path/to/lambda
bundle init
bundle install --path vendor/bundle
bundle add architect-functions

Install runtime helpers for Python

cd path/to/lambda
pip install --target ./vendor architect-functions

Get the URL for an asset on S3

Node

let arc = require('@achitect/functions')

let avatar = arc.static('/avatar')

Ruby

require 'architect/functions'

avatar = Arc.static '/avatar'

Python

import arc.static

avatar = arc.static('/avatar')