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
已提問 3 個月前檢視次數 102 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南