I’ve created a group with read-only access to S3 objects and then added a new user within that group.
I’m having trouble understanding what the url to the file will be. I have the link thus far as:
https://s3.amazonaws.com/my-bucket/
Do I need to pass in some sort of id and key to let people in that group get access? What are those params and where I do I find the values?
To let people access your files you either need to make the bucket public and then access the URL’s of each object which you can find out by checking the properties of each object in AWS management console. The catch is that anyone who knows this URL can access the files. To make it more secure, use ACL to limit read only access for all users. Go to permissions and add a new permission for “Everyone” and check “Open/download” check box only.
if you want to limit access to only few users then you will have yo use IAM policies. With IAM policy you will get a security key and secret access key. Now, you CANNOT append the secret access key at the end of your string to give access to users. The secret user key is meant to be “SECRET”.but what you can do is provide Presigned URL’s to your users through code. Here is a C# example
The catch is the URL will only be active for the given time. you can increase it though.
Also, in the above function “S3′ is an instance of amazonS3 client that I have created: