paws access to S3 timed out

415 Views Asked by At

I am trying to use the paws library in R to access an S3 bucket from my Windows machine:

svc <- paws::s3(config = list(credentials = list(profile=“my_profile”), region=“us-east-1”))

svc$list_objects(Bucket=“my-bucket”)

However, this results in a timeout:

Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached: [my-bucket.s3amazonaws.com] Operation timed out after 10003 milliseconds with 0 out of 0 bytes received.

This is perplexing because the CLI works fine:

aws —profile=my_profile s3 ls s3:://my-bucket

What would cause paws/curl to timeout if the AWS CLI works?

I tried to limit the number of keys returned with no beneficial effect:

svc$list_objects(Bucket=“my-bucket”, MaxKeys=10)
1

There are 1 best solutions below

0
On

The list_objects method actually worked for another bucket, that contained no objects, in the same account:

svc$list_objects(Bucket="empty-bucket")

Therefore, I hypothesize that the timeout is due to the fact that the original bucket being queried returned more object descriptors than could be fetched within the internal 10 second limit set by paws.