GitHub user kevinpan45 closed a discussion: How to access public bucket in AWS 
S3

I use Java Binding to collect [OpenNeuro ](https://openneuro.org/) Datasets, 
but when I list object in code, the request return 403, what should i do for 
this error.

<details><summary>Error message</summary>
<p>

Exception in thread "main" org.apache.opendal.OpenDALException: 
PermissionDenied (permanent) at List::next => S3Error { code: "AccessDenied", 
message: "Access Denied", resource: "", request_id: "T27BQ3PG49CJE5MG" }

Context:
   uri: 
https://s3.us-east-1.amazonaws.com/openneuro.org?delimiter=%2F&list-type=2&prefix=ds005619%2F
   response: Parts { status: 403, version: HTTP/1.1, headers: 
{"x-amz-bucket-region": "us-east-1", "x-amz-request-id": "T27BQ3PG49CJE5MG", 
"x-amz-id-2": 
"oHGyceLhSyQUmrII5a/nJIf7oiH/wHzrCkx6sLZiLALg+uUeDwcS7a59QNdptV2MELxCdz9ioMs=", 
"content-type": "application/xml", "transfer-encoding": "chunked", "date": 
"Wed, 27 Nov 2024 07:41:44 GMT", "server": "AmazonS3"} }
   service: s3
   path: ds005619/
   listed: 0

        at org.apache.opendal.Operator.list(Native Method)
        at org.apache.opendal.Operator.list(Operator.java:108)
        at 
tech.kp45.bids.bridge.collector.openneuro.sdk.OpenNeuroSdk.main(OpenNeuroSdk.java:60)

</p>
</details> 

OpenNeuro aws cli command 
`aws s3 sync --no-sign-request s3://openneuro.org/ds005619 ds005619-download/`

GitHub link: https://github.com/apache/opendal/discussions/5363

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to