At the end of chapter 11 of the Rails manual by Michael Hartl, I was able to enable user upload to the Amazons S3 service by creating a bucket, using IAM to install the user and provide the user with AmazonS3FullAccess policy. It feels dirty and very insecure to allow an unknown user on my website to have full access to the bucket for uploading images to my website, and I'm not sure I should feel that way. I created a custom policy in
What it is:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1445501067518",
"Action": [
"s3: GetObject",
"s3: PutObject"
],
"Effect": "Allow",
"Resource": "arn: aws: s3 ::: bucketname"
}
]
} I am not sure of my decision and cannot find answers to search queries in order to do this best. I use wavewave (with intent to use carrierwave_direct for my own project), fog and miniature stones.
source share