<commit_before>[![Build Status](https://travis-ci.org/ImmobilienScout24/crassus.svg?branch=master)](https://travis-ci.org/ImmobilienScout24/crassus)
[![Code Health](https://landscape.io/github/ImmobilienScout24/crassus/master/landscape.svg?style=flat)](https://landscape.io/github/ImmobilienScout24/crassus/master)
[![Coverage Status](https://coveralls.io/repos/ImmobilienScout24/crassus/badge.svg?branch=master&service=github)](https://coveralls.io/github/ImmobilienScout24/crassus?branch=master)

# crassus
Cross Account Smart Software Update Service

## Deployer
### Event interface
Actual a SNS with a json payload is used to trigger crassus. The payload should look like this:

```json
      {
        "stackName": "sample-stack",
        "notificationARN": "<NOTIFICATION ARN>",
        "region": "<AWS-REGION-ID>",
        "params": [
                    {
                      "updateParameterKey": "<CFN PARAMETER>",
                      "updateParameterValue": "<CFN PARAMETER VALUE>"
                    }
                 ]
      }
```


Sample event as expected from deployer
```json
{
  "Records": [
    {
      "EventVersion": "1.0",
      "EventSubscriptionArn": "<SUBSCRIPTION ARN>",
      "EventSource": "aws: sns",
      "Sns": {
        "SignatureVersion": "1",
        "Timestamp": "2015-10-23T11: 01: 16.140Z",
        "Signature": "<SIGNATURE>",
        "SigningCertUrl": "<SIGNING URL>",
        "MessageId": "<MESSAGE ID>",
        "Message": "{
        "stackName": "sample-stack",
        "notificationARN": "<NOTIFICATION ARN>",
        "region": "eu-west-1",
        "params": [
                    {
                      "updateParameterKey": "InstanceType",
                      "updateParameterValue": "t2.micro"
                    }
                  ]
      }",
      "MessageAttributes": {
      },
      "Type": "Notification",
      "UnsubscribeUrl": "<UNSUBSCRIBE URL>",
      "TopicArn": "<TOPIC ARN>",
      "Subject": None
    }
  }
  ]
}
```
<commit_msg>Update Readme to the new message format<commit_after>[![Build Status](https://travis-ci.org/ImmobilienScout24/crassus.svg?branch=master)](https://travis-ci.org/ImmobilienScout24/crassus)
[![Code Health](https://landscape.io/github/ImmobilienScout24/crassus/master/landscape.svg?style=flat)](https://landscape.io/github/ImmobilienScout24/crassus/master)
[![Coverage Status](https://coveralls.io/repos/ImmobilienScout24/crassus/badge.svg?branch=master&service=github)](https://coveralls.io/github/ImmobilienScout24/crassus?branch=master)

# crassus
Cross Account Smart Software Update Service

## Deployer
### Event interface
Actual a SNS with a json payload is used to trigger crassus. The payload should look like this:

```json
      {
        "version": 1,
        "stackName": "sample-stack",
        "region": "<AWS-REGION-ID>",
        "parameters": {
            "parameter1": "value1",
            "parameter2": "value2",
        }
      }
```


Sample event as expected from deployer
```json
{
  "Records": [
    {
      "EventVersion": "1.0",
      "EventSubscriptionArn": "<SUBSCRIPTION ARN>",
      "EventSource": "aws: sns",
      "Sns": {
        "SignatureVersion": "1",
        "Timestamp": "2015-10-23T11: 01: 16.140Z",
        "Signature": "<SIGNATURE>",
        "SigningCertUrl": "<SIGNING URL>",
        "MessageId": "<MESSAGE ID>",
        "Message": "{
        "version": 1,
        "stackName": "sample-stack",
        "region": "eu-west-1",
        "parameters": {
                      "updateParameterKey": "InstanceType",
                      "updateParameterValue": "t2.micro"
                  }
      }",
      "MessageAttributes": {
      },
      "Type": "Notification",
      "UnsubscribeUrl": "<UNSUBSCRIBE URL>",
      "TopicArn": "<TOPIC ARN>",
      "Subject": None
    }
  }
  ]
}
```

{'fraction_non_alphanumeric': 0.16134937238493724, 'fraction_numerical': 0.019351464435146442, 'mean_word_length': 2.518859245630175, 'pattern_counts': {'":': 56, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 12, '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': '1904877', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1205, 'n_words': 211}