Up 0.6.0 — IAM Policies, Git Versioning, Deployment History, and more

TJ Holowaychuk
May 9, 2018 · 3 min read

Just a quick post highlighting some of the changes made since Apex Up v0.5.0!

If you’re unfamiliar with Up, it’s a command-line tool to help you deploy and manage near-infinitely scalable serverless web applications and APIs on AWS. You can deploy as many applications as you need, for the fraction of the price of other providers, with zero operational maintenance or manual scaling efforts.

IAM Policies

Up now allows you to specify additional policy statements for the Lambda function’s role as shown in the following snippet. Re-deploy and your permissions are applied!

{
"name": "myapp",
"lambda": {
"memory": 1024,
"policy": [
{
"Effect": "Allow",
"Resource": "*",
"Action": [
"dynamodb:Get*",
"dynamodb:List*",
"dynamodb:PutItem",
"dynamodb:DeleteItem"
]
}
]
}
}

Note that if you previously manually altered the function policy in the AWS console, these permissions should be moved to theup.json .

Static Files for Dynamic Applications

Pass the dir of your static files, with an optional prefix used on the client-side for requesting. In the following example /static/css/style.css would resolve to ./public/css/style.css .

{
"name": "app",
"static": {
"dir": "public",
"prefix": "/static/"
}
}

Environment Variable Improvements

$ up env set DB_URL=xxx DB_NAME=xxx
$ up env rm DB_URL DB_NAME

The up start command now supports local overrides as well, so the following will now expose DB_NAME to your program.

$ DB_NAME=test up start

This works great with direnv, a popular tool for local repo-specific environment variable management.

Git Integration

$ up rollback -s production v1.9.0
$ up rollback -s production bd5950e

Deployment History

Annual Subscription

Miscellaneous

  • Added default proxy.command for Go and Crystal so up start “just works”
  • Added an up prune command to remove old versions from S3
  • Added --stage to the up build command
  • Added --stage to the up run command
  • Added robots.txt to deny access to non-production stages by default
  • Added stage-level overrides for Lambda warming configuration
  • Added support for explicitly specifying the DNS zone, or omitting it
  • Changed logs , metrics , and url to use --stage instead of arg
  • Changed --since short flag to -S (-s is used for stage now)
  • Removed automatic retries on 5xx errors

Check out the GitHub repo or head over to the Slack chat to join us if you have any questions or suggestions!

TJ Holowaychuk

Written by

Code. Photography. Art.