title: Syntax errors in policy. (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument: CloudFormation
body: <p>As I am trying to create a IAM Policy , I get this error while deploying the template in cloudformation:</p>
  
  <pre><code>JenkinsInstanceProfile:
      Type: AWS::IAM::InstanceProfile
      Properties:
        Path: "/"
        Roles:
          - 
            Ref: "JenkinsRole"
    JenkinsPolicy:
     Type: AWS::IAM::Policy
     Properties:
        PolicyName: "JenkinsPolicy"
        PolicyDocument: 
          Version: "2020-01-29"
          Statement:
            - 
             Effect: "Allow"
             Action: 
               - "s3:GetObject"
               - "s3:GetObjectVersion"
               - "s3:PutObject"
               - "s3:DeleteObject"
             Resource: "*"
            - 
             Effect: "Allow"
             Action: 
               - "codedeploy:ListApplications"
               - "codedeploy:ListDeploymentGroups"
               - "codedeploy:RegisterApplicationRevision"
               - "codedeploy:CreateDeployment"
               - "codedeploy:GetDeploymentConfig"
               - "codedeploy:GetApplicationRevision"
               - "codedeploy:GetDeployment"
             Resource: "*" 
        Roles: 
          - Ref: "JenkinsRole"
  </code></pre>
  
  <p>Can someone help me with this, It would be quite hwlpful</p>