Package Details: aws-cli-v2 2.0.60-1

Git Clone URL: https://aur.archlinux.org/aws-cli-v2.git (read-only, click to copy)
Package Base: aws-cli-v2
Description: Universal Command Line Interface for Amazon Web Services (version 2)
Upstream URL: https://github.com/aws/aws-cli
Keywords: devops
Licenses: Apache
Conflicts: aws-cli, aws-cli-git, aws-cli-v2-bin
Provides: aws-cli
Submitter: dbirks
Maintainer: tucho
Last Packager: dbirks
Votes: 8
Popularity: 0.000157
First Submitted: 2020-06-24 20:18 (UTC)
Last Updated: 2020-10-29 02:11 (UTC)

Required by (19)

Sources (1)

Pinned Comments

abruegmann commented on 2021-02-08 18:59 (UTC)

Currently it's practically impossible to make this package work on Arch since it relies on old versions of python modules. I recommend using https://aur.archlinux.org/packages/aws-cli-v2-bin/.

I doubt this'll change anytime soon. If you're interested: https://github.com/aws/aws-cli/issues/4947#issuecomment-586046886

Latest Comments

flamehazelinux commented on 2021-09-09 18:14 (UTC)

Can confirm, a fresh installation DOES NOT WORK and fails on some python dependencies.

