aws.s3 icon indicating copy to clipboard operation
aws.s3 copied to clipboard

Retrieving a csv file in S3 -

Open BrianMiner opened this issue 7 years ago • 2 comments

I am able to access my buckets as

library("aws.s3")
bucketlist()

I have a csv file in a bucket nested in folders. When I try to read in the csv:

read.csv(text = rawToChar(get_object(object = "/folder/folder2/filename.csv", bucket="mybucket")))

I received an error (is there a more proper way to access the file)?

X..xml.version.1.0.encoding.UTF.8..
1 <Error><Code>PermanentRedirect</Code><Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message><Bucket>mybucket</Bucket><Endpoint>mybucket.s3.amazonaws.com</Endpoint><RequestId>8DD0D95EA0113249</RequestId><HostId>rsU23k2Q4lTEUqLDL+074wwZdlCVHOPnec6aip5sGUmCHax2ety9don+3SAR8JWWa1rvSFYK+hk=</HostId></Error>

BrianMiner avatar Jul 30 '18 00:07 BrianMiner

Try adding url_style ="virtual" to your call.

leeper avatar Jul 30 '18 00:07 leeper

image

arpit1195 avatar Oct 06 '18 15:10 arpit1195