1

I can successfully put an object (pdf file) into my S3 bucket base folder using the put_object function from aws.s3. However, it doesn't work when I specify a folder in the function. I don't get any error messages and the output in R looks like it has worked:

[1] TRUE

This is my code:

put_object(file = "myfile.pdf", object = "myfile2.pdf", bucket = "my_bucket", folder = 'folder/subfolder1/subfolder2' )

I've read the package documentation and the post here .

Thanks

Micharro
  • 41
  • 3

1 Answers1

0

If you want to create a "folder" in S3 you have to use the other function from the package:

put_folder(folder, bucket, ...)

If you want to put a file inside that "folder" you have to specify the destination key:

put_object(file = "myfile.pdf", object = "folder/subfolder1/subfolder2/myfile2.pdf", bucket = "my_bucket")

As described here.

PS: There are only objects is S3.

André Guerra
  • 486
  • 7
  • 22