0

I am using below code to copy object in aws bucket but i am getting this error

error Error [InternalError]: S3 aborted request
    at ./aws-reading/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/throw-200-exceptions.js:16:21

functions to copycommand is below. s3Client is created successfully.

const updateMetaTag = async () => {
  const params = {
            Bucket: "mybucket",
            Key: 'key'
        };
        params.Metadata = { "time-taken": timeStamp }
    try
    {
        const command = new CopyObjectCommand(params);
        const response = await s3Client.send(command);
        console.log('response of updateMetaTag', response);
    } catch (error)
    {
        console.log('error', error);
    }
};
Bilal Rabbi
  • 1,602
  • 2
  • 18
  • 39

0 Answers0