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
Post a Comment