Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: "minimal" package version #8317

Closed
2 tasks
r-heimann opened this issue Nov 10, 2023 · 4 comments
Closed
2 tasks

Feature Request: "minimal" package version #8317

r-heimann opened this issue Nov 10, 2023 · 4 comments
Assignees
Labels
feature-request A feature should be added or improved.

Comments

@r-heimann
Copy link

r-heimann commented Nov 10, 2023

Describe the feature

It would be great if there would be somekind of "minimal" package, which only installs the absolut minimum in order to use AWS-CLI2. Using the new Amazon Linux 2023 Minimal Container image a crapton of stuff is being installed, which AWS-CLI2 has as dependencies:

Details
+ dnf install -y awscli-2
Package Repository Size
Installing:
awscli-2-2.9.19-1.amzn2023.0.1.noarch                   amazonlinux  10.0 MB
expat-2.5.0-1.amzn2023.0.2.aarch64                      amazonlinux 114.8 kB
gdbm-libs-1:1.19-2.amzn2023.0.2.aarch64                 amazonlinux  54.5 kB
groff-1.22.4-7.amzn2023.0.2.aarch64                     amazonlinux   1.2 MB
groff-base-1.22.4-7.amzn2023.0.2.aarch64                amazonlinux   1.0 MB
libxcrypt-4.4.33-7.amzn2023.aarch64                     amazonlinux 129.8 kB
mkpasswd-5.5.10-1.amzn2023.0.2.aarch64                  amazonlinux  42.0 kB
ncurses-6.2-4.20200222.amzn2023.0.4.aarch64             amazonlinux 404.4 kB
paper-2.3-2.amzn2023.0.3.aarch64                        amazonlinux  33.0 kB
perl-AutoLoader-5.74-477.amzn2023.0.5.noarch            amazonlinux  22.4 kB
perl-B-1.80-477.amzn2023.0.5.aarch64                    amazonlinux 185.0 kB
perl-Carp-1.50-458.amzn2023.0.2.noarch                  amazonlinux  30.1 kB
perl-Class-Struct-0.66-477.amzn2023.0.5.noarch          amazonlinux  23.3 kB
perl-Data-Dumper-2.174-460.amzn2023.0.2.aarch64         amazonlinux  56.1 kB
perl-Digest-1.20-1.amzn2023.0.2.noarch                  amazonlinux  26.7 kB
perl-Digest-MD5-2.58-2.amzn2023.0.2.aarch64             amazonlinux  37.5 kB
perl-DynaLoader-1.47-477.amzn2023.0.5.aarch64           amazonlinux  27.0 kB
perl-Encode-4:3.15-462.amzn2023.0.2.aarch64             amazonlinux   1.8 MB
perl-Errno-1.30-477.amzn2023.0.5.aarch64                amazonlinux  15.9 kB
perl-Exporter-5.74-459.amzn2023.0.2.noarch              amazonlinux  32.2 kB
perl-Fcntl-1.13-477.amzn2023.0.5.aarch64                amazonlinux  21.7 kB
perl-File-Basename-2.85-477.amzn2023.0.5.noarch         amazonlinux  18.2 kB
perl-File-Copy-2.34-477.amzn2023.0.5.noarch             amazonlinux  21.2 kB
perl-File-Path-2.18-2.amzn2023.0.2.noarch               amazonlinux  36.7 kB
perl-File-Temp-1:0.231.100-2.amzn2023.0.2.noarch        amazonlinux  61.2 kB
perl-File-stat-1.09-477.amzn2023.0.5.noarch             amazonlinux  18.2 kB
perl-FileHandle-2.03-477.amzn2023.0.5.noarch            amazonlinux  16.5 kB
perl-Getopt-Long-1:2.52-2.amzn2023.0.2.noarch           amazonlinux  61.5 kB
perl-Getopt-Std-1.12-477.amzn2023.0.5.noarch            amazonlinux  16.6 kB
perl-HTTP-Tiny-0.078-1.amzn2023.0.3.noarch              amazonlinux  57.2 kB
perl-IO-1.43-477.amzn2023.0.5.aarch64                   amazonlinux  89.4 kB
perl-IO-Socket-IP-0.41-3.amzn2023.0.2.noarch            amazonlinux  43.1 kB
perl-IO-Socket-SSL-2.075-1.amzn2023.0.2.noarch          amazonlinux 223.5 kB
perl-IPC-Open3-1.21-477.amzn2023.0.5.noarch             amazonlinux  24.0 kB
perl-IPC-Run3-0.048-21.amzn2023.0.2.noarch              amazonlinux  40.7 kB
perl-MIME-Base64-3.16-2.amzn2023.0.2.aarch64            amazonlinux  32.0 kB
perl-Mozilla-CA-20200520-4.amzn2023.0.2.noarch          amazonlinux  13.0 kB
perl-NDBM_File-1.15-477.amzn2023.0.5.aarch64            amazonlinux  23.2 kB
perl-Net-SSLeay-1.92-2.amzn2023.0.2.aarch64             amazonlinux 376.6 kB
perl-POSIX-1.94-477.amzn2023.0.5.aarch64                amazonlinux  99.8 kB
perl-PathTools-3.78-459.amzn2023.0.2.aarch64            amazonlinux  87.6 kB
perl-Pod-Escapes-1:1.07-458.amzn2023.0.2.noarch         amazonlinux  20.9 kB
perl-Pod-Perldoc-3.28.01-459.amzn2023.0.3.noarch        amazonlinux  85.7 kB
perl-Pod-Simple-1:3.42-2.amzn2023.0.2.noarch            amazonlinux 220.4 kB
perl-Pod-Usage-4:2.01-2.amzn2023.0.2.noarch             amazonlinux  41.9 kB
perl-Scalar-List-Utils-4:1.56-459.amzn2023.0.2.aarch64  amazonlinux  72.2 kB
perl-SelectSaver-1.02-477.amzn2023.0.5.noarch           amazonlinux  12.6 kB
perl-Socket-4:2.032-1.amzn2023.0.2.aarch64              amazonlinux  56.8 kB
perl-Storable-1:3.21-458.amzn2023.0.2.aarch64           amazonlinux  96.4 kB
perl-Symbol-1.08-477.amzn2023.0.5.noarch                amazonlinux  15.1 kB
perl-Term-ANSIColor-5.01-459.amzn2023.0.2.noarch        amazonlinux  49.4 kB
perl-Term-Cap-1.17-458.amzn2023.0.2.noarch              amazonlinux  22.9 kB
perl-Text-ParseWords-3.30-458.amzn2023.0.2.noarch       amazonlinux  17.0 kB
perl-Text-Tabs+Wrap-2021.0726-1.amzn2023.0.1.noarch     amazonlinux  23.0 kB
perl-Time-Local-2:1.300-5.amzn2023.0.2.noarch           amazonlinux  34.9 kB
perl-URI-5.09-1.amzn2023.0.2.noarch                     amazonlinux 111.0 kB
perl-base-2.27-477.amzn2023.0.5.noarch                  amazonlinux  17.2 kB
perl-constant-1.33-459.amzn2023.0.2.noarch              amazonlinux  23.9 kB
perl-if-0.60.800-477.amzn2023.0.5.noarch                amazonlinux  14.9 kB
perl-interpreter-4:5.32.1-477.amzn2023.0.5.aarch64      amazonlinux  73.5 kB
perl-libnet-3.13-2.amzn2023.0.2.noarch                  amazonlinux 128.9 kB
perl-libs-4:5.32.1-477.amzn2023.0.5.aarch64             amazonlinux   2.1 MB
perl-locale-1.09-477.amzn2023.0.5.noarch                amazonlinux  14.6 kB
perl-mro-1.23-477.amzn2023.0.5.aarch64                  amazonlinux  29.3 kB
perl-overload-1.31-477.amzn2023.0.5.noarch              amazonlinux  47.2 kB
perl-overloading-0.02-477.amzn2023.0.5.noarch           amazonlinux  13.8 kB
perl-parent-1:0.238-458.amzn2023.0.2.noarch             amazonlinux  14.8 kB
perl-podlators-1:4.14-458.amzn2023.0.2.noarch           amazonlinux 114.8 kB
perl-subs-1.03-477.amzn2023.0.5.noarch                  amazonlinux  12.6 kB
perl-vars-1.05-477.amzn2023.0.5.noarch                  amazonlinux  13.9 kB
psutils-2.05-1.amzn2023.0.2.noarch                      amazonlinux  51.8 kB
python-unversioned-command-3.9.16-1.amzn2023.0.6.noarch amazonlinux  11.3 kB
python3-3.9.16-1.amzn2023.0.6.aarch64                   amazonlinux  28.6 kB
python3-awscrt-0.16.7-1.amzn2023.0.1.aarch64            amazonlinux   1.4 MB
python3-cffi-1.14.5-1.amzn2023.0.3.aarch64              amazonlinux 252.0 kB
python3-colorama-0.4.4-2.amzn2023.0.2.noarch            amazonlinux  33.8 kB
python3-cryptography-36.0.1-1.amzn2023.0.3.aarch64      amazonlinux   1.2 MB
python3-dateutil-1:2.8.1-3.amzn2023.0.2.noarch          amazonlinux 296.1 kB
python3-distro-1.5.0-5.amzn2023.0.2.noarch              amazonlinux  36.8 kB
python3-docutils-0.16-4.amzn2023.0.2.noarch             amazonlinux   1.6 MB
python3-idna-2.10-3.amzn2023.0.2.noarch                 amazonlinux  95.4 kB
python3-jmespath-0.10.0-1.amzn2023.0.3.noarch           amazonlinux  47.3 kB
python3-libs-3.9.16-1.amzn2023.0.6.aarch64              amazonlinux   7.6 MB
python3-pip-21.3.1-2.amzn2023.0.5.noarch                amazonlinux   1.9 MB
python3-pip-wheel-21.3.1-2.amzn2023.0.5.noarch          amazonlinux   1.2 MB
python3-ply-3.11-11.amzn2023.0.2.noarch                 amazonlinux 105.8 kB
python3-prompt-toolkit-3.0.24-1.amzn2023.0.2.noarch     amazonlinux 622.7 kB
python3-pycparser-2.20-3.amzn2023.0.2.noarch            amazonlinux 128.2 kB
python3-pygments-2.7.4-1.amzn2023.0.2.noarch            amazonlinux   1.9 MB
python3-pysocks-1.7.1-8.amzn2023.0.2.noarch             amazonlinux  34.7 kB
python3-ruamel-yaml-0.16.6-5.amzn2023.0.2.aarch64       amazonlinux 193.9 kB
python3-ruamel-yaml-clib-0.1.2-6.amzn2023.0.2.aarch64   amazonlinux 137.4 kB
python3-setuptools-59.6.0-2.amzn2023.0.4.noarch         amazonlinux 962.8 kB
python3-setuptools-wheel-59.6.0-2.amzn2023.0.4.noarch   amazonlinux 517.5 kB
python3-six-1.15.0-5.amzn2023.0.2.noarch                amazonlinux  37.2 kB
python3-urllib3-1.25.10-5.amzn2023.0.2.noarch           amazonlinux 178.7 kB
python3-wcwidth-0.2.5-3.amzn2023.0.2.noarch             amazonlinux  41.9 kB
tzdata-2023c-1.amzn2023.0.1.noarch                      amazonlinux 443.9 kB
whois-nls-5.5.10-1.amzn2023.0.2.noarch                  amazonlinux  34.5 kB
Transaction Summary:
Installing:       99 packages

