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

320
Views
Cómo cargar archivos en el depósito localstack s3

Instalé localstack en mi máquina Linux, también configuré AWS CLI y creé un depósito usando awslocal como lo sugieren los documentos. aquí está el enlace para crear un depósito s3 en localstack. https://docs.localstack.cloud/aws/s3/

Y, ahora estoy tratando de cargar un archivo en el cubo, arrojaba un error

 InvalidBucketName: The specified bucket is not valid here is the **bucket name** { "Buckets": [ { "Name": "suresh", "CreationDate": "2022-04-20T07:07:59+00:00" } ], "Owner": { "DisplayName": "webfile", "ID": "bcaf1ffd86f41161ca5fb16fd081034f" } }

aquí está mi código usando el nodo js

 import fs from 'fs'; import S3 from 'aws-sdk/clients/s3'; const localstack = new S3({ region: 'eu-west-1', // The value here doesn't matter. endpoint: 'http://localhost:4566', // This is the localstack EDGE_PORT }); export const localstackFileUpload = async () => { const fileName = './suresh.txt'; return localstack .upload({ Bucket: 'suresh', Key: fileName, Body: fs.readFileSync(fileName), }) .promise() .then((res) => { console.log(' res ', res); }) .catch((err) => { console.log(' err ', err); }); };
about 4 years ago · Juan Pablo Isaza
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!