cloudydeno / deno-aws_api

From-scratch Typescript client for accessing AWS APIs
https://deno.land/x/aws_api
59 stars 3 forks source link

Complete refactor of endpoint detection logic #10

Closed danopia closed 3 years ago

danopia commented 3 years ago

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);