aws-cli
aws-cli copied to clipboard
Publish V2 as a Ubuntu PPA or Ubuntu Snap
Is your feature request related to a problem? Please describe.
The current recommended instructions for installing the AWS CLI V2 involve downloading a zip file, unzipping it, and installing it. This seems to be limited, lacking features like bash-completion that are included with the ubuntu-provided awscli
package.
Describe the solution you'd like
A package on Ubuntu's PPA, or other Debian package repository, that provides an awscli
package and python3-botocore
package compatible with the existing awscli
packages in the ubuntu repositories.
Describe alternatives you've considered PyPi support has been officially discontinued, and the official docker image provides a number of problems around privileges and credentials communication.
Additional context AWSCLI v1 PPA Apparently unofficial AWSCLI v1 Snap - Well out of date, currently aws-cli/1.15.58
Hi @GauntletWizard, thanks for the feature request.
Per this comment (https://github.com/aws/aws-cli/issues/4947#issuecomment-793192340), after a source distribution is made available, support for distribution methods will be discussed with the community.
I'm going to leave this issue open and mark the requests for v1 snap as duplicates and close them - I imagine going forward a CLI V1 Snap would not be prioritized.
I didn't understand why you close my issues and my PRs. #7177
I successful compile aws-cli 2 on snap package for arm. I can share it with you, also make a package here on the repo. Also make it for the ci.
I will put my PRs to reference to whom who want to build the snap package. https://github.com/aws/aws-cli/pull/7179 https://github.com/aws/aws-cli/pull/7180
Hey in this comment It''s said "In Q2, we plan to begin work on a source bundle that is well documented, easily ingestible by package managers" it's been 19 months now since this comment. Is there any progress in that sense? I don't see many package managers that's able to install v2.
Insane that Amazon is still distributing zip files and expecting people to run scripts as root to install their software.
Where is the PPA?
expecting people to run scripts as root to install their software.
Technically packages from PPA also run in-package scripts as root to do the installation.
@brlin-tw Yes, but they are signed and validated by the OS seamlessly. Heck, I'd even be happy with a snap package that doesn't require root to install software at all.
@brlin-tw Yes, but they are signed and validated by the OS seamlessly.
Fair point.
The Snap now exists at https://snapcraft.io/aws-cli in beta channel, see sudo snap install aws-cli --channel=v2/beta
However, it has a bug in its access permissions, it needs to ask for permissions to ~/.aws/cli/cache not just to ~/.aws, otherwise reading/writing the STS assumerole credentials cache fails.
Good news! Thank you.
In the meanwhile (until the issue is fixed) the snap could be used in devmode
sudo snap install aws-cli --channel=v2/beta --devmode
I uploaded revisions 177 (ARM) and 178 that will hopefully address the permissions issue in v2.
I uploaded revisions 177 (ARM) and 178 that will hopefully address the permissions issue in v2.
Confirmed working!
New 178 version is working fine on Ubuntu 22.04, but I can't figure how to get bash completion for the Snap.
Is it working for anyone? :pray:
We are working on the tab completion issue, and that should be fixed soon. We are also looking into additional issues resulting from strict confinement, and working out the best way to address those. I will update again once we have decided on a course of action.
For those that a snap won't work for, I have https://launchpad.net/~lizthegrey/+archive/ubuntu/misc built with jammy backports of the lunar packages and I do refresh it periodically.
Thank you so much @lizthegrey! And completion does work out of the box with that package :tada:
@lizthegrey Can you also create aws-cli v2 snap into armhf architecture?
@lizthegrey There is a bug. I am using aws-cli inside snapcraft build. It install, but when I run it, it have runtime error: on core22. It mean ubuntu 22.04 on x64 architecture.
build-snaps:
- aws-cli/v2/beta
:: + aws-cli.aws --version
:: /snap/snapd/x1/usr/lib/snapd/snap-confine: error while loading shared libraries: libudev.so.1: failed to map segment from shared object
If someone want to compile it for arm:
sudo apt install libffi-dev python3-pip python3-dev musl-dev rustc cargo libssl-dev asn1c libsystemd-dev cmake -y
mkdir -p $HOME/.cargo
mount -t tmpfs none $HOME/.cargo
pip install git+https://github.com/aws/[email protected]
If someone want to compile it for arm:
sudo apt install libffi-dev python3-pip python3-dev musl-dev rustc cargo libssl-dev asn1c libsystemd-dev cmake -y mkdir -p $HOME/.cargo mount -t tmpfs none $HOME/.cargo pip install git+https://github.com/aws/[email protected]
Sure I can force an armhf build for PPA (I don't control the snap).
If someone want to compile it for arm:
sudo apt install libffi-dev python3-pip python3-dev musl-dev rustc cargo libssl-dev asn1c libsystemd-dev cmake -y mkdir -p $HOME/.cargo mount -t tmpfs none $HOME/.cargo pip install git+https://github.com/aws/[email protected]
Sure I can force an armhf build for PPA (I don't control the snap).
That will be helpful too!
The snap is available for the AWS Graviton ARM architecture. I will look at the libudev.so.1 issue.
The snap is available for the AWS Graviton ARM architecture. I will look at the libudev.so.1 issue.
What do you mean by Graviton ARM architecture? As I see in the https://snapcraft.io/aws-cli Only amd64 and arm64. No armhf
The ARM64 snap will install on Graviton instances. At present, we're not set up to build armhf packages. I can discuss that with the team, but there are a few other snap-related issues I need to address first.
The ARM64 snap will install on Graviton instances. At present, we're not set up to build armhf packages. I can discuss that with the team, but there are a few other snap-related issues I need to address first.
Thank you!
@lizthegrey There is a bug. I am using aws-cli inside snapcraft build. It install, but when I run it, it have runtime error: on core22. It mean ubuntu 22.04 on x64 architecture.
build-snaps: - aws-cli/v2/beta
:: + aws-cli.aws --version :: /snap/snapd/x1/usr/lib/snapd/snap-confine: error while loading shared libraries: libudev.so.1: failed to map segment from shared object
I am unable to reproduce this. I created a simple snap and included the aws-cli in build-snaps as indicated. I then ran snapcraft build --shell --use-lxd
and executed aws-cli.aws --version
in the shell. Instead of the error, I see: aws-cli/2.9.19 Python/3.8.10 Linux/5.15.0-1028-aws source/x86_64.ubuntu-core.20 prompt/off
. I tested this with core20 and core22, but couldn't reproduce the error.
I did it in github action inside docker:
docker run \
--rm \
--tty \
--privileged \
--volume $PWD:/root \
--workdir /root \
--platform linux/amd64 \
diddledani/snapcraft:core22 \
"snap run snapcraft --verbosity verbose pack --destructive-mode --output tal.snap"
@lizthegrey Can you update your ppa and add armhf without wait for the next update?
@lizthegrey Can you update your ppa and add armhf without wait for the next update?
yup working on it, just, it's a spare time project, I need to do another upload with a bumped ppa version number since I can't re-upload the same version number.
@lizthegrey Can you update your ppa and add armhf without wait for the next update?
yup working on it, just, it's a spare time project, I need to do another upload with a bumped ppa version number since I can't re-upload the same version number.
Thank you!