Closed j-adamczyk closed 1 year ago
Any luck resolving this issue? I'm seeing the same thing just after I added numpy to requirements.txt, and sure enough I cannot unzip the file:
$ unzip -l .serverless/pythonRequirements.zip
Archive: .serverless/pythonRequirements.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of .serverless/pythonRequirements.zip or
.serverless/pythonRequirements.zip.zip, and cannot find .serverless/pythonRequirements.zip.ZIP, period.
@kristinlindquist clearing local Serverless cache fixed this for me
I am using Serverless to deploy Python Lambda function triggered with Kinesis. I use
serverless-python-requirements
to pack a few requirements.I get an error:
I use Poetry, my
pyproject.toml
:My
serverless.yml
:I think this error started to show up when I changed my config file (
config/${self:provider.stage}.yml
) from JSON to YAML, but I'm not sure. What can I do about this? How can I even debug this? Can this plugin output the ZIP file locally, or can it be found somewhere on AWS?EDIT: I encounter this error only when using layers, i.e. with
PythonRequirementsLambdaLayer
andlayer: true
. When using without it, this works ok.