Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do we upload lambda function .zip directly from CLI?

I use Ubuntu and have this Golang lambda function with Redis. Already zipped and uploaded it. But I still need to develop it further.

Every time I made changes and want to see the logs in CloudWatch... It seems that I need to do the steps over and over.

code -> build main.go -> zipped -> upload it -> trigger the function -> see the logs

ineffective.

Is there a way to simplify the steps?

Is it possible to upload it through CLI?

like image 683
rulisastra Avatar asked Apr 22 '26 08:04

rulisastra


1 Answers

You can upload using the cli:

aws lambda update-function-code \
    --function-name  my-function \
    --zip-file fileb://my-function.zip

you can see this particular example in the docs.

The other steps should be pretty easy to automate with a simple script.

like image 129
NuLo Avatar answered Apr 24 '26 09:04

NuLo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!