Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix URL output #6

Closed
wants to merge 1 commit into from
Closed

Fix URL output #6

wants to merge 1 commit into from

Conversation

kj187
Copy link
Contributor

@kj187 kj187 commented Oct 13, 2017

No description provided.

@fernando-mc
Copy link
Owner

Thanks for the PR @kj187.

I'll look at this a bit in detail after work but I think AWS has two different URLs that the files will show up at. Did I mess mine up completely? Or is it possible both your version and my version are correct?

If we can, I'd say we just output both formats of the URL.

@fernando-mc
Copy link
Owner

@kj187 This is what I was referencing - http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html

The two general forms of an Amazon S3 website endpoint are as follows:
bucket-name.s3-website-region.amazonaws.com
bucket-name.s3-website.region.amazonaws.com

It also looks like there is some variation in the erndpoints depending on region?
http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints

I might have to take a closer look at all this to see which of these work and don't and which we should be outputting.

@amsross
Copy link
Contributor

amsross commented Nov 17, 2017

What about the format http://${bucket-name}.s3-website-us-east-1.amazonaws.com/?

Although https://s3.amazonaws.com/${bucket-name} is both valid and HTTPS, using that to view a static site with relative URLs is not possible.

It is possible that all three types should be returned?

@fernando-mc
Copy link
Owner

@amsross I think that's a valid point. I honestly haven't had time to look at all the valid URLs that can be made by AWS when deploying a static site on top of the ones that you might use to reference files directly in S3.

Here's a sample app I've deployed with this if you want to test how you can access the site:
http://node-serverless-text-message-app.s3-website-us-east-1.amazonaws.com

I could access the index page with the bucket/key. But I think this isn't technically the static site URL. It's the S3 URL to get the file. http://s3.amazonaws.com/node-serverless-text-message-app/index.

If anyone wants to speed up the PR for any changes here then I think we might want to know:

  1. What the "official" AWS static site endpoint 'formula' for creating the static site URLs is
  2. If anyone cares about this outputting the non-official urls you could access the site by.

After reviewing all this I'm inclined to say we stay pretty succinct here and just output the official one.

@fernando-mc
Copy link
Owner

Closing this in favor of #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants