amazon web services - Limit S3 access to specific object -


what standard procedure limiting access object on s3?

the object using server side encryption.

i want user able access specific object (not objects in bucket) , limited time, 5 minutes.

i looked creating iam account seems user access every object in bucket.

i looked generating presigned url, there no way tell has url.

i found this:

s3 = aws::s3.new(   :access_key_id => 1234,   :secret_access_key => abcd ) object = s3.buckets['bucket'].objects['path/to/object'] object.url_for(:get, { :expires => 20.minutes.from_now, :secure => true}).to_s 

which close i'm looking for, couldn't find similar solution in .net.

thanks help.

you should use pre signed urls purpose. here standard example

static iamazons3 s3client; s3client = new amazons3client(amazon.regionendpoint.useast1)  getpresignedurlrequest request1 = new getpresignedurlrequest() {      bucketname = bucketname,      key = objectkey,      expires = datetime.now.addminutes(5) };  string url = s3client.getpresignedurl(request1); 

for more information pre signed url


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -