<commit_before># aws-uncle

[![Build Status][travis-image]][travis-url]
[![Dependency Status][daviddm-image]][daviddm-url]
[![DevDependency Status][daviddm-dev-image]][daviddm-dev-url]
[![License][license-image]][license-url]

Useful uncle notifying unexpected servers in AWS.


## Installation

```
git clone https://github.com/moqada/aws-uncle.git
cd aws-uncle
npm install
```


## Configuration

Put Environment variables (HipChat token, notify interval...)

```
cp .env.example .env
```

Put settings for filtering Unexpected servers

```
cp configs.example.json configs.json
```

Set following IAM policy for AWS Lambda.

Replace `<AWS_UNCLE_BUCKET_NAME>` to your S3 bucket name.

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": "arn:aws:logs:*:*:*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "ec2:describe*",
                "elasticbeanstalk:describe*",
                "elasticmapreduce:list*",
                "rds:describe*"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::<AWS_UCNLE_BUCKET_NAME>/*"
            ]
        }
    ]
}
```


## Deploy

```
npm run publish
```

Upload `build/aws-uncle.zip` to AWS Lambda.


## TODO

- [x] Support EMR
- [ ] Load configs from S3
- [ ] Run standalone (CLI / crontab)
- [ ] Add tests


[travis-url]: https://travis-ci.org/moqada/aws-uncle<commit_msg>docs(README): Change IAM policy and deploy command<commit_after># aws-uncle

[![Build Status][travis-image]][travis-url]
[![Dependency Status][daviddm-image]][daviddm-url]
[![DevDependency Status][daviddm-dev-image]][daviddm-dev-url]
[![License][license-image]][license-url]

Useful uncle notifying unexpected servers in AWS.


## Installation

```
git clone https://github.com/moqada/aws-uncle.git
cd aws-uncle
npm install
```


## Configuration

Put Environment variables (HipChat token...)

```
cp .env.example .env
```

Put settings for filtering Unexpected servers

```
cp configs.example.json configs.json
```

Set following IAM policy for AWS Lambda.

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": "arn:aws:logs:*:*:*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "ec2:describe*",
                "elasticbeanstalk:describe*",
                "elasticmapreduce:list*",
                "rds:describe*"
            ],
            "Resource": "*"
        }
    ]
}
```


## Deploy

```
npm run deploy
```

Upload `build/aws-uncle.zip` to AWS Lambda.


## TODO

- [x] Support EMR
- [ ] Load configs from S3
- [ ] Run standalone (CLI / crontab)
- [ ] Add tests


[travis-url]: https://travis-ci.org/moqada/aws-uncle
{'fraction_non_alphanumeric': 0.15879305089911613, 'fraction_numerical': 0.00731484303565986, 'mean_word_length': 2.0903954802259888, 'pattern_counts': {'":': 19, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '4750052', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1061, 'n_words': 209}