[英]Deploy new repository image to lambda by aws cli command?
I have three lambda
, and each uses the image from ECR
.我有三个
lambda
,每个都使用来自ECR
的图像。
Every time I push the image in ECR
,每次我在
ECR
中推送图像时,
I go to the lambda console then -> deploy new image -> select container image from popup.然后我转到 lambda 控制台 -> 部署新图像 -> 从弹出窗口中选择容器图像。
It is a bit bothersome procedure for repeating for every lambda
.为每个
lambda
重复是一个有点麻烦的过程。
Is there any good way to do this in aws cli
??在
aws cli
中有什么好的方法吗?
I have checked the aws cli lambda command and guess that aws lambda update-function-code
is close to my purpose.我检查了 aws cli lambda 命令并猜测
aws lambda update-function-code
接近我的目的。
However I cant find the precise answer.但是我找不到确切的答案。
How can I deploy the latest
tagged image in repository to the lambda
image??如何将存储库中的
latest
标记图像部署到lambda
图像?
Try this尝试这个
aws lambda update-function-code --function-name $MY_FUNC --image-uri $(aws lambda get-function --function-name $MY_FUNC | jq -r '.Code.ImageUri')
You must have correct env setup though.你必须有正确的环境设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.