### Elasticsearch Version

8.3.1

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Linux 5.4.196-108.356.amzn2.x86_64

### Problem Description

Elasticsearch in EKS does not honour `eks.amazonaws.com/sts-regional-endpoints=true` for IAM access with AWS regions. It always sends it's API calls to `us-east-1`.

### Steps to Reproduce

Deploy Elasticsearch in EKS using operator with the following env
```
          containers:
            - env:
                - name: AWS_ROLE_SESSION_NAME
                  value: snapshot-repo
                - name: ZONE
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.annotations['topology.kubernetes.io/zone']
```

Create service account with the annotations
```
  annotations:
    eks.amazonaws.com/role-arn: redacted
    eks.amazonaws.com/sts-regional-endpoints: "true"
```

Create snapshot repo
```
PUT _snapshot/s3backup
{
    "type": "s3",
    "settings": {
      "bucket": "redacted",
      "server_side_encryption": "true",
      "max_restore_bytes_per_sec": "500mb",
      "storage_class": "intelligent_tiering",
      "use_throttle_retries": "true",
      "readonly": "false",
      "base_path": "snapshot",
      "region": "us-west-2",
      "max_snapshot_bytes_per_sec": "500mb",
      "endpoint": "s3.us-west-2.amazonaws.com"
  }
}
```

Run snapshot

View cloudtrail events for service account name
![2022-08-08_11-36-48](https://user-images.githubusercontent.com/64858237/183456721-db86153c-ccc3-4821-8c84-f8c85cb4e495.png)


### Logs (if relevant)

_No response_
modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/CustomWebIdentityTokenCredentialsProviderTests.java
<Credentials>
                              <SessionToken>sts_session_token</SessionToken>
                              <SecretAccessKey>secret_access_key</SecretAccessKey>
                              <Expiration>%s</Expiration>
                              <AccessKeyId>sts_access_key</AccessKeyId>
                            </Credentials>
                            <SourceIdentity>SourceIdentityValue</SourceIdentity>
                            <Provider>www.amazon.com</Provider>
                          </AssumeRoleWithWebIdentityResult>
                          <ResponseMetadata>
                            <RequestId>ad4156e9-bce1-11e2-82e6-6b6efEXAMPLE</RequestId>
                          </ResponseMetadata>
                        </AssumeRoleWithWebIdentityResponse>
                        """,
                    ROLE_ARN,
                    ROLE_NAME,
                    ZonedDateTime.now().plusDays(1L).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ"))
                ).getBytes(StandardCharsets.UTF_8);
                exchange.sendResponseHeaders(RestStatus.OK.getStatus(), response.length);
                exchange.getResponseBody().write(response);
            }
        });
        httpServer.start();
        Path configDirectory = Files.createTempDirectory("web-identity-token-test");
        Files.createDirectory(configDirectory.resolve("repository-s3"));
        Files.writeString(configDirectory.resolve("repository-s3/aws-web-identity-token-file"), "YXdzLXdlYi1pZGVudGl0eS10b2tlbi1maWxl");
        Environment environment = Mockito.mock(Environment.class);
        Mockito.when(environment.configFile()).thenReturn(configDirectory);
        
        Map<String, String> environmentVariables = Map.of(