Avatar of tablaFreak
tablaFreak
Flag for United States of America

asked on 

AWS bucket permissions question

Hi - Can anyone share how to provide access to files from a given SSL URL on AWS Amazon Cloud Server (S3)? My bucket permissions work fine on an unsecured connection, but not on a SSL. Here's what I've got for permissions:

{
	"Version": "2012-10-17",
	"Id": "http referer policy",
	"Statement": [
		{
			"Sid": "Allow get requests referred by www.example.com and example.com.",
			"Effect": "Allow",
			"Principal": "*",
			"Action": "s3:GetObject",
			"Resource": "arn:aws:s3:::wellsource/*",
			"Condition": {
				"StringLike": {
					"aws:Referer": [
						"http://zzzz.com/*",
						"http://xxxx.com/*",
						"http://www.zzzz.com/*",
						"https://console.aws.amazon.com/*",
						"http://www.xxxx.com/*"
					]
				}
			}
		},
		{
			"Sid": "Explicit deny to ensure requests are allowed only from specific referer.",
			"Effect": "Deny",
			"Principal": "*",
			"Action": [
				"s3:DeleteObject",
				"s3:GetObject"
			],
			"Resource": "arn:aws:s3:::wellsource/*",
			"Condition": {
				"StringNotLike": {
					"aws:Referer": [
						"http://zzzz.com/*",
						"http://xxxx.com/*",
						"http://www.zzzz.com/*",
						"https://console.aws.amazon.com/*",
						"http://www.xxxx.com/*"
					]
				}
			}
		}
	]
}

Open in new window


Thanks,
Steve
AWS

Avatar of undefined
Last Comment
Shalom Carmel

8/22/2022 - Mon