aws-cli


Eddie Seelke

Recommended Posts

I am trying to get aws-cli running on my unRAID server so I can use it with user-scripts. I have un-get installed and was able to install aws-cli using it. It seems it does not handle dependencies, so I am going through until I find them all. I already had python installed. So far, I have installed the following packages.

un-get install aws-cli python-botocore python-jmespath python-dateutil python-six python-urllib3 colorama python-docutils python-PyYAML python-s3transfer rsa pyasn1

 

Now I am getting the following error when trying to run the aws command.

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/lib64/python3.9/site-packages/awscli/clidriver.py", line 69, in main
    driver = create_clidriver()
  File "/usr/lib64/python3.9/site-packages/awscli/clidriver.py", line 78, in create_clidriver
    load_plugins(session.full_config.get('plugins', {}),
  File "/usr/lib64/python3.9/site-packages/awscli/plugin.py", line 44, in load_plugins
    modules = _import_plugins(plugin_mapping)
  File "/usr/lib64/python3.9/site-packages/awscli/plugin.py", line 61, in _import_plugins
    module = __import__(path, fromlist=[module])
  File "/usr/lib64/python3.9/site-packages/awscli/handlers.py", line 34, in <module>
    from awscli.customizations.codedeploy.codedeploy import initialize as \
  File "/usr/lib64/python3.9/site-packages/awscli/customizations/codedeploy/codedeploy.py", line 17, in <module>
    from awscli.customizations.codedeploy.push import Push
  File "/usr/lib64/python3.9/site-packages/awscli/customizations/codedeploy/push.py", line 24, in <module>
    from awscli.customizations.codedeploy.utils import validate_s3_location
  File "/usr/lib64/python3.9/site-packages/awscli/customizations/codedeploy/utils.py", line 19, in <module>
    from awscli.customizations.codedeploy.systems import System, Ubuntu, Windows, RHEL
  File "/usr/lib64/python3.9/site-packages/awscli/customizations/codedeploy/systems.py", line 14, in <module>
    import ctypes
  File "/usr/lib64/python3.9/ctypes/__init__.py", line 8, in <module>
    from _ctypes import Union, Structure, Array
ImportError: libffi.so.7: cannot open shared object file: No such file or directory

 

I'm not sure where to go from here and was hoping someone here may be able to help.

Link to comment
  • 8 months later...

Are you still having troubles with this? I got the AWS CLI working by installing it via docker, mounting a drive from the NAS that has the .config and .credentials files so I could then use it with multiple profiles. I wanted an easy way of running it to perform some off-prem backups to S3 so I then use the User Scripts plugin to create a bash script that installed it via docker and then ran the commands I need.

I put together a simple GIST using an example of listing the S3 bucket: https://gist.github.com/StevenMapes/f7a9959f9bac076219421664fa4165f3

 

Obviously that doesn't cover setting up the IAMs but it's the cleanest way I've found of using the AWS CLI with Unraid

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.