我的批处理文件中仅运行了第一个lambda更新语句 [英] Only first lambda update statement is running in my batch file
问题描述
环境:
Windows 10
命令提示符
Environment:
Windows 10
Command prompt
为什么我的批处理文件中仅运行了第一个lambda更新?这是异步问题吗?
Why is only the first lambda update running in my batch file? Is this an asynchronous issue?
script.bat
...
aws lambda update-function-code --function-name "fx1" --zip-file fileb://zip1.zip
aws lambda update-function-code --function-name "fx2" --zip-file fileb://zip2.zip
推荐答案
假定aws
是一个批处理文件:
Assuming, aws
is a batchfile:
当您从批处理文件(A)执行另一个批处理文件(B)时,您将控制权从(A)转移到(B),并且如果(B)结束,则不会返回"到(A).
When you execute another batchfile (B) from a batchfile (A), you transfer control from (A) to (B) and if (B) ends, there is no "return" to (A).
当您调用批处理文件(B)时,(A)将暂停直到(B) )完成;控制权交还给(A),(A)继续进行下一行.
When you call the batchfile (B), (A) is paused until (B) finishes; Control is given back to (A) and (A) proceeds with the next line.
所以您不应该执行 aws:
So you shouldn't execute aws:
aws lambda update-function-code --function-name "fx1" --zip-file fileb://zip1.zip
但是调用它:
call aws lambda update-function-code --function-name "fx1" --zip-file fileb://zip1.zip
这篇关于我的批处理文件中仅运行了第一个lambda更新语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!