title: Use AWS sdk ruby with custom AWS endpoints.json
body: <p>I am deploying some services on a different cloud than the AWS cloud, but that exposes AWS compatible endpoints.</p>
  <p>I was given an endpoints.json file that looks like this</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;partitions&quot;: [
      {
        &quot;defaults&quot;: {
          &quot;hostname&quot;: &quot;{service}.{region}.{dnsSuffix}&quot;,
          &quot;protocols&quot;: [
            &quot;https&quot;
          ],
          &quot;signatureVersions&quot;: [
            &quot;v4&quot;
          ]
        },
        &quot;dnsSuffix&quot;: &quot;outscale.com&quot;,
        &quot;partition&quot;: &quot;osc&quot;,
        &quot;partitionName&quot;: &quot;Outscale&quot;,
        &quot;regionRegex&quot;: &quot;^(cloudgouv|us|eu|ap)\\-\\w+\\-\\d+$&quot;,
        &quot;regions&quot;: {
          &quot;eu-west-2&quot;: {
            &quot;description&quot;: &quot;EU (Paris)&quot;
          },
          [...]
        },
        &quot;services&quot;: {
          &quot;ec2&quot;: {
            &quot;endpoints&quot;: {
              &quot;eu-west-2&quot;: {&quot;hostname&quot;: &quot;fcu.eu-west-2.outscale.com&quot;},
              [...]
            }
          },
  </code></pre>
  <p>How can I easily import this in my AWS sdk v3 ? When looking at the doc there seems to be something quite similar available, but I'm not sure I understand how to load this config from my ruby code</p>
  <p>I know I can do something like this</p>
  <pre><code>Aws.config.update(
    region: 'cloudgouv-eu-west-1'
  )
  </code></pre>
  <p>But I'm not sure how to import the whole config (and especially the endpoints name, etc.) so they will automatically be used by underlying sdks without changing too much code</p>