Use Case

Less is more?

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CLI version used

awscli-2-2.9.19-1.amzn2023.0.1.noarch

Environment details (OS name and version, etc.)

Amazon Linux 2023 Minimal Container image

@r-heimann r-heimann added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 10, 2023
@tim-finnigan tim-finnigan self-assigned this Nov 15, 2023
@tim-finnigan tim-finnigan removed the needs-triage This issue or PR still needs to be triaged. label Nov 15, 2023
@tim-finnigan
Copy link
Contributor

Hi @r-heimann thanks for reaching out. I brought this feature request up for discussion with the team, and they recommended reaching out to the Amazon Linux team on GitHub with this request: https://github.com/amazonlinux/amazon-linux-2023. Several of the things you listed like perl-* packages are not related to the AWS CLI, so we recommend asking the Amazon Linux team for further review of this.

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

@TJNII
Copy link

TJNII commented Mar 3, 2024

Agreed. I just wrote a simple little entrypoint script for ECR to pull and format some secrets out of SecretsManager. I thought "My needs are simple, I'll just use the cli instead of writing something with the SDK". The AWS CLI alone added over 475MB to my container. 75% of my image is now just the AWS CLI, just so I can pull a secret from SecretsManager I don't want to run through ENV vars.

Being able to just install just the parts I need would also be great, in my case I just need the SecretsManager commands. However, given the migration from pip installs to curl | sudo bash I'm not holding out hope there.

