调用AWS Lambda

编程入门 行业动态 更新时间:2024-10-11 13:19:42
调用AWS Lambda - API网关与直接调用(Invoking AWS Lambda - API Gateway vs direct invocation)

我们是由10位开发人员组成的团队,试图将流程密集型工作从Heroku上的Rails应用程序迁移到AWS Lambda(Java)。 我们在决定是通过API网关还是通过AWS Ruby SDK直接调用lambda函数时被阻止。 根据用例,我们可能不得不异步地调用lambda。 我们的有效载荷非常小(<1-2 KB)。 我们正在考虑直接调用以最大化执行时间。 我们在这里寻找指针:

API网关是否容易(和更快)验证调用lambda所需的IAM角色? B / W lambda和API网关的延迟是否有显着减少?

We are a team of 10 developers, trying to move process intensive jobs from our Rails application on Heroku to AWS Lambda (Java). We are blocked on deciding whether to invoke lambda functions via API gateway or via AWS Ruby SDK directly. Depending on the use case, we might have to invoke lambda asynchronously as well. Our payload is very small (< 1-2 KB). We are considering direct invocation primarily to maximise execution time. We are looking for pointers here:

Is it easy(& faster) for API gateway to verify the IAM role required to invoke lambda ? Is there any significant reduction in latency b/w lambda and API gateway?

最满意答案

正如其他人所说,添加API网关不会提高性能,但会增加额外的开销。 如果它提供的任何附加功能对您有用,请使用API​​网关。 如果您控制客户端,则可以在客户端上获得凭据直接调用Lambda函数的权限,并且不需要/不需要任何其他API网关功能,直接调用Lambda即可。

As others have stated, adding API Gateway does not improve performance but does add extra overhead. Use API Gateway if any of the additional feature it provides are useful to you. If you control the client, can get credentials on the client with permissions to invoke your Lambda functions directly, and don't need/want any of the additional API Gateway features, the go with the Lambda direct invoke.

更多推荐

本文发布于:2023-07-18 07:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1156682.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:AWS   Lambda

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!