APEX: 管理 Aws Lambda 的命令行工具
1. Official Website
http://apex.run/复制代码
2. Install
First Installcurl https://raw.githubusercontent.com/apex/apex/master/install.sh | shUpgrade your apexapex upgrade复制代码
3. Config
Here’s an example of ~/.aws/credentials:
[example]aws_access_key_id = xxxxxxxxaws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxx复制代码
Here’s an example of ~/.aws/config:
[profile example]output = jsonregion = us-west-2复制代码
4. Deploy
Deploy all functions$ apex deployDeploy specific functions$ apex deploy foo barDeploy all functions by environment(development)$ apex deploy -e developmentDeploy canary alias$ apex deploy foo --alias canaryDeploy functions in a different project$ apex deploy -C ~/dev/myappAlias all functions as "prod"$ apex alias prodAlias all "api_*" functions to "prod"$ apex alias prod api_*Alias all functions of version 5 to "prod"$ apex alias -v v5 prodAlias specific function to "stage"$ apex alias stage myfunctionAlias specific function's version 10 to "stage"$ apex alias -v v10 stage myfunctionDeploy alias and stage in the same time$ apex deploy -e development -a development复制代码