Up 0.6.0 — IAM Policies, Git Versioning, Deployment History, and more
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
AWS uses IAM policies to permit access to various operations against resources, such as allowing read-write access to DynamoDB.
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 the
up.json
.
Static Files for Dynamic Applications
Previously an Up project was either strictly static, or dynamic—now you can utilize static file serving for dynamic apps, Up will check if the file exists before passing control to your application.
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
Older versions required that you define a single env var per-command, however now you can set or remove many:
$ 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 Pro now integrates with Git, allowing you to view and roll-back to previous versions via the Git tag or SHA, for example:
$ up rollback -s production v1.9.0
$ up rollback -s production bd5950e
Deployment History
Up Pro uses the same Git integration to provide a deployment history so you can see who deployed to a stage, and when with up deploys
. The current version is denoted with the *
and works with up rollback
.
Annual Subscription
By popular demand an annual subscription plan for Up Pro is now available to help reduce paperwork, and save 10% while you’re at it! Check out the Subscribing to Up Pro guide to get started.
Miscellaneous
Additional small changes:
- Added default
proxy.command
for Go and Crystal soup start
“just works” - Added an
up prune
command to remove old versions from S3 - Added
--stage
to theup build
command - Added
--stage
to theup 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
, andurl
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!