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
网友评论