<commit_before>{
  "AWSTemplateFormatVersion" : "2010-09-09",

  "Description" : "AWS User Group Belgium Kick-off meetup PhotoApp",

  "Resources" : {
    "Bucket" : {
      "Type" : "AWS::S3::Bucket",
      "Properties" : {
        "AccessControl" : "Private"
      }
    },

    "BucketPolicy" : {
      "Type" : "AWS::S3::BucketPolicy",
      "Properties" : {
        "PolicyDocument" : {
          "Id" : "PhotoAppBucketPolicy",
          "Statement" : [
            {
              "Sid": "AllowPublicRead",
              "Effect": "Allow",
              "Principal": { "AWS": "*" },
              "Action": [
                "s3:GetObject"
              ],
              "Resource": { 
                "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "Bucket" }, "/photos/*" ] ] 
              }
            }
          ]
        },
        "Bucket" : { "Ref" : "Bucket" }
      }
    }<commit_msg>added user with password + access keys for user<commit_after>{
  "AWSTemplateFormatVersion" : "2010-09-09",

  "Description" : "AWS User Group Belgium Kick-off meetup PhotoApp",

  "Parameters" : {
    "AppUserPassword" : {
      "Type" : "String",
      "Description" : "Password to login the application user",
      "NoEcho": "true"
    }
  },

  "Resources" : {
    "Bucket" : {
      "Type" : "AWS::S3::Bucket",
      "Properties" : {
        "AccessControl" : "Private"
      }
    },

    "BucketPolicy" : {
      "Type" : "AWS::S3::BucketPolicy",
      "Properties" : {
        "PolicyDocument" : {
          "Id" : "PhotoAppBucketPolicy",
          "Statement" : [
            {
              "Sid": "AllowPublicRead",
              "Effect": "Allow",
              "Principal": { "AWS": "*" },
              "Action": [
                "s3:GetObject"
              ],
              "Resource": { 
                "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "Bucket" }, "/photos/*" ] ] 
              }
            }
          ]
        },
        "Bucket" : { "Ref" : "Bucket" }
      }
    },

    "AppUser" : {
       "Type": "AWS::IAM::User",
       "Properties": {
          "LoginProfile": { "Password": { "Ref" : "<PASSWORD>" } },
          "Policies": [{ 
            "PolicyName": "AppUserPolicy",
            "PolicyDocument": {
              "Statement": [
                {
                  "Sid": "AllowBucketAccess",
                  "Action": "s3:*",
                  "Effect": "Allow",
                  "Resource": {
                    "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "Bucket" } ] ]
                  }
                },
                {
                  "Sid": "AllowBucketContantAccess",
                  "Action": "s3:*",
                  "Effect": "Allow",
                  "Resource": {
                    "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "Bucket" }, "/*" ] ]
                  }
                },
                {
                  "Effect": "Allow",
                  "Action": "s3:ListAllMyBuckets",
                  "Resource": "*",
                  "Condition": {}
                }
              ]
            }
          }]
       }
    },

    "AppUserAccessKey" : {
       "Type": "AWS::IAM::AccessKey",
       "Properties": {
          "Status": "Active",
          "UserName": { "Ref" : "AppUser" } 
       }
    }
{'fraction_non_alphanumeric': 0.18418661011814602, 'fraction_numerical': 0.008785216601029992, 'mean_word_length': 1.2447314751869476, 'pattern_counts': {'":': 37, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5184253', 'n_tokens_mistral': 1036, 'n_tokens_neox': 976, 'n_words': 156}