title: MalformedPolicyDocument error while creating an IAM Policy
body: <p>I'm trying to create a managed policy by <code>AWS CLI</code>: </p>
  
  <pre><code>POLICY='
  {
    "Version":"2012-10-17",
    "Statement":
    [{
      "Effect":"Allow",
      "Action":
      [
        "cloudformation:*"
      ],
      "Resource":"*"
    },
    {
      "Effect":"Deny",
      "Action":
      [
        "cloudformation:UpdateStack",
        "cloudformation:DeleteStack"
      ],
      "Resource": "'${arn}'"
    }]
  }'
  
  # Create policy if not already created
  [ $(aws iam list-policies | grep -ce CloudFormation-policy-${StackName}) -eq 0 ] &amp;&amp; (aws iam create-policy --policy-name CloudFormation-policy-${StackName} --policy-document "'${POLICY}'")
  </code></pre>
  
  <p>When I run the script I get this error:</p>
  
  <pre><code>An error occurred (MalformedPolicyDocument) when calling the CreatePolicy operation: Syntax errors in policy.
  </code></pre>
  
  <p>I can't figure out where the error is.
  Any idea?</p>