S3 Bucket access denied REST API Private Bucket

  amazon-s3, amazon-web-services, android, api, laravel

I make a Private bucket and give permittion to private

every thing is working fine in my web images showing fine when i get images in my REST APIS ( like android and IOS app then getting error access denied )

Here is my bucket policy

{
  "Version": "2012-10-17",
  "Id": "PolicyID",
  "Statement": [
    {
        "Sid": "StmID",
        "Effect": "Allow",
        "Principal": "*",
        "Action": [
            "s3:DeleteObject",
            "s3:GetObject",
            "s3:PutObject",
            "s3:PutObjectAcl",
            "s3:GetObjectAcl"
        ],
        "Resource": "arn:aws:s3:::name/*",
        "Condition": {
            "StringLike": {
                "aws:Referer": [
                    "https://google.com/*" //server url here like
                ]
            }
        }
    }
]
}

Any Suggestion ?

Source: Laravel

Leave a Reply