title: Amazon S3 Extended Request ID null
body: <p>I'm trying to upload a file to Amazon bucket using S3 service. Getting below exception when connecting through company's "proxy server".</p>
  
  <pre><code>&lt;code&gt;        
      AWSCredentials credentials = new BasicSessionCredentials(
      uploadLocation.getAccessKeyId(), uploadLocation.getSecretAccessKey(), uploadLocation.getSessionToken());
  
  
      ClientConfiguration clientConfiguration = new ClientConfiguration();
      clientConfiguration.setProxyHost(proxyAddress); 
      clientConfiguration.setProxyPort(Integer.parseInt(proxyPort));
      clientConfiguration.setProtocol(Protocol.HTTP);
  
      AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
                          .withCredentials(new  AWSStaticCredentialsProvider(credentials))
                          .withClientConfiguration(clientConfiguration)
                          .withRegion("us-east-1")
                          .build();
  
      PutObjectResult putObjectResult = s3Client.putObject(new PutObjectRequest(uploadLocation.getBucket(), 
                          uploadLocation.getObject_key(), file));
  
  
  
  Exception in thread "main" com.amazonaws.services.s3.model.AmazonS3Exception: Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: null; S3 Extended Request ID: null), S3 Extended Request ID: null
          at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1592)
          at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1257)
          at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1029)
          at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:741)
          at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:715)
          at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:697)
          at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:665)
          at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:647)
          at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:511)
          at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4227)
          at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4174)
          at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1722)
  
  
  &lt;/code&gt;    
  </code></pre>
  
  <p>Please note that it works perfectly when proxy is not used and hence ClientConfiguration object is not required.</p>
  
  <p>Don't have much visibility into S3 bucket configuration as a different vendor company is using Amazon S3 as their storage system.
  Any suggestions, please?</p>