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

183
Vistas
Descargue una carpeta específica y todos sus archivos recursivamente desde S3 bitbucket usando boto

Sé cómo descargar archivos recursivamente usando aws cli

 aws s3 cp {s3Directory} {localDirectory} --recursive

Pero quiero usar Python Boto y debajo está mi código. Quiero descargar carpetas y todos sus archivos ('Daily/2017/02/15/') del depósito 'news-live'. Cuando ejecuto el siguiente comando, se crean todas las carpetas pero no se descarga ningún archivo.

 def main(): DOWNLOAD_LOCATION_PATH = "/Users/test/" BUCKET_NAME = 'news-live' conn = boto.connect_s3(AWS_ACCESS_KEY_ID, AWS_ACCESS_SECRET_KEY) bucket = conn.get_bucket(BUCKET_NAME) #goto through the list of files bucket_list = bucket.list('Daily/2017/02/15/') for l in bucket_list: key_string = str(l.key) print("bucket key", l.key) s3_path = DOWNLOAD_LOCATION_PATH + key_string try: print ("Current File is ", s3_path) l.get_contents_to_filename(s3_path) except (OSError,S3ResponseError) as e: pass # check if the file has been downloaded locally if not os.path.exists(s3_path): try: os.makedirs(s3_path) except OSError as exc: # let guard againts race conditions import errno if exc.errno != errno.EEXIST: raise

No sé cómo conseguir este trabajo.

over 4 years ago · Santiago Trujillo
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