InvalidArgument: The secret key was invalid for the specified algorithm.

0
 const copyCmd = new CopyObjectCommand({
        CopySource: `bucket/${p.Key}`,
        Bucket: 'bucket',
        Key: `${p.Key}`,
        SSECustomerAlgorithm: ServerSideEncryption.AES256,
        SSECustomerKey: 'xxJTEaHrXYPvxp+SoxW9Y2+oTi+ZVc0NPHZUCA7dijg=',
      });
      const response = await s3.send(copyCmd);

The above piece of code is failing since yesterday. But the same thing works in my local but not in AWS Lambda.

  • Can you share what didnt work? Is related to access denied?

  • I am copying the file from one location to another but while copying I am adding server side encryption with custom key. The above code and key works just fine in a script with my AWS admin credentials but gives InvalidArgument: The secret key was invalid for the specified algorithm. error in lambda.

Sateesh
preguntada hace 3 meses102 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas