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

174
Vistas
Delete gcp bucket objects using s3 api

My code to delete the objects look like this:


const s3 = new AWS.S3({
    endpoint: spaceEndpoint,
    accessKeyId,
    secretAccessKey,
})

const params = {
    Bucket: bucketName,
    Delete: {
        Objects: assetsToDelete,
    },
}
try {
    const res1 = await s3.deleteObjects(params).promise()
}catch(e){
    console.log(e)
}

value of assetsToDelete is

  {
    Key: 'userId/folderName/object1'
  },
  {
    Key: 'userId/folderName/object2'
  }
]

But I'm getting an error:

InvalidArgument: Invalid argument.
   ErrorSTACK {
  code: 'InvalidArgument',
  region: null,
  time: 2021-02-12T20:30:42.055Z,
  requestId: null,
  extendedRequestId: undefined,
  cfId: undefined,
  statusCode: 400,
  retryable: false,
  retryDelay: 81.1455003388468
}

The above configuration works fine for upload and listing objects. I'm trying to delete from a gcp bucket.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

As of posting, Google Cloud Storage doesn't support Multi-object Delete.

That said, you can delete individual objects. If you would like to track the addition of this, you can view https://issuetracker.google.com/issues/162653700

Additionally, cloud.google.com/storage/docs/migrating#methods-comparison may be helpful in comparing the two surfaces and making calls as you continue on your migration from S3 to Google Cloud Storage

over 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