Lambda Authorizers的调用会被计费吗?

0

【以下的问题经过翻译处理】 我想了解使用JWT和Lambda进行Authorizers计费的更多信息。

例如:

如果我们有两个Lambda函数:

CoreLogicLambda:平均运行100毫秒,使用1G的RAM并执行核心逻辑功能。

AuthLambda:每次以1毫秒的速度运行,使用1G的RAM来验证身份验证,并用作CoreLogicLambda的Lambda Authorizer。

现在假设我们有200万个HTTP API调用,仅有一半通过了认证器。

哪种计费方法是正确的:

情况1:

2百万个API Gateway HTTP API请求:1$ * 2 = 2$

200万个AuthLambda请求:0.2$ * 2 = 0.4$

100万个CoreLogicLambda请求:0.2$ * 1 = 0.2$

2,000 GB*S运行时间的AuthLambda:...

100,000 GB*S运行时间的CoreLogicLambda:...

情况2:

2百万个API Gateway HTTP API请求:1$ * 2 = 2$

100万个CoreLogicLambda请求:0.2$ * 1 = 0.2$

2,000 GB*S运行时间的AuthLambda:...

100,000 GB*S运行时间的CoreLogicLambda:...

情况3:

2百万个API Gateway HTTP API请求:1$ * 2 = 2$

200万个CoreLogicLambda请求:0.2$ * 2 = 0.4$

2,000 GB*S运行时间的AuthLambda:...

100,000 GB*S运行时间的CoreLogicLambda:...

情况4:

2百万个API Gateway HTTP API请求:1$ * 2 = 2$

100万个CoreLogicLambda请求:0.2$ * 1 = 0.2$

100,000 GB*S运行时间的CoreLogicLambda:...

谢谢你的解答。

profile picture
EXPERT
asked 5 months ago34 views
1 Answer
0

【以下的回答经过翻译处理】 Lambda授权者与其他函数调用计费逻辑一致。不过需要注意的是,API Gateway会缓存授权者返回的结果,这意味着通常调用次数会比请求次数少。对于您的情况,它类似于第1种情况,授权Lambda的上限为2M。

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions