title: AWS Java SDK 2.0 create a presigned URL for a S3 object
body: <p>I know with version 1.x of the SDK it's as simple as per the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURLJavaSDK.html" rel="noreferrer">docs</a></p>
  
  <pre><code>java.util.Date expiration = new java.util.Date();
  long msec = expiration.getTime();
  msec += 1000 * 60 * 60; // Add 1 hour.
  expiration.setTime(msec);
  
  GeneratePresignedUrlRequest generatePresignedUrlRequest = new GeneratePresignedUrlRequest(bucketName, objectKey);
  generatePresignedUrlRequest.setMethod(HttpMethod.PUT); 
  generatePresignedUrlRequest.setExpiration(expiration);
  
  URL s = s3client.generatePresignedUrl(generatePresignedUrlRequest); 
  </code></pre>
  
  <p>However looking at the <a href="http://aws-java-sdk-javadoc.s3-website-us-west-2.amazonaws.com/latest/" rel="noreferrer">2.0 docs</a> but I can't find anything close to the <code>GeneratePresignedUrlRequest</code>. </p>
  
  <p>Hopefully there is another simple pattern for this?</p>