0

I have a zip file on S3 and I need to get a single file from the zip. I would like to avoid downloading the whole ZIP, I don't know what size the ZIP may have and I only need a small file from that ZIP. I want to do this with a Lambda function (it can be nodejs or python).

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
CC.
  • 2,736
  • 11
  • 53
  • 70
  • 1
    are you looking for this https://stackoverflow.com/questions/17729703/how-to-extract-file-from-zip-without-maintaining-directory-structure-in-python? โ€“ Youcef LAIDANI Feb 09 '23 at 09:20
  • Hmm, could be, but not sure if it works with the ZIP being on S3. โ€“ CC. Feb 09 '23 at 09:21
  • 1
    You might be able to use [smart-open ยท PyPI](https://pypi.org/project/smart-open/), which knows how to talk to S3 and understands zip files. โ€“ John Rotenstein Feb 09 '23 at 21:51

0 Answers0