Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

128
Vistas
AWS CLI: copy command fails when copying from instance to bucket

I have two EC2 instances running in a custom VPC, with one running Ubuntu 16.04 and the other running Amazon Linux 2017.03. I have also assigned a IAM Role that allows read and write access to all S3 buckets.

However when I try to run the copy command, to copy a file from the instance to the S3 bucket, it fails on the Ubuntu server. The command I run on both servers is:

aws s3 cp /myfolder/myfile.txt s3://mybucket/backups/

It gives the following error on Ubuntu:

upload failed: ../../myfolder/myfile.txt to s3://mybucket/backups/myfile.txt seek() takes 2 positional arguments but 3 were given

Everything else works, for example, downloading a file from the bucket to the server through the copy command. There is no problem in the VPC setting and neither the IAM Role nor the Security Group, since the same applies to the other server running Amazon Linux.

PS: Running the copy command with the --dryrun switch gives no error on the Ubuntu server.

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Most likely it's python version and aws cli version mismatch issue. Post aws cli version and python version

python -V
aws --version

Install awscli with pip only so that it gets proper python version.

pip install awscli

Ref: github.com/aws/aws-cli/issues/2403

about 4 years ago · Santiago Trujillo Denunciar

0

I have the same issue. The problem is I used the Ubuntu package manager to install the aws package. We should use this command to install the aws command:

pip3 install awscli --upgrade --user

for more information, see Installing, updating, and uninstalling the AWS CLI in the documentation.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda