Comments for Upload a File to S3


Hmm in this case we are only allowing authenticated users to upload to the S3 bucket.


Was getting 403 access denied during file upload, for IdentityPoolAuth_role with the policy mentioned in chapter IdentityPoolAuth_role Policy

Had to change the policy to the one mentioned in iam-roles for file upload to work.

  "Version": "2012-10-17",
  "Statement": [
      "Action": ["s3:ListBucket"],
      "Effect": "Allow",
      "Resource": ["arn:aws:s3:::mybucket"],
      "Condition": {"StringLike": {"s3:prefix": ["${}/*"]}}
      "Action": [
      "Effect": "Allow",
      "Resource": ["arn:aws:s3:::mybucket/private/${}/*"]


Thanks for reporting back!