#976098 awscli: No module named 'awscli_plugin_endpoint'

Package:
awscli
Source:
awscli
Submitter:
eingousef
Date:
2020-11-29 18:51:03 UTC
Severity:
important
Tags:
#976098#5
Date:
2020-11-29 18:04:20 UTC
From:
To:
Dear Maintainer,

I followed the documentation here : https://www.scaleway.com/en/docs/object-storage-with-aws-cli/

and after setting up my config files the commands fails with the following error :

Traceback (most recent call last):
  File "/usr/bin/aws", line 27, in <module>
    sys.exit(main())
  File "/usr/bin/aws", line 23, in main
    return awscli.clidriver.main()
  File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 68, in main
    driver = create_clidriver()
  File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 77, in create_clidriver
    load_plugins(session.full_config.get('plugins', {}),
  File "/usr/lib/python3/dist-packages/awscli/plugin.py", line 44, in load_plugins
    modules = _import_plugins(plugin_mapping)
  File "/usr/lib/python3/dist-packages/awscli/plugin.py", line 58, in _import_plugins
    plugins.append(__import__(path))
ModuleNotFoundError: No module named 'awscli_plugin_endpoint'

I've tried to install aws-related python packages without success, and
haven't investigated further.

Is there a dependency missing ?

Regards,

#976098#10
Date:
2020-11-29 18:47:57 UTC
From:
To:
Control: tags -1 + moreinfo

These have you installing python packages using pip.  That's not part of
Debian.  What are the exact steps you're following, and which components
distributed by Debian appear to be misbehaving?
installation, that's not a Debian bug.

FWIW, I followed the first few steps of the instructions that you
referenced, substituting "apt install awscli" in place of their "pip3
install awscli" invocation, and didn't have any issues.  I don't have an
account with scaleway, so I can't confirm the functionality, but I had
no problems installing, configuring, and initializing the plugin.  See
details in the below transcript:

root@ce1f77a63fd8:~# apt install awscli
...
Setting up awscli (1.18.135-1) ...
root@ce1f77a63fd8:~# pip3 install awscli-plugin-endpoint
Collecting awscli-plugin-endpoint
  Downloading awscli_plugin_endpoint-0.4-py2.py3-none-any.whl (7.6 kB)
Requirement already satisfied: awscli>=1.11.0 in /usr/lib/python3/dist-packages (from awscli-plugin-endpoint) (1.18.135)
Installing collected packages: awscli-plugin-endpoint
Successfully installed awscli-plugin-endpoint-0.4
root@ce1f77a63fd8:~# ls /usr/local/lib/python3.9/dist-packages/
awscli_plugin_endpoint	awscli_plugin_endpoint-0.4.dist-info
root@ce1f77a63fd8:~# aws configure set plugins.endpoint awscli_plugin_endpoint
root@ce1f77a63fd8:~# cat ~/.aws/config
[plugins]
endpoint = awscli_plugin_endpoint
root@ce1f77a63fd8:~# cat <<EOF > .aws/config
endpoint = awscli_plugin_endpoint

[default]
region = nl-ams
s3 =
  endpoint_url = https://s3.nl-ams.scw.cloud
  signature_version = s3v4
  max_concurrent_requests = 100
  max_queue_size = 1000
  multipart_threshold = 50MB
  # Edit the multipart_chunksize value according to the file sizes that you want to upload. The present configuration allows to upload files up to 10 GB (100 requests * 10MB). For example setting it to 5GB allows you to upload files up to 5TB.
  multipart_chunksize = 10MB
s3api =
  endpoint_url = https://s3.nl-ams.scw.cloud
EOF
root@ce1f77a63fd8:~# aws --region nl-ams s3 ls
Unable to locate credentials. You can configure credentials by running "aws configure".