Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Using the <a href="https://github.com/aws/aws-sdk-ruby" rel="nofollow noreferrer">aws-sdk gem</a>, you can get a temporary signed url for any S3 object by calling <a href="https://docs.aws.amazon.com/AWSRubySDK/latest/AWS/S3/S3Object.html#url_for-instance_method" rel="nofollow noreferrer"><code>url_for</code></a>:</p> <pre><code>s3 = AWS::S3.new( :access_key_id =&gt; 1234, :secret_access_key =&gt; abcd ) object = s3.buckets['bucket'].objects['path/to/object'] object.url_for(:get, { :expires =&gt; 20.minutes.from_now, :secure =&gt; true }).to_s </code></pre> <p>This will give you a signed, temporary use URL for only that object in S3. It expires after 20 minutes (in this example), and it's only good for that one object.</p> <p>If you have lots of objects the client needs, you'll need to issue lots of signed URLs.</p> <blockquote> <p>Or should let the server control all content passing (this solves security of course)? Does this mean I have to download all content to server before handing it down to the connected users?</p> </blockquote> <p>Note that this doesn't mean the server needs to download each object, it only needs to authenticate and authorize specific clients to access specific objects in S3.</p> <p>API docs from Amazon: <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#RESTAuthenticationQueryStringAuth" rel="nofollow noreferrer">https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#RESTAuthenticationQueryStringAuth</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload