0

I have some AMP pages and those pages use amazon s3 pages use S3 images form a container in amazon S3 with a referer policy like that

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadForGetBucketObjects",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::domain/*",
            "Condition": {
                "StringLike": {
                    "aws:Referer": [
                        "http://domain.fr/*",
                        "http://www.domain.fr/*",
                        "https://domain.fr/*",
                        "https://www.domain.fr/*"
                        ]
                }
            }
        }
    ]
}

Do you know how to add google for amp in this policy in order to display image in google amp search? I guess I must white list the google amp cache but if you have proposition thanks!

planet_hunter
  • 3,866
  • 1
  • 26
  • 39
henri_1310
  • 315
  • 7
  • 21
  • Strictly a guess: create a second policy statement, similar to the first one, but configure this one to allow access based on the condition `"StringLike": { "aws:UserAgent": [ "GoogleBot*" ] }`... [`aws:UserAgent`](http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#Condition) is a supported policy condition. – Michael - sqlbot Mar 12 '17 at 20:40
  • Thanks Michael, the problem is not for the crawl but for the display of the AMP version at Google, I try to add those domains but without success : "http://www-domain-fr.cdn.ampproject.org/*", "https://www-domain-fr.cdn.ampproject.org/*", "https://cdn.ampproject.org/*", "http://www.google.fr/*", "https://www.google.fr/*", "http://www.google.com/*", "https://www.google.com/*" – henri_1310 Mar 13 '17 at 08:04

0 Answers0