Seperate URL building out into a clean, new, tested module
Allow for swapping out the URL-building logic entirely
Better configurability for dual-stack such as opt-out
Allow forcing regional endpoints for local STS
Continue supporting basic fixedEndpoint usage
A better fix for #3 / #7
Examples
// just defaults (dualstack)
const s3 = new ApiFactory().makeNew(S3);
// disabling global endpoints for better latency
const stsRegional = new ApiFactory({
endpointResolver: new AwsEndpointResolver({
forceRegional: true,
}),
}).makeNew(STS);
// non-AWS S3 backend that still has regions and host based routing
const linodeObjects = new ApiFactory({
endpointResolver: new S3CompatibleEndpointResolver('linodeobjects.com'),
}).makeNew(S3);
A better fix for #3 / #7
Examples