1

I am constantly getting this error when trying to upload my development package to lambda. On my windows 7 pro box.

--zip-file must be a zip file with fileb:// prefix.

I have googled and found very little help. I have tried with a full path, with quotes, without, file instead of fileb all without any hope.

My publish Batch file:

del emailer.zip 
cd emailer
"C:\Program Files\WinRAR\rar.exe" a -r emailer.zip
move /y emailer.zip ../emailer.zip
cd ..
aws lambda update-function-code --function-name emailer --zip-file fileb://emailer.zip

I have uploaded the development package here in case there is an issue with how I have constructed the package.

Why am I constantly getting this error? what do I need to do/research to resolve this issue?

Ryan O'Hara
  • 311
  • 1
  • 10

1 Answers1

1

Your file is not a valid zip file, you have created it through winrar which have created another type of archive

when downloading your file

fhenri@machine:~/Downloads$ file emailer.zip
emailer.zip: RAR archive data, v1d, os: Win32

When create a zip file (unzip zip cli) I am getting

fhenri@machine:~/Downloads$ file emailer_zip.zip
email_zip.zip: Zip archive data, at least v1.0 to extract

If you need to use winrar, you can check use winrar command line to create zip archives to create a correct zip archive, otherwise just winzip or another zip program

Frederic Henri
  • 51,761
  • 10
  • 113
  • 139