1
votes

I am unable to update my AWS Lambda function using the CLI command,
I created a .zip file and uploaded the .zip to the Lambda function via the AWS Console and it worked,
But the same file I am not able to upload using the AWS CLI,

I am getting the following error while, trying to use the cli command -

Error parsing parameter '--zip-file': Unable to load paramfile fileb:

Command used to update the function -

aws lambda update-function-code --function-name test --zip-file "fileb://$deployableName"

File trying to upload -
enter image description here

I am referring the following links -
1. https://docs.aws.amazon.com/cli/latest/reference/lambda/update-function-code.html
2. AWS lambda update-function-code with jar package via AWS CLI
3. How can I create an AWS Lambda function using the AWS CLI?

2

2 Answers

2
votes

I was able to resolve this by specifying the absolute path of the .zip file, to the --zip-file option.

aws lambda update-function-code --function-name test --zip-file "fileb:///home/user/poc/lambda/Monday-17-Jun-2019-1560756274.zip"
0
votes

The error

Error parsing parameter '--zip-file': Unable to load paramfile fileb:

Indicates that the given file can not be found. Are you sure that:

  • The variable is being correctly replaced by a value?
  • The file exists? Check Relative/Absolute paths