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
s3.copyObject({ Bucket, CopySource: `/${Bucket}/${Key}?versionId=${versionId}`, Key, }).promise() if you do pass a versionId this is what it looks like.
s3.copyObject({ Bucket, CopySource: `/${Bucket}/${Key}?versionId=${versionId}`, Key, }).promise()
versionId
took me longer than i'd care to admit to figure out.