title: How to solve 'Client is immutable when created with the builder'?
body: <p>I am creating an application where want to upload a file to S3 bucket.
  I am getting an error from following code snippet:</p>
  
  <pre><code>BasicAWSCredentials awsCreds = new BasicAWSCredentials("&lt;myKey&gt;", "&lt;mySecretId&gt;");
                                  AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
                                          .withRegion("&lt;myRegion&gt;")
                                          .withCredentials(new AWSStaticCredentialsProvider(awsCreds))
                                          .build();
  
                                  PutObjectRequest request = new PutObjectRequest("testbucketupdate", "testFile", new File("D:\\Attachments\\LICENSE"));
                                  ObjectMetadata metadata = new ObjectMetadata();
                                  metadata.setContentType("plain/text");
                                  metadata.addUserMetadata("x-amz-meta-title", "someTitle");
                                  request.setMetadata(metadata);
                                  s3Client.setS3ClientOptions(S3ClientOptions.builder().setPathStyleAccess(true).disableChunkedEncoding().build());
                                  s3Client.putObject(request);
  </code></pre>
  
  <p>I am getting an error as:</p>
  
  <pre><code>Java.lang.UnsupportedOperationException: Client is immutable when created with the builder.
      at com.amazonaws.AmazonWebServiceClient.checkMutability(AmazonWebServiceClient.java:937)
      at com.amazonaws.services.s3.AmazonS3Client.setS3ClientOptions(AmazonS3Client.java:716)
      at com.amazonaws.lambda.demo.LambdaFunctionHandler.check(LambdaFunctionHandler.java:123)
      at com.amazonaws.lambda.demo.LambdaFunctionHandler.main(LambdaFunctionHandler.java:208)
      at com.amazonaws.lambda.demo.LambdaFunctionHandler.handleRequest(LambdaFunctionHandler.java:51)
      at com.amazonaws.lambda.demo.LambdaFunctionHandler.handleRequest(LambdaFunctionHandler.java:1)
      at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:178)
      at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:888)
      at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:283)
      at lambdainternal.AWSLambda.&lt;clinit&gt;(AWSLambda.java:64)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:348)
      at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:94)
  </code></pre>
  
  <p>What changes I should make to upload a file successfully to the required bucket?</p>