APEX: 管理 Aws Lambda 的命令行工具

APEX: 管理 Aws Lambda 的命令行工具

1. Official Website

http://apex.run/

2. Install

First Install
curl https://raw.githubusercontent.com/apex/apex/master/install.sh | sh

Upgrade your apex
apex upgrade

3. Config

Here’s an example of ~/.aws/credentials:

[example]
aws_access_key_id = xxxxxxxx
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxx

Here’s an example of ~/.aws/config:

[profile example]
output = json
region = us-west-2

4. Deploy

Deploy all functions
$ apex deploy

Deploy specific functions
$ apex deploy foo bar

Deploy all functions by environment(development)
$ apex deploy -e development

Deploy canary alias
$ apex deploy foo --alias canary

Deploy functions in a different project
$ apex deploy -C ~/dev/myapp

Alias all functions as "prod"
$ apex alias prod

Alias all "api_*" functions to "prod"
$ apex alias prod api_*

Alias all functions of version 5 to "prod"
$ apex alias -v v5 prod

Alias specific function to "stage"
$ apex alias stage myfunction

Alias specific function's version 10 to "stage"
$ apex alias -v v10 stage myfunction

Deploy alias and stage in the same time
$ apex deploy -e development -a development

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容