DemocracyClub / aggregator-api

https://developers.democracyclub.org.uk/
3 stars 3 forks source link

CircleCI Coverage Status Ruff

developers.democracyclub.org.uk API

About

This project provides an API gateway in front of other Democracy Club APIs.

Local Development

Application

Documentation

TODO: Update this

Configuration

Local Settings

For local development, the only required setting is SECRET_KEY. In local.py, it may also be useful to set:

Production Settings

In production, settings are obtained from environment variables. In production, we need:

Deployment

Development deployments to AWS Lambda

Development deployments are described in detail in a separate document.

Here are the happy-path steps to create a deployment in DC's development AWS account.

Before following these steps:

NEW_ENV_NAME=<NAME> python samconfig.toml.d/new-dev-env.py >>samconfig.toml
AWS_DEFAULT_REGION=eu-west-2 pipenv run sam validate
make all
sam build  --config-env <NAME> --use-container --cached
sam deploy --config-env <NAME>

These steps should have deployed the app to Lambda, accessible via AWS API Gateway on the 'AggregatorApiFqdn' domain mentioned near the end of the deployment output, but only when accessed the path '/Prod'.

You can continue and add TLS, caching, and a custom domain to this deployment by following the rest of the deployment document.