从S3存储桶访问数据时出错403

时间:2018-03-20 16:08:36

标签: r amazon-s3 amazon-ec2

我已将我的csv文件上传到s3存储桶。

我想阅读R

中上传的csv文件

我正在使用以下代码,我收到错误

usercsvobj <-get_object("s3.amazonaws.com/wdataset/08.Data.csv.xlsx")

> List of 4  $ Code     : chr "AccessDenied"  $ Message  : chr "Access
> Denied"  $ RequestId: chr "89601C0D6B9BD66E"  $ HostId   : chr
> "jWDPrqCpRkeh5YoaHalHDa2WWmyyJsiSM1orDRnXnWgmgxXV8NGl0ixgUAPTW4M5wC91y52aAgw="
>  - attr(*, "headers")=List of 6   ..$ x-amz-request-id : chr "89601C0D6B9BD66E"   ..$ x-amz-id-2       : chr
> "jWDPrqCpRkeh5YoaHalHDa2WWmyyJsiSM1orDRnXnWgmgxXV8NGl0ixgUAPTW4M5wC91y52aAgw="
> ..$ content-type     : chr "application/xml"   ..$ transfer-encoding:
> chr "chunked"   ..$ date             : chr "Tue, 20 Mar 2018 15:47:35
> GMT"   ..$ server           : chr "AmazonS3"   ..- attr(*, "class")=
> chr [1:2] "insensitive" "list"
>  - attr(*, "class")= chr "aws_error"
>  - attr(*, "request_canonical")= chr "GET\n/s3.amazonaws.com/wdataset/08.03Data.csv.xlsx/\nlocation=\nhost:s3.amazonaws.com\nx-amz-date:20180320T1547"|
> __truncated__
>  - attr(*, "request_string_to_sign")= chr "AWS4-HMAC-SHA256\n20180320T154736Z\n20180320/us-east-1/s3/aws4_request\n446775270ab311e3cd7d1a0855b1592a7437dae"|
> __truncated__
>  - attr(*, "request_signature")= chr "AWS4-HMAC-SHA256 Credential=AKIAIHS7A4UQKPC3VGEQ/20180320/us-east-1/s3/aws4_request,
> SignedHeaders=host;x-amz-d"| __truncated__ NULL Error in
> parse_aws_s3_response(r, Sig, verbose = verbose) :    Forbidden (HTTP
> 403).

任何人都可以帮我解决这个问题。这是一个小时,我无法解决这个错误。

0 个答案:

没有答案