英文:
How to configure "Maximum concurrency" for AWS SQS in aws_lambda_event_source_mapping
问题
在Terraform中,如何设置aws_lambda_event_source_mapping
的最大并发数,使用SQS?
英文:
In Terraform, how can I set the maximum concurrency for an aws_lambda_event_source_mapping
using SQS?
答案1
得分: 3
Terraform支持名为scaling_config的配置块,位于aws_lambda_event_source_mapping内部,在此块中,您可以使用参数maximum_concurrency
resource "aws_lambda_event_source_mapping" "lambda_trigger" {
event_source_arn = "your arn"
function_name = "your lambda function arn"
batch_size = 10
scaling_config {
maximum_concurrency = 50
}
}
英文:
Terraform supports a configuration block named scaling_config from aws_lambda_event_source_mapping, inside this block you can use the argument maximum_concurrency
resource "aws_lambda_event_source_mapping" "lambda_trigger" {
event_source_arn = "your arn"
function_name = "your lambda function arn"
batch_size = 10
scaling_config {
maximum_concurrency = 50
}
}
答案2
得分: 0
最大并发是使用 aws_lambda_function
中的 reserved_concurrent_executions 来设置的,而不是在 aws_lambda_event_source_mapping
中设置。
英文:
Max. concurrency is set using reserved_concurrent_executions in aws_lambda_function
, not in aws_lambda_event_source_mapping
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论