Allowing authenticated user access to Amazon S3 bucket files

I recently created a bucket in my Amazon S3 account and uploaded a large number of files.

As the administrator, only I have access to these files, which I believe is the default.

I created a new user and assigned them an Access Key ID, Secret Access Key and Password.

I would like to be able to provide a URL that will allow this user to download files in the bucket. The user will be authenticated on a website I am hosting, separately from Amazon. The URLs to the bucket files will be displayed on this website.

First, how do I assign permissions for this user to be able to download files in the bucket?

Second, how best to deal with the fact that the user is authenticated on a website before being sent to a URL to download bucket files?

Amazon S3 provides a lot of options for security, but my needs are very simple, and I am having a hard time finding a straightforward answer to these questions.

Thank you!
Brad BansnerWeb DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
Hi,
By default, all Amazon S3 resources—buckets, objects, etc are private: only the resource owner, an AWS account that created it, can access the resource, which is what you are experiencing now.

You will need to grant access permissions to others by writing an access policy, i.e

{
  "Version":"2012-10-17",
  "Statement":[
    {
      "Sid":"AddCannedAcl",
      "Effect":"Allow",
      "Principal": {"AWS": ["arn:aws:iam::111122223333:root","arn:aws:iam::444455556666:root"]},
      "Action":["s3:PutObject","s3:PutObjectAcl"],
      "Resource":["arn:aws:s3:::examplebucket/*"],
      "Condition":{"StringEquals":{"s3:x-amz-acl":["public-read"]}}
    }
  ]
}

For more info.
http://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html
http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
Brad BansnerWeb DeveloperAuthor Commented:
Thank you. I was able to figure this out. I actually ended up using the "referral website" method instead of a user account. The examples helped.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.