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 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容