Open Akasurde opened 1 year ago
cc @hiahab
@hiahab thanks for taking the time to report this issue
A couple of things,
amazon.aws 2.3.0
) that we no longer support. Could you test with 6.4.0 please."s3_url": "https://xxxxxxxxxxx",
are you explicitly setting s3_url
? Are you talking to AWS S3 or is this another "S3 compatible" API?Hi @tremble
This is my playbook, testet in collection amazon.aws: 1.4.1, 2.3.0, 3.5.0 and 6.4.0
When using collection amazon.aws 6.4.0 I replace amazon.aws.aws_s3
with amazon.aws.s3_object
and replace s3_url
with endpoint_url
, as by the documentation.
- name: 'Copy over to S3 bucket'
amazon.aws.aws_s3:
access_key: "xxxxxxxxxxxxxx"
secret_key: "xxxxxxxxxxxxxx"
s3_url: "https://s3.example.com"
bucket: "backups"
src: "/src/path/backup-me.tgz"
object: "my-bucket/backup-me.tgz"
mode: put
I have no problem listing the content of my bucket with the following playbook:
- name: 'List S3 bucket'
# amazon.aws.s3_object:
amazon.aws.aws_s3:
access_key: "xxxxxxxxxxxxxx"
secret_key: "xxxxxxxxxxxxxx"
s3_url: "https://s3.example.com"
bucket: "backups"
prefix: "my-bucket/"
mode: list
I wonder if there is package "missmatch"???
[Update]
Running Ubuntu 20.04 LTS I install some parts via apt:
apt-get --yes --no-install-recommends install python3 python3-pip python3-firewall python3-dbus
While to be able to have a not so old ansible version I install the rest with pip:
sudo pip3 install botocore boto3
Summary
I have a playbook that uploads a file to a S3 bucket .
It works fine when using
ansible-galaxy collection install amazon.aws:1.4.x
But from collection 2.3.0 and higher the playbook fails with:
Issue Type
Bug Report
Component Name
pip3
Ansible Version
Configuration
OS / Environment
Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal
Steps to Reproduce
Expected Results
PLAY [Playbook S3 backup] **** TASK [Gathering Facts] **** Tuesday 19 September 2023 14:29:27 +0000 (0:00:00.053) 0:00:00.053 * ok: [127.0.0.1]
TASK [s3-backup : S3 Backup] *** Tuesday 19 September 2023 14:29:32 +0000 (0:00:05.133) 0:00:05.186 ***** included: /home/vagrant/xxxxxxxx/roles/s3-backup/tasks/backup-job.yml for 127.0.0.1
TASK [s3-backup : Copy over to S3 bucket] *** Tuesday 19 September 2023 14:29:33 +0000 (0:00:00.238) 0:00:06.592 ***** changed: [127.0.0.1]
PLAY RECAP *** 127.0.0.1 : ok=7 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Tuesday 19 September 2023 14:29:35 +0000 (0:00:00.267) 0:00:08.453 ***** \=============================================================================== Gathering Facts --------------------------------------------------------------------------------------------------------------------- 5.13s s3-backup : Copy over to S3 bucket ----------------------------------------------------------------------------------------------- 0.86s s3-backup : S3 Backup ------------------------------------------------------------------------------------------------------------- 0.21s
Actual Results
Code of Conduct