来自文档:
“然后,Kinesis Data Firehose使用AWS Lambda同步调用模式对每个缓冲批处理异步调用指定的Lambda函数。”
如果firehose以同步模式调用lambda,那么它如何也被异步调用呢?
发布于 2020-12-18 23:16:39
Firehose异步调用Lambda函数意味着Firehose将在必要时使用许多并发Lambda调用来处理数据流。Lambda函数以同步模式调用,这意味着Firehose将等待Lambda返回响应
当然,Firehose必须等待响应;否则,它将无法将转换后的数据流传送到S3或任何存储系统。AWS只是在这里提供额外的细节,代价是使用“同步”和“异步”来描述相同的机制。
本文档中的https://docs.aws.amazon.com/cli/latest/reference/lambda/invoke.html
--invocation-type (string)
Choose from the following options.
RequestResponse (default) - Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.
Event - Invoke the function asynchronously. Send events that fail multiple times to the function's dead-letter queue (if it's configured). The API response only includes a status code.
DryRun - Validate parameter values and verify that the user or role has permission to invoke the function.因此,可以想象当Firehose调用Lambda API时,它包含参数--invocation-type RequestResponse
https://stackoverflow.com/questions/53856036
复制相似问题