Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS lambda update-function-code with jar package via AWS CLI

I'm trying to update my lambda function code with jar from my local machine via AWS CLI. The aws lambda has commands to update function code for zip file but not for jar. I can upload by using s3 bucket, but I need to update from local itself.

I know following are the way to update from S3 bucket and for zip:

  1. aws lambda update-function-code --function-name --s3-bucket --s3-key
  2. aws lambda update-function-code --function-name --zip-file "fileb://"

I want to ask is there similar command exist for uploading jar as well?

like image 736
Vinod Singh Avatar asked Jun 06 '26 00:06

Vinod Singh


2 Answers

You're probably missing the "fileb://" part for the jar.

aws lambda update-function-code --function-name my-lambda-name --zip-file fileb://./target/my-lambda-jar.1.0-SNAPSHOT.jar
like image 183
DJ Spiess Avatar answered Jun 07 '26 18:06

DJ Spiess


run this command:

aws lambda update-function-code --function-name my-lambda-name --zip-file fileb://./target/my-lambda-jar.1.0-SNAPSHOT.jar

like image 30
user12773428 Avatar answered Jun 07 '26 17:06

user12773428



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!