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

Use of Virtual Host S3 Bucket Names #75

Open
ulmermark opened this issue May 2, 2017 · 0 comments
Open

Use of Virtual Host S3 Bucket Names #75

ulmermark opened this issue May 2, 2017 · 0 comments

Comments

@ulmermark
Copy link

Having an issue where the file path does not have a bucket name in it as we would like to use the following:

s3://[email protected]/folder/folder/

where my.bucket.name.com CNAME is my.bucket.name.com.s3.amazonaws.com

The documentation on this feature is here:
http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html

Any bucket with a DNS-compatible name can be referenced as follows: http://[BucketName].s3.amazonaws.com/[Filename], for example, http://images.johnsmith.net.s3.amazonaws.com/mydog.jpg. By using CNAME, you can map images.johnsmith.net to an Amazon S3 host name so that the previous URL could become http://images.johnsmith.net/mydog.jpg.

The above URI does not work as there is NOT a bucket name after the endpoint. I have tried the following as well with no success.

s3://[email protected]//folder/folder/ {empty bucket}

The following will work:

s3://[email protected]/my.bucket.name.com/folder/folder/

There is a call to ListAllMyBuckets within the S3FS library that forces permissions to be able to ListAllMyBuckets to the following resource "s3.amazonaws.com" in the above example. I would not like to have to do that but allow the use of the original sample at the top

s3://[email protected]/folder/folder/ { The bucket is in the endpoint..virtual hosting}

This would then only require the AWS user to have permissions to ListAllMyBuckets to the resource which is "my.bucket.name.com"

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

No branches or pull requests

1 participant