Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
¿Cómo getObject de la URL del protocolo S3 usando AWS SDK JS v3?

Tengo una URL que se parece a: s3://mybucket/data.txt . Estoy tratando de recuperar ese elemento usando la biblioteca AWS SDK JS v3 ( @aws-sdk/client-s3 ).

Cuando se usa el comando getObject , requiere un depósito y una clave.

¿Cómo puedo pasar la URL del protocolo S3 al cliente S3 para obtener el objeto basado en esa URL?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede analizar el URI para obtener el nombre del depósito y el nombre de la clave:

 import url from 'url'; var s3uri = new URL('s3://some-bucket-name/path/to/object.dat'); var bucket = s3uri.hostname; // Ignore the first slash, it's not part of the key name var key = s3uri.pathname.substr(1); console.log("Bucket: " + bucket + " / Key: " + key); // Bucket: some-bucket-name / Key: path/to/object.dat
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!