I installed an unauthorized role in the Amazon Cognito Identity pool. My goal is that guest users of my mobile application will be able to upload debug logs (small text files) to my S3 bucket so that I can troubleshoot. I notice that I get "Access Denied" from S3 unless I change my permission to the S3 bucket. If I add to allow Everyone to have the Download / Delete privilege, the file upload failed. My concern is that someone will be able to upload large files to my bucket and cause a security problem. What is the recommended configuration for my need above? I am new to S3 and Cognito.
I am using the Amazon AWS SDK for iOS, but I believe this issue is platform neutral.
Edit: My policy is this:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "iam:GetUser", "Resource": "*" }, { "Effect": "Allow", "Action": [ "s3:ListAllMyBuckets" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "s3:CreateBucket", "s3:DeleteBucket", "s3:DeleteObject", "s3:GetBucketLocation", "s3:GetObject", "s3:ListBucket", "s3:PutObject" ], "Resource": ["arn:aws:s3:::import-to-ec2-*", "arn:aws:s3:::<my bucket name>/*"] } ] }
amazon-s3 amazon-cognito
mobileideafactory.com
source share