I would like to know how to copy the object from s3 to s3 using node.js With the aws s3 command, It could be executed as follows.
s3 cp --recursive s3://xx/yy s
Note that encodeURI is required if the filename has special chars
encodeURI
await S3.copyObject({ Bucket: bucketName, CopySource: encodeURI(`/${sourceBucketName}/${filename}`), Key: filename, }).promise()