mountpoint-s3 icon indicating copy to clipboard operation
mountpoint-s3 copied to clipboard

Endpoint resolution & access points

Open jamesbornholt opened this issue 3 years ago • 5 comments

Currently our endpoint resolution logic is the very naive:

format!("{}.s3.{}.amazonaws.com", bucket, self.region);

But this doesn't support:

  • Dual-stack endpoints (IPv6)
  • FIPS endpoints
  • Transfer acceleration endpoints
  • Regions that don't end in amazonaws.com (e.g., China regions)
  • Access points
  • PrivateLink endpoints

It doesn't look like the CRT has any built-in support for dealing with these, so we might need to do it ourselves.

jamesbornholt avatar Oct 14 '22 16:10 jamesbornholt

Can we reuse some code from aws sdk rust? I see they have something like endpoint_resolver() in their code, so we don't have to implement it ourselves.

monthonk avatar Oct 17 '22 14:10 monthonk

Oh neat! That will save us from dealing with the other partitions, at least. We still need to figure out access points.

jamesbornholt avatar Oct 17 '22 15:10 jamesbornholt

Thinking about it a bit more, there's roughly three things we need to do here:

  1. Correct endpoint resolution for regions outside the aws partition
  2. Allow the customer to provide an endpoint URL like the SDKs do—this should enable FIPS, IPv6, Transfer Acceleration, PrivateLink, and Multi-Region Access Points (and we should test these)
  3. Document that (single-region) Access Points can be used via access point aliases

jamesbornholt avatar Nov 17 '22 04:11 jamesbornholt

Also need to test S3 on Outposts here.

jamesbornholt avatar Jan 18 '23 19:01 jamesbornholt

#61 will let us specify custom endpoint URLs. But some of these things work without that:

  • Access points can be specified using bucket aliases
  • Gateway VPC endpoints are a networking-level thing and should just work

I've tested both these and they are working on mainline.

jamesbornholt avatar Jan 27 '23 19:01 jamesbornholt

There's a little bit of experimental code on this branch which may be good to use as a reference point: https://github.com/awslabs/mountpoint-s3/tree/endpoint-rule-engine

dannycjones avatar May 31 '23 13:05 dannycjones

#428 wrapped this one up, except for testing, which is in #417.

jamesbornholt avatar Aug 05 '23 04:08 jamesbornholt