<commit_before>﻿## S3 Bucket nested stack

To use this stack you will need to set the required input parameters and include the stack as a resource.

#### Example input definition
```json
    "StacksVersion": {
      "Description": "Version of the Nubis Stacks",
      "Type": "String",
      "Default": "v1.0.0"
    },
```

#### Example resource definition
```json
    "S3Stack": {
      "Type": "AWS::CloudFormation::Stack",
      "Properties": {
        "TemplateURL": { "Fn::Join": [ "/", [ "https://s3.amazonaws.com/nubis-stacks", { "Ref": "StacksVersion" }, "s3-bucket.template" ] ] },
        "TimeoutInMinutes": "60",
        "Parameters": {
          "ServiceName": {
            "Ref": "ServiceName"
          },
          "Environment": {
            "Ref": "Environment"
          },
          "BucketName": {
            "Ref": "BucketName"
          },
          "TechnicalOwner": {
            "Ref": "TechnicalOwner"
          },
          "AccessControl": "PublicRead"
        }
      }
    }
```<commit_msg>Updated readme to indicate how to upload an encryption object to S3<commit_after>﻿## S3 Bucket nested stack

To use this stack you will need to set the required input parameters and include the stack as a resource.

#### Example input definition
```json
    "StacksVersion": {
      "Description": "Version of the Nubis Stacks",
      "Type": "String",
      "Default": "v1.0.0"
    },
```

#### Example resource definition
```json
    "S3Stack": {
      "Type": "AWS::CloudFormation::Stack",
      "Properties": {
        "TemplateURL": { "Fn::Join": [ "/", [ "https://s3.amazonaws.com/nubis-stacks", { "Ref": "StacksVersion" }, "s3-bucket.template" ] ] },
        "TimeoutInMinutes": "60",
        "Parameters": {
          "ServiceName": {
            "Ref": "ServiceName"
          },
          "Environment": {
            "Ref": "Environment"
          },
          "BucketName": {
            "Ref": "BucketName"
          },
          "TechnicalOwner": {
            "Ref": "TechnicalOwner"
          },
          "AccessControl": "PublicRead"
        }
      }
    }
```

#### Notes
If you enable encryption on the bucket `"Encryption": "true"` you will need to upload files to your S3 bucket
using the `aws s3api` instead of the `aws s3` command.

```bash
aws s3api put-object --server-side-encryption AES256 --bucket <bucket name> --key <File name on S3> --body <Local path to file>
```
{'fraction_non_alphanumeric': 0.15895953757225434, 'fraction_numerical': 0.011147811725846408, 'mean_word_length': 2.2349799732977305, 'pattern_counts': {'":': 43, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, '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': '7515501', 'n_tokens_mistral': 736, 'n_tokens_neox': 717, 'n_words': 202}