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회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