aws-elastic-beanstalk-cli
aws-elastic-beanstalk-cli copied to clipboard
Deploys are not compressed when .ebignore is present.
Description
When using eb deploy
with a .ebignore
file present, the application version uploaded to S3 is not compressed. Without a .ebignore
file, git archive
(which does compress the archive) is used instead of the zipfile operations in ebcli/core/fileoperations.py
.
Steps to reproduce
Create a .ebignore
file within an application and run eb deploy
.
Observed result
Files added to Application Version ZIP created are not compressed. You can see the files added are uncompressed (b-
) by running zipinfo
on the Application Version uploaded to S3:

Expected result
Files added should be compressed like when without a .ebignore
file. In my own application this resulted in a 174MB version (without compression), compared to 71MB (with compression).
I'm not enough of a Python developer to say for sure, but it looks like when the zipfile is initialised it specifies ZIP_DEFLATED correctly but does not appear to specify a compression level?
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: MacOS 11.6
- EBCLI version: 3.20