0

s3cmd ERROR: S3 error: 301 (PermanentRedirect).

To files uploads or subpath list, using s3cmd command line.

apt-get update && apt-get install -y python s3cmd

Try specific region but not worked.

Command line:

s3cmd ls s3://bucket-my-name-sp/hello/ --region sa-east-1

Or

s3cmd put object s3://backup-mobiauto-sp/hello/object --region sa-east-1

s3cmd ERROR: S3 error: 301 (PermanentRedirect): The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

reinaldo pinto
  • 117
  • 1
  • 6

1 Answers1

0

Issue Resolved!

How I am using Docker, changed the lines and it worked.

RUN apt-get update && apt-get install -y wget python python3 python3-pip
RUN pip3 install --upgrade setuptools
RUN wget https://github.com/s3tools/s3cmd/releases/download/v2.0.2/s3cmd-2.0.2.tar.gz -P /tmp
RUN tar xvzf /tmp/s3cmd-2.0.2.tar.gz -C /tmp
RUN cd /tmp/s3cmd-2.0.2/ && python3 setup.py install

Return OK:

s3cmd ls s3://bucket-my-name-sp/hello --recursive
2019-05-27 13:57 253906017   s3://bucket-my-name-sp/hello/physical/2019-05-27-10-57.tar.gz
reinaldo pinto
  • 117
  • 1
  • 6