I'm trying to set up a static website using Amazon AWS S3, and following this guide . However, whenever I try to apply a policy to the root domain bucket so that people can see the website, I get an error.
The guide tells me to copy/paste the following into the Bucket Policy Editor, which I do, and I replace “example.com” with my bucket name as it tells me to do.
{
"Version":"2012-10-17",
"Statement": [{
"Sid": "Allow Public Access to All Objects",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example.com/*"
}
]
}
But every time I click “save,” I get a Policy could not be parsed as a valid JSON string
error.
Silly Apple Mac TextEdit adds a different type of quotation mark "
Check any quotation marks and retype them in jsonlint.com
Should fix any errors as it did for me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.