devops-israel / aws-inventory

AWS Inventory in a single HTML file using JS AWS-SDK & Bootstrap
MIT License
388 stars 121 forks source link

S3 buckets #3

Closed Skarlso closed 6 years ago

Skarlso commented 6 years ago

Hi.

Added s3 to the list of services and a README update to include that S3 needs CORS configured on the bucket for it to work.

kesor commented 6 years ago

@Skarlso pretty sure that calling the S3 API does not require to change your bucket(s) to enable CORS. The CORS on buckets is for the web serving functionality.

Skarlso commented 6 years ago

Unfortunately if it's not set, than you'll get this:

index.html#:1 Failed to load https://s3.us-west-1.amazonaws.com/: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 403.

That said now, even if I do configure everything it still doesn't work properly. :/ S3 just isn't working man. Damn it. I'll close the pull.

Skarlso commented 6 years ago

S3 is a special case which I think is just not working through the browser properly right now.

BTW. Awesome stuff! :) 👍

kesor commented 6 years ago

Although S3 is supposed to have CORS according to https://github.com/aws/aws-sdk-js/blob/master/SERVICES.md

It does look like unfortunately, it doesn't work at the moment. Maybe someone from AWS will pick this up and fix it :/

Skarlso commented 6 years ago

Yep. :-( I even manipulated the request object and set some headers up before sending. Still didn't work. :-(