title: aws elasticsearch signed delete request returns 403 forbidden (using apache httpclient)
body: <p>I'm getting an http <code>403 forbidden</code> error trying to delete an <code>aws elasticsearch</code> index via the java <a href="https://github.com/searchbox-io/Jest" rel="nofollow noreferrer">Jest(v6.3)</a> elasticsearch client (which delegates the http calls to <a href="https://hc.apache.org/httpcomponents-client-ga/" rel="nofollow noreferrer">apache httpclient(v4.5.2)</a>   I know my permissions are setup correctly in AWS as I'm able to successfully use postman(with the help of AWS Signature authorization helper).  however, with <code>apache httpclient</code>, when I issue the <code>DELETE /{myIndexName}</code> I receive the following error:</p>
  
  <pre><code>    The request signature we calculated does not match the signature you provided. 
      Check your AWS Secret Access Key and signing method. 
  Consult the service documentation for details.
  </code></pre>
  
  <p>I'm signing the <code>aws</code> request by configuring the <code>apache httpclient</code> with an interceptor that signs the request.(The code below is for a <code>Spring Framework @Configuration</code> class that wires up the java <code>Jest</code> client and underlying apache httpclient) but I imagine if I used apache httpclient directly I'd experience the same issue.</p>
  
  <pre><code>@Configuration
  public class ElasticSearchConfiguration {
  
      @Autowired
      private CredentialsProviderFactoryBean awsCredentialsProvider;
  
      @Bean
      public JestClient awsJestClient(@Value("${elasticsearch.url}") String connectionUrl) throws Exception {
          com.amazonaws.auth.AWSCredentialsProvider provider = awsCredentialsProvider.getObject();
  
          final com.google.common.base.Supplier&lt;LocalDateTime&gt; clock = () -&gt; LocalDateTime.now(ZoneOffset.UTC);
          final vc.inreach.aws.request.AWSSigner awsSigner = new vc.inreach.aws.request.AWSSigner(provider, "us-east-1", "es", clock);
          final vc.inreach.aws.request.AWSSigningRequestInterceptor requestInterceptor = new vc.inreach.aws.request.AWSSigningRequestInterceptor(awsSigner);
  
  
          final JestClientFactory factory = new JestClientFactory() {
              @Override
              protected HttpClientBuilder configureHttpClient(HttpClientBuilder builder) {
                  builder.addInterceptorLast(requestInterceptor);
                  return builder;
              }
              @Override
              protected HttpAsyncClientBuilder configureHttpClient(HttpAsyncClientBuilder builder) {
                  builder.addInterceptorLast(requestInterceptor);
                  return builder;
              }
          };
  
          factory.setHttpClientConfig(new HttpClientConfig
                     .Builder(connectionUrl)
                     .connTimeout(60000)
                     .multiThreaded(true)
                     .build());
  
          return factory.getObject();
      }
  }
  </code></pre>
  
  <p>Since it's working with postman it points to the a signing error but I'm at a loss to where the discrepancy is occurring.  The configuration above works for all <code>apache httpclient</code> requests besides http DELETE requests.</p>