This is two things:
- a Docker image that does heavy lifting for Gazette Machine, run as an ECS task.
- a collection of AWS Lambdas that call out to the Gazette Machine API.
Docker image in GitHub: lawsafrica/gazettemachine-worker
The GazetteMachine-API-auth-token
auth token is stored in the AWS SSM Parameter Store. If this token is changed,
the AWS Lambda function must be redeployed (see Deployment section below) so that it picks up the new token.
- Clone this repo
- Setup a python 3 virtual environment
- Install dependencies:
pip3 install -r requirements.txt
- Run the worker:
python3 worker.py --help
- Install serverless and dependencies:
npm install
- Ensure you have AWS credentials setup in
~/.aws/credentials
- Deploy:
serverless deploy
This will need to be done if the name of the S3 trigger function changes, or on very first deployment, to create the S3 trigger:
serverless s3deploy