PDA

View Full Version : aws-cli tools broken in EC2 build



davidwann
20-Oct-2015, 07:23
When I run aws --version in a standard SLES 11.3 AWS build with a public
IP, I get the following trace:

Traceback (most recent call last):
File "/usr/bin/aws", line 23, in <module>
sys.exit(main())
File "/usr/bin/aws", line 19, in main
return awscli.clidriver.main()
File "/usr/lib64/python2.6/site-packages/awscli/clidriver.py", line
45, in main
driver = create_clidriver()
File "/usr/lib64/python2.6/site-packages/awscli/clidriver.py", line
54, in create_clidriver
event_hooks=emitter)
File "/usr/lib64/python2.6/site-packages/awscli/plugin.py", line 44,
in load_plugins
modules = _import_plugins(plugin_mapping)
File "/usr/lib64/python2.6/site-packages/awscli/plugin.py", line 61,
in _import_plugins
module = __import__(path, fromlist=[module])
File "/usr/lib64/python2.6/site-packages/awscli/handlers.py", line 24,
in <module>
from awscli.customizations.ec2addcount import ec2_add_count
File
"/usr/lib64/python2.6/site-packages/awscli/customizations/ec2addcount.py",
line 16, in <module>
from botocore.parameters import StringParameter
ImportError: No module named parameters


The aws-cli package is installed but does not seem to be a part of any
repositories. Is there an easy way to update the tools and/or get it
working? The GitHub version requires pip, but pip is not available in the repositories either.

David W.

rjschwei
21-Oct-2015, 13:02
The aws-cli package did not make it into the SLES 11 SP{3,4} public cloud repository stream because SLES 11 SP{3,4} has many Python packages that are of the older variety that we could not update and that aws-cli depends on. The version of aws-cli that is built into the images we publish is pulled from the openSUSE Build service [1]. First, what we publish in our images should work, thus I filed a bug [2]. That said, the SP3 images are considered deprecated, see [3] since SLES 11 SP4 has been released [4]. I expect the same bad behavior in SLES 11 SP4 and we'll try and get it fixed or remove the package from the next image build.

[1] https://build.opensuse.org/package/show/Cloud:Tools/aws-cli
[2] https://bugzilla.suse.com/show_bug.cgi?id=951386
[3] https://www.suse.com/communities/conversations/suse-image-life-cycle-public-cloud-deployments/
[4] https://www.suse.com/communities/conversations/suse-linux-enterprise-server-11-sp4-landed-public-cloud/

davidwann
21-Oct-2015, 13:24
"or remove the package from the next image build"????

Really? I would have thought that the AWS command line tools were a fairly important package to get right in an AWS build. For example, the tools allow you to connect to an S3 bucket using the IAM role of the instance. This is probably the most secure way to run automated SUSE build scripts for a particular type of instance, and hence be able to scale a solution utilising SLES nodes. All the other linux builds allow you to do this.

rjschwei
31-Oct-2015, 22:09
Resolved with latest version, please upgrade.

zypper ar http://download.opensuse.org/repositories/Cloud:/Tools/SLE_11_SP3/ cloud_tools
zypper ar http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11_SP3/ python_dev

zypper in aws-cli-1.8.12-20.1.x86_64

then accept the vendor changes to OBS for the following packages:

python-jmespath
python-botocore
python-bcdoc