Prerequisites
- Docker installed
CLIENT_IDandCLIENT_SECRETcreated from Globus Developers Setting
Getting up and running
- Create a
.envfile undersrc/settings- For an example, please see
src/settings/example.env - Add the
CLIENT_IDandCLIENT_SECRETand setRUN_ENVIRONMENT=localin the.envfile
- For an example, please see
- To build the local Confluent kafka environment, run
docker compose -f compose-kafka.yaml upThis can take a minute or two to complete. - To build the FastAPI and esgvoc container, run
docker volume create esgvoc docker build -f ./Dockerfile-esgvoc -t esgvoc . docker run --name esgvoc \ --detach \ -v esgvoc:/root/.local/share/esgvoc \ -it esgvoc docker build -t stac-transaction-fastapi . docker run --name stac-transaction-fastapi \ --detach \ -v esgvoc:/root/.local/share/esgvoc \ -v ./src:/var/task \ -p 8000:8000 \ -it stac-transaction-api - For ECS deployments, there are basic scripts in the scripts directory for building and deploying
- Basic instructions for deployment to AWS ECS
- Add Consumer support
- Add Discovery support
Authorizer:
- Lambda function: authorizer
- Lambda event payload: Token
- Token source: Authorization
- Token validation: Bearer\s[0-9A-Za-z]+
- Authorization caching: 300 seconds
API:
/
/{proxy+}
POST
PUT
DELETE
with stages:
- dev
- stage
- prod
and stage variable
lambdaAliasset for each stage todev,stage,prod, respectively.
The two functions share the same deployment zip file (lambda.zip):
authorizer- Runtime: Python 3.10
- Handler:
authorizer.authorizer
api- Runtime: Python 3.10
- Handler:
api.apiDifferent versions of theapiLambda function have assigned aliasesdev,stage,prod. API Gateway reads thelambdaAliasvariable uses its value as an alias,api:${stageVariables.lambdaAlias}to call a corresponding version of theapiLambda function.
Build the deployment zip file:
./scripts/build.sh
Update Lambda function code:
./scripts/deploy.sh {update_code|publish_version} {api|authorizer} [dev]