Link to home
Start Free TrialLog in
Avatar of tablaFreak
tablaFreakFlag 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
ASKER CERTIFIED SOLUTION
Avatar of Stuart Scott
Stuart Scott
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial