AWS 文档 SDK 示例
将 PutFunctionConcurrency 与 CLI 配合使用
以下代码示例演示如何使用 PutFunctionConcurrency。
- CLI
-
- AWS CLI
-
配置函数的预留并发限制
以下
put-function-concurrency示例为my-function函数配置了 100 个预留并发执行。aws lambda put-function-concurrency \ --function-namemy-function\ --reserved-concurrent-executions100输出:
{ "ReservedConcurrentExecutions": 100 }有关更多信息,请参阅《AWS Lambda 开发人员指南》中的为 Lambda 函数预留并发。
-
有关 API 详细信息,请参阅《AWS CLI 命令参考》中的 PutFunctionConcurrency
。
-
- PowerShell
-
- Tools for PowerShell V4
-
示例 1:本示例将函数的并发设置作为一个整体应用。
Write-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -ReservedConcurrentExecution 100-
有关 API 详细信息,请参阅《AWS Tools for PowerShell Cmdlet Reference (V4)》中的 PutFunctionConcurrency。
-
- Tools for PowerShell V5
-
示例 1:本示例将函数的并发设置作为一个整体应用。
Write-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -ReservedConcurrentExecution 100-
有关 API 详细信息,请参阅《AWS Tools for PowerShell Cmdlet Reference (V5)》中的 PutFunctionConcurrency。
-
PublishVersion
PutProvisionedConcurrencyConfig