title: Temporary S3 Bucket URL for serving Images
body: <p>Using "aws/aws-sdk-php": "^3.0@dev"</p>
  
  <p>I am creating a image sharing website but do not want people to copy my URLs to another site to steal my content/bandwidth. </p>
  
  <p>I was originally storing the objects as </p>
  
  <pre><code>return $s3-&gt;putObject([
          'Bucket' =&gt; $bucket,
          'Key'    =&gt; $key,
          'Body'   =&gt; $file,
          'ACL'    =&gt; 'public-read',
      ]);
  </code></pre>
  
  <p>But I have removed 'public-read' so now the URL below no longer works</p>
  
  <pre><code> https://mybucket-images.s3.us-west-1.amazonaws.com/' . $key);
  </code></pre>
  
  <p>What do I need to do to create a temporary URL that can still be client side cached to access the object?</p>
  
  <p>One thing I was thinking was to change the key once a week or month, but it would require me to update all objects with a cronjob. There must be a way to create a temporary access URL?</p>