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
asked 3 months ago98 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions