跳转至

AWS - 服务 - Lambda 和 API Gateway

列出 Lambda 函数 (List Lambda Functions)

aws lambda list-functions

调用 Lambda 函数 (Invoke a Lambda Function)

aws lambda invoke --function-name name response.json --region region 

提取函数代码 (Extract Function's Code)

aws lambda list-functions --profile uploadcreds
aws lambda get-function --function-name "LAMBDA-NAME-HERE-FROM-PREVIOUS-QUERY" --query 'Code.Location' --profile uploadcreds
wget -O lambda-function.zip url-from-previous-query --profile uploadcreds

列出 API Gateway (List API Gateway)

aws apigateway get-rest-apis
aws apigateway get-rest-api --rest-api-id ID

列出有关端点的信息 (Listing Information About Endpoints)

aws apigateway get-resources --rest-api-id ID
aws apigateway get-resource --rest-api-id ID --resource-id ID
aws apigateway get-method --rest-api-id ApiID --resource-id ID --http-method method

列出 API 密钥 (Listing API Keys)

aws apigateway get-api-keys --include-values

获取有关特定 API 密钥的信息 (Getting Information About A Specific Api Key)

aws apigateway get-api-key --api-key KEY

参考资料 (References)