title: AWS malformed policy error
body: <p>I am trying to set an AWS group policy via the AWS CLI like so:</p>
  
  <pre><code>aws iam put-group-policy --group-name my-group --policy-name \
      s3-full-access --policy-document /tmp/policy.json
  </code></pre>
  
  <p>This is the content of /tmp/policy.json:</p>
  
  <pre><code>{
    "Version": "2012-10-17",
    "Statement": [
      {
        "Action": [
          "s3:ListAllMyBuckets"
        ],
        "Effect": "Allow",
        "Resource": "arn:aws:s3:::*"
      },
      {
        "Action": "s3:*",
        "Effect": "Allow",
        "Resource": "arn:aws:s3:::my-bucket*"
      }
    ]
  }
  </code></pre>
  
  <p>I keep getting the following error:</p>
  
  <pre><code>A client error (MalformedPolicyDocument) occurred when calling the PutGroupPolicy operation: The policy is not in the valid JSON format.
  </code></pre>
  
  <p>I do not know how to proceed, the error is too unspecific. Anyone able to help?</p>