I\'m storing JSON objects in Amazon S3, and I\'d like to load that data directly from S3 from Javascript. My GET looks pretty generic:
$.ajax({
\'type\':
For my case, I want to GET some resources from a bucket "myBucket".
On the S3 client side, AWS S3 now support JSON to configure CORS policies [ref]
Bucket Policy:
[
{
"AllowedHeaders": [
"*",
"x-amz-*"
],
"AllowedMethods": [
"GET",
"HEAD"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}
]
On server-side / client side (JQUERY Ajax)
$.ajax({
type: "GET",
url: "https://myBucket/myObject",
});
Try it!, hope it helps!