Use aws-cli-v2-bin (https://aur.archlinux.org/packages/aws-cli-v2-bin/) instead to properly install.

If you installed version 1.20 before this version, it will prompt and properly remove the old version before installing this version.

abruegmann commented on 2021-02-08 18:59 (UTC)

Currently it's practically impossible to make this package work on Arch since it relies on old versions of python modules. I recommend using https://aur.archlinux.org/packages/aws-cli-v2-bin/.

I doubt this'll change anytime soon. If you're interested: https://github.com/aws/aws-cli/issues/4947#issuecomment-586046886

etienne commented on 2020-12-04 10:36 (UTC) (edited on 2020-12-04 10:40 (UTC) by etienne)

Hello, for the python version problem. I fixed it locally by using this page https://wiki.archlinux.org/index.php/Python_package_guidelines#Using_site-packages

line 37 (install ac.index update)

local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -Dm 644 ac.index "$pkgdir""$site_packages"/awscli/data/ac.index

This will use the good python site package whatever your python version

Comradin commented on 2020-12-04 08:36 (UTC) (edited on 2020-12-04 08:39 (UTC) by Comradin)

This package has a dependency on python-botocore-v2-git which is flagged orphaned for me and today my aws tooling broke. I should add that I haven't used the aws cli for a week or so, I only stumpled upon the error today.

There is a community/python-botocore 1.19.13-3 which is quite uptodate.

For the quick fix I installed the aws-cli-v2-bin package, due to the dependency conflict.

piquer commented on 2020-12-02 10:29 (UTC)

The PKBUILD has /usr/lib/python3.8 hard-coded in one place, which is not the right directory anymore now that 3.9 has been rolled out.

aliencoder commented on 2020-09-29 08:40 (UTC)

@mnesterenko, I found the reason, I have it installed via my distro, and manually, when v2 came out there was no AUR package, so I did a manual install, and forgot about it.

mnesterenko commented on 2020-09-28 19:12 (UTC)

@aliencoder, that is strange path you have

I have checked built package contents:

$ pacman -Ql aws-cli-v2 | head -n 5
aws-cli-v2 /usr/
aws-cli-v2 /usr/bin/
aws-cli-v2 /usr/bin/aws
aws-cli-v2 /usr/bin/aws.cmd

You should have it by this path

aliencoder commented on 2020-09-28 06:01 (UTC) (edited on 2020-09-28 06:52 (UTC) by aliencoder)

Hi there, Editing the build scripts fixed the build, but it seems I still have the old

aws --version
aws-cli/2.0.33 Python/3.7.3 Linux/5.8.6-1-MANJARO botocore/2.0.0dev37

which aws
/usr/local/aws-cli/v2/current/bin/aws

any ideas?

L0-FF commented on 2020-09-27 22:00 (UTC)

Solved. Based on @aliencoder and my issues. Figured it had to do with PYTHONPATH.

Especially considering that the import error was referencing the $USER local dir: /home/$USER/.local/lib/python3.8/site-packages

I explicitly set PYTHONPATH to the proper global path and the local (for the package build) and all went as expected.

So for the PKGBUILD.

PYTHONPATH=.:/usr/lib/python3.8/site-packages ./scripts/gen-ac-index --index-location=./ac.index

Solves it. Pretty sure this will work for most users.

dbirks commented on 2020-09-27 03:59 (UTC)

Thank you all, I just moved PYTHONPATH inline.

mnesterenko commented on 2020-09-26 22:49 (UTC) (edited on 2020-09-27 01:39 (UTC) by mnesterenko)

@dbirks, @L0-FF, not sure about this error, when PYTHONPATH is fixed aws-cli-v2 is built successfully:

Dockerfile that builds aws-cli-v2 with fixed PYTHONPATH:

from archlinux/base

run pacman -Syu --noconfirm git sudo vim binutils fakeroot shadow awk && \
    groupadd sudo && useradd test --create-home -G sudo && (echo test:test | chpasswd) && \
    (echo "test   ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/test)

workdir /home/test
user test

run git clone https://aur.archlinux.org/trizen.git && (cd trizen && makepkg -sri --noconfirm) && \
    trizen -S --noconfirm python-botocore-v2-git && \
    trizen -S --noconfirm python-colorama python-cryptography python-distro python-prompt_toolkit python-ruamel-yaml python-s3transfer && \
    git clone https://aur.archlinux.org/aws-cli-v2.git && ( \
            cd aws-cli-v2 && \
            echo -e '''diff --git a/PKGBUILD b/PKGBUILD\n\
index 0566e35..01ff3ed 100644\n\
--- a/PKGBUILD\n\
+++ b/PKGBUILD\n\
@@ -27,8 +27,7 @@ build() {\n\
     python setup.py build\n\
 \n\
     echo "Generating auto-complete index. Takes 5-10 minutes..."\n\
-    local PYTHONPATH=.\n\
-    ./scripts/gen-ac-index --index-location=./ac.index\n\
+    PYTHONPATH=. ./scripts/gen-ac-index --index-location=./ac.index\n\
 }\n\
 \n\
 package() {''' | git apply && makepkg -sri --noconfirm)

L0-FF commented on 2020-09-25 23:11 (UTC)

@mnesterenko's (thanks!) diff does fix the awscli module error.

The new error, is as reported by @aliencoder:

ImportError: cannot import name 'WordCompleter' from 'prompt_toolkit.completion' (/home/omar/.local/lib/python3.8/site-packages/prompt_toolkit/completion.py)
==> ERROR: A failure occurred in build().

mnesterenko commented on 2020-09-25 19:56 (UTC) (edited on 2020-09-25 19:59 (UTC) by mnesterenko)

Hi dbirks,

please update PKGBUILD to following:

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,8 +27,7 @@ build() {
     python setup.py build

     echo "Generating auto-complete index. Takes 5-10 minutes..."
-    local PYTHONPATH=.
-    ./scripts/gen-ac-index --index-location=./ac.index
+    PYTHONPATH=. ./scripts/gen-ac-index --index-location=./ac.index
 }

That will fix problem with the error:

Traceback (most recent call last):
  File "./scripts/gen-ac-index", line 8, in <module>
    from awscli.autocomplete.local import indexer
ModuleNotFoundError: No module named 'awscli'

aliencoder commented on 2020-09-25 07:02 (UTC) (edited on 2020-09-25 07:05 (UTC) by aliencoder)

Hi, I am facing this error:



Traceback (most recent call last):
  File "./scripts/gen-ac-index", line 54, in <module>
    main()
  File "./scripts/gen-ac-index", line 29, in main
    _generate_index(args.index_location)
  File "./scripts/gen-ac-index", line 44, in _generate_index
    driver = clidriver.create_clidriver()
  File "/usr/lib/python3.8/site-packages/awscli/clidriver.py", line 103, in create_clidriver
    load_plugins(session.full_config.get('plugins', {}),
  File "/usr/lib/python3.8/site-packages/awscli/plugin.py", line 48, in load_plugins
    _load_plugins(BUILTIN_PLUGINS, event_hooks)
  File "/usr/lib/python3.8/site-packages/awscli/plugin.py", line 62, in _load_plugins
    modules = _import_plugins(plugin_mapping)
  File "/usr/lib/python3.8/site-packages/awscli/plugin.py", line 76, in _import_plugins
    module = import(path, fromlist=[module])
  File "/usr/lib/python3.8/site-packages/awscli/handlers.py", line 43, in <module>
    from awscli.customizations.configure.configure import register_configure_cmd
  File "/usr/lib/python3.8/site-packages/awscli/customizations/configure/configure.py", line 27, in <module>
    from awscli.customizations.configure.sso import ConfigureSSOCommand
  File "/usr/lib/python3.8/site-packages/awscli/customizations/configure/sso.py", line 23, in <module>
    from prompt_toolkit.completion import WordCompleter
ImportError: cannot import name 'WordCompleter' from 'prompt_toolkit.completion' (/home/omar/.local/lib/python3.8/site-packages/prompt_toolkit/completion.py)
==> ERROR: A failure occurred in build().
    Aborting...

dbirks commented on 2020-09-23 18:50 (UTC)

Thank you just fixed that. The only way I found to fix it was to set PYTHONPATH=. in the project root.

sjuxax: Yes if you have the time to upstream that, I'd be grateful. It takes a while as it is.

sjuxax commented on 2020-09-23 03:09 (UTC)

Yeah, the script has to be run from the source root directory so that the import path resolution can find the required modules. Generation is also slow, taking 5-7 minutes on my system (I have a custom patch that I should probably upstream to make the index generation more performant).

L0-FF commented on 2020-09-22 23:07 (UTC)

Almost there.

Current error on build.

Traceback (most recent call last):
  File "./scripts/gen-ac-index", line 8, in <module>
    from awscli.autocomplete.local import indexer
ModuleNotFoundError: No module named 'awscli'

dbirks commented on 2020-09-22 18:00 (UTC)

etienne: thank you very much, that fixes the autocomplete errors that I was getting. Just pushed up the change.

etienne commented on 2020-09-22 16:20 (UTC)

Can you generate the auto-completion file and add it to the package? You need to call the script scripts/gen-ac-index (--index-location to specify output) and store it into the location of aws-cli-v2 package in the data folder with the name ac.index

dbirks commented on 2020-08-12 19:24 (UTC)

rtur: thank you, yes I think you're right. Just switched these over to depends.

rtur commented on 2020-08-12 06:21 (UTC)

Why are all dependencies only makedepends ? I'm almost certain that at least python-botocore-v2-git is a runtime dependency, since the tool crashes because of the missing import. Most of the other dependencies should also be runtime dependencies.

dbirks commented on 2020-08-07 03:00 (UTC)

Thank you both, I just added python-distro to the makedepends.

kylelaker commented on 2020-08-04 01:46 (UTC)

That missing dependency seems to be in this package. The import that's failing is directly within the awscli.clidriver module. If it were in python-botocore-v2-git somewhere, the stack trace would be deeper. The dependencies can be found in the tool's setup.py and the various requirements.txt files.

kbolino commented on 2020-08-01 16:59 (UTC)

There appears to be a missing dependency on python-distro either here or in python-botocore-v2-git. After running makepkg -s on both then installing them, I still get

$ aws help
Traceback (most recent call last):
  File "/usr/bin/aws", line 19, in <module>
    import awscli.clidriver
  File "/usr/lib/python3.8/site-packages/awscli/clidriver.py", line 20, in <module>
    import distro
ModuleNotFoundError: No module named 'distro'

After pacman -Sy python-distro I didn't have this problem anymore.

Cbhihe commented on 2020-06-26 16:35 (UTC) (edited on 2020-06-26 16:36 (UTC) by Cbhihe)

For those of us who keep forgetting that, in case pyenvis installed, the pyenv shim will take precedence (on your path) over your system's python binary, step back and modify the PKGBUILD to reflect your system's python3 binary's path, probably something similar to: /usr/bin/python3.

Then go ahead with a regular: $ makepkg -sric