## Sync Account
Lambda to create/update an ABACUS account.
Intended to use as a part of the KNR and AWAL accounts creation step functions, 
after the CreateVendor step.  

## Requirements
- Python 3.9

## GRAPHQL Dependencies

- [graphql-abacus](https://github.com/theorchard/graphql-abacus)

## Running 


### Set up the environment

```
# After generating aws creds
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 437795906767.dkr.ecr.us-east-1.amazonaws.com
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 086679231553.dkr.ecr.us-east-1.amazonaws.com
```

```
cp .env.shadow .env
```

```
source .env
```

### Start local lambda

```
$ make docker_local_up
```

Note: This brings up the local code, if you want to pull and run the most recently deployed image run `make start_ows`, it may take a while either way 

### Execute Function

POST example data to the lambda

```
$ make local_event
```

### Running the linter and the unit tests

```
make docker_test
```

### Running the integration tests

```
make test_integration
```

env vars required for integration tests are defined in tests\integration\integr_test_envvars.env 

Note: this is set up to run against the most recently deployed image, so if you want it to run against any local changes you'll need to set it up differently.
