I have three lambda , and each uses the image from ECR.
Every time I push the image in ECR,
I go to the lambda console then -> deploy new image -> select container image from popup.
It is a bit bothersome procedure for repeating for every lambda.
Is there any good way to do this in aws cli??
I have checked the aws cli lambda command and guess that aws lambda update-function-code is close to my purpose.
However I cant find the precise answer.
How can I deploy the latest tagged image in repository to the lambda image??
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With