在AWS Lambda更新过程中请求发生什么? [英] What happens to request in the middle of an aws lambda update?
问题描述
如果我是
- 触发AWS Lambda部署/更新
- 在步骤1结束之前触发对AWS Lambda的请求
请求是否会击中旧的lambda?会出错吗?
Will the request just hit the old lambda? Will it error out?
到目前为止,在我的测试中,似乎没有停机时间",它几乎可以立即将旧版本换成新版本,尽管新lambda上的第一个请求确实必须进行冷启动.
So far in my testing it seems like there is no "downtime", that it swaps out the old for the new almost instantly--although the first request on the new lambda does have to do a cold start.
推荐答案
您是正确的. IIRC,每个函数调用都使用一个特定的函数ARN,该ARN在您更新该函数时会更改.调用该函数时,您正在使用新的ARN,该ARN仅调用新版本.
You are correct. IIRC, each function invocation uses a specific function ARN, which changes when you update the function. When you invoke the function, you're using the new ARN, which invokes only the new version.
我相信可以继续使用旧功能,显式使用旧ARN(尽管您可能无法从Lambda控制台执行此操作.)
I believe it's possible to continue using the old function, using the old ARN explicitly (though you might not be able to do this from the Lambda console.)
有关更多信息,请参见 http://docs. aws.amazon.com/lambda/latest/dg/versioning-aliases.html
For more info, see http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
这篇关于在AWS Lambda更新过程中请求发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!