{
  "Resources": {
    "MyBucketF68F3FF0": {
      "Type": "AWS::S3::Bucket"
    },
    "MyProjectRole9BBE5233": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "codebuild.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        }
      }
    },
    "MyProjectRoleDefaultPolicyB19B7C29": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "MyBucketF68F3FF0",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "MyBucketF68F3FF0",
                          "Arn"
                        ]
                      },
                      "/",
                      "*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn",
                      ":",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":",
                      "logs",
                      ":",
                      {
                        "Ref": "AWS::Region"
                      },
                      ":",
                      {
                        "Ref": "AWS::AccountId"
                      },
                      ":",
                      "log-group",
                      ":",
                      "/aws/codebuild/",
                      {
                        "Ref": "MyProject39F7B0AE"
                      }
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::Join": [
                          "",
                          [
                            "arn",
                            ":",
                            {
                              "Ref": "AWS::Partition"
                            },
                            ":",
                            "logs",
                            ":",
                            {
                              "Ref": "AWS::Region"
                            },
                            ":",
                            {
                              "Ref": "AWS::AccountId"
                            },
                            ":",
                            "log-group",
                            ":",
                            "/aws/codebuild/",
                            {
                              "Ref": "MyProject39F7B0AE"
                            }
                          ]
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "MyProjectRoleDefaultPolicyB19B7C29",
        "Roles": [
          {
            "Ref": "MyProjectRole9BBE5233"
          }
        ]
      }
    },
    "MyProject39F7B0AE": {
      "Type": "AWS::CodeBuild::Project",
      "Properties": {
        "Artifacts": {
          "Type": "NO_ARTIFACTS"
        },
        "Environment": {
          "ComputeType": "BUILD_GENERAL1_LARGE",
          "Image": "aws/codebuild/ubuntu-base:14.04",
          "PrivilegedMode": false,
          "Type": "LINUX_CONTAINER"
        },
        "ServiceRole": {
          "Fn::GetAtt": [
            "MyProjectRole9BBE5233",
            "Arn"
          ]
        },
        "Source": {
          "Location": {
            "Fn::Join": [
              "",
              [
                {
                  "Ref": "MyBucketF68F3FF0"
                },
                "/",
                "path/to/my/source.zip"
              ]
            ]
          },
          "Type": "S3"
        }
      }
    }
  }
}