0
{
"Version": "2012-10-17",
"Id": "Policy1548751526201",
"Statement": [
    {
        "Sid": "Stmt1548751524478",
        "Effect": "Allow",
        "Principal": {
            "AWS": "arn:aws:iam::816695161410:user/hg-web-api"
        },
        "Action": "s3:*",
        "Resource": "arn:aws:s3:::hg-media-staging"
    },
    {
        "Sid": "3",
        "Effect": "Allow",
        "Principal": {
            "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity ********"
        },
        "Action": "s3:GetObject",
        "Resource": "arn:aws:s3:::hg-media-staging/*"
    },
    {
        "Sid": "",
        "Effect": "Allow",
        "Principal": "*",
        "Action": "s3:GetObject",
        "Resource": "arn:aws:s3:::hg-media-staging/*"
    }
]

}

Distribution settings

origin settings

While request the image it is showing access denied

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>27652FED4D1CDEFD</RequestId>
<HostId>
gu4pU1aFPYqGkkSsEQgcO6fPYD/w+e4kLQNztzbr8T86x8ynLKiFHxkEr3rMtf2YJCghQm0TAxA=
</HostId>
</Error>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.