# slz-gdpr-deletion-diff-sender
## Description
This lambda compares two csv files containing requested emails for deletion and
actualy deleted emails.

In case of any differences diff files will be created and sent
to configured recievers using AWS simple email service

## Links
* [Source](https://github.com/theorchard/delphi-gdpr/tree/develop/lambda/slz_gdpr_deletion_diff_sender)
* [JIRA](https://jenkins.apollo.stream/job/delphi-monorepos/job/delphi-gdpr/job/lambdas/)

## Usage
Prerequisites
* Installed python3.10
* Installed [aws_cli](https://aws.amazon.com/cli/)
* Working credentials in ~/.aws/credentials
* delphi dev or prod vpn connection estabilished for dependencies install

1) Install poetry for package management
```console
curl -sSL https://install.python-poetry.org | python3 -
```
2) Add poetry to PATH
```console
export PATH=$HOME/.local/bin:$PATH
```
3) Install project dependencies
```console
poetry install
```
4) Activate virtual environment
```console
. .venv/bin/activate
```
5) Set mandatory environment variable (or use .env file)
```console
# example values
DEBUG=False
SENTRY_DSN=sentry_dsn
ENV=dev
```
6) Run service
Update event/default.json file if needed
```console
python slz_gdpr_deletion_diff_sender/handler.py
```