For simple operations installing an entire development framework like Python or Ruby to utilize the SDKs shouldn't be the lighter weight option than using the purpose-built cli.

[Edit]
Digging around under the hood the AWS CLI is an entire Python install, plus all the SDK pieces, plus all the docs, so I guess this being ginormous makes sense. Given the change in distribution from pip I don't think the CLI is appropriate for my use case.
[/Edit]

@r-heimann
Copy link
Author

Using dnf install -y awscli-2 --setopt=install_weak_deps=0 makes this a little bit better, but there is still a lot of stuff being installed:

+ dnf install -y awscli-2 --setopt=install_weak_deps=0
Package                                                Repository      Size
Installing:                                                                
 awscli-2-2.14.5-1.amzn2023.0.1.noarch                 amazonlinux  11.2 MB
 expat-2.5.0-1.amzn2023.0.3.aarch64                    amazonlinux 114.8 kB
 gdbm-libs-1:1.19-2.amzn2023.0.2.aarch64               amazonlinux  54.5 kB
 libxcrypt-4.4.33-7.amzn2023.aarch64                   amazonlinux 129.8 kB
 python3-3.9.16-1.amzn2023.0.6.aarch64                 amazonlinux  28.6 kB
 python3-awscrt-0.19.19-1.amzn2023.0.1.aarch64         amazonlinux   1.6 MB
 python3-cffi-1.14.5-1.amzn2023.0.3.aarch64            amazonlinux 252.0 kB
 python3-colorama-0.4.4-2.amzn2023.0.2.noarch          amazonlinux  33.8 kB
 python3-cryptography-36.0.1-1.amzn2023.0.5.aarch64    amazonlinux   1.2 MB
 python3-dateutil-1:2.8.1-3.amzn2023.0.2.noarch        amazonlinux 296.1 kB
 python3-distro-1.5.0-5.amzn2023.0.2.noarch            amazonlinux  36.8 kB
 python3-docutils-0.16-4.amzn2023.0.2.noarch           amazonlinux   1.6 MB
 python3-idna-2.10-3.amzn2023.0.2.noarch               amazonlinux  95.4 kB
 python3-jmespath-0.10.0-1.amzn2023.0.3.noarch         amazonlinux  47.3 kB
 python3-libs-3.9.16-1.amzn2023.0.6.aarch64            amazonlinux   7.6 MB
 python3-pip-wheel-21.3.1-2.amzn2023.0.7.noarch        amazonlinux   1.2 MB
 python3-ply-3.11-11.amzn2023.0.2.noarch               amazonlinux 105.8 kB
 python3-prompt-toolkit-3.0.24-1.amzn2023.0.2.noarch   amazonlinux 622.7 kB
 python3-pycparser-2.20-3.amzn2023.0.2.noarch          amazonlinux 128.2 kB
 python3-pysocks-1.7.1-8.amzn2023.0.2.noarch           amazonlinux  34.7 kB
 python3-ruamel-yaml-0.16.6-5.amzn2023.0.2.aarch64     amazonlinux 193.9 kB
 python3-ruamel-yaml-clib-0.1.2-6.amzn2023.0.2.aarch64 amazonlinux 137.4 kB
 python3-setuptools-59.6.0-2.amzn2023.0.4.noarch       amazonlinux 962.8 kB
 python3-setuptools-wheel-59.6.0-2.amzn2023.0.4.noarch amazonlinux 517.5 kB
 python3-six-1.15.0-5.amzn2023.0.2.noarch              amazonlinux  37.2 kB
 python3-urllib3-1.25.10-5.amzn2023.0.3.noarch         amazonlinux 178.6 kB
 python3-wcwidth-0.2.5-3.amzn2023.0.2.noarch           amazonlinux  41.9 kB
 tzdata-2024a-1.amzn2023.0.1.noarch                    amazonlinux 440.8 kB
Transaction Summary:
 Installing:       28 packages

@tim-finnigan it would be great if you could reduce the size of AWS-CLI2 (or a future 3?). Both in filesize and package dependencies. Something like this would be lovely: Being able to just install just the parts I need would also be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

3 participants