title: How do I add a policy to my Amazon S3 Bucket?
body: <p>I’m trying to set up a static website using Amazon AWS S3, and following <a href="http://docs.aws.amazon.com/gettingstarted/latest/swh/getting-started-configure-bucket.html" rel="nofollow">this guide</a>. However, whenever I try to apply a policy to the root domain bucket so that people can see the website, I get an error.</p>
  
  <p>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. </p>
  
  <pre><code>{
    "Version":"2012-10-17",
    "Statement": [{
      "Sid": "Allow Public Access to All Objects",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::example.com/*"
    }
   ]
  }
  </code></pre>
  
  <p>But every time I click “save,” I get a <code>Policy could not be parsed as a valid JSON string</code> error. </p>