I'm trying to copy an object from one folder to another folder in my S3 bucket. I'm using copyObject to achieve that goal.
After looking at the documentation PUT Object — Copy, I’m doing a request where I’m sending the following params:
{
Bucket: 'bucket-name',
CopySource: 'bucket-name/Desarrollo/1/Fraccionamiento/3/Vivienda/101/Acuse%20Vendedores.pdf',
Key: 'Expedientes/2017/Queretaro/Febrero/226/Acuse%20Vendedores.pdf',
ACL: 'public-read'
}
However, I keep getting this error back:
NoSuchKey: The specified key does not exist
Not sure what I’m doing wrong. The error says that no such key exists. In my params the Key clearly does not exist, because that is where I want the new object to be copied to. I’ve even tried manually creating the new target folder beforehand. As far as I understand the documentation that I mention above, the key is the target. What value should I put for the key?