Closed matthewt-assurity closed 2 weeks ago
Hi sorry to hear that, have you tried to setting anonymous? https://www.paws-r-sdk.com/docs/set_service_parameter/ I am currently having a holiday hence my slow replies.
Thanks @DyfanJones, I've updated my code to the below and it works!
s3 <- paws::s3(
config = list(
credentials = list(
anonymous = TRUE
)
)
)
bucket_name = "herbariumnsw-pds"
objects <- s3$list_objects_v2(
Bucket = bucket_name,
MaxKeys = 2
)
I got a little stuck when I was using anonymous initially. I first tried to set this in the wrong function, i.e
objects <- s3$list_objects_v2(
config = list(
credentials = list(
anonymous = TRUE
)
),
Bucket = bucket_name,
MaxKeys = 2
)
@matthewt-assurity I'm glad you got it working. I will close this ticket. Feel free open again if the issue persists
Hello!
I'm trying to access a public S3 bucket, however I'm getting a 403 error.
Code I'm running:
Exact response message:
The error makes it sound like I am trying to provide an access key ID, which I'm not explicitly, but I wonder if it is picking up on what is in my local AWS keys saved via running
aws configure
with the AWS CLI. Either way, I shouldn't need an access key to access a public S3 bucket, so I'm a bit confused.For reference, I'm following this tutorial https://blog.djnavarro.net/posts/2022-03-17_using-aws-s3-in-r/. \
I am using paws instead of cloudyr, but I don't think this should make a difference as to whether I can access a public S3 bucket or not (I hope!).