This service can be used via a restful api (synchronously) and via an SNS-Topic asynchronously.
Every method works the same way with the same GET-Parameters as documented in the API Documentation.
Topic: orgchart-image-generator-ml-bund-dev
{
"action": "orgchart-image",
"parameters": {
"orgchart_id": "T3JnQ2hhcnROb2RlOjQ=",
"page": 0,
"position": [78, 590, 131, 645]
}
}
Topic: orgchart-parser-ml-bund-dev
{
"action": "analyze-orgchart",
"parameters": {
"orgchart_id": "T3JnQ2hhcnROb2RlOjQ=",
"page": 0
}
}
Topic: orgchart-image-generator-ml-bund-dev
{
"action": "cache-all-orgchart-images",
"parameters": {
"orgchart_id": "T3JnQ2hhcnROb2RlOjQ=",
"page": 0
}
}
This service is partly configured via terraform. The deployment pipeline (via serverless.yaml) needs the following environment variables in its build context:
Variable | Value |
---|---|
CACHE_BUCKET | Bucket ARN for image caching bucket |
ORGCHART_IMAGE_CACHING_SNS_TOPIC | SNS Topic ARN for image caching jobs |
ORGCHART_PARSER_SNS_TOPIC | SNS Topic ARN for orgchart analyzer jobs |
SENTRY_DSN | sentry monitoring dsn… |
SENTRY_PROJECT | sentry project name (orgchart-ml) |
SERVICE_DOMAIN | backend service domain |
CLIENT_ID | to authenticate as a service via oauth2 client credentials |
CLIENT_SECRET | to authenticate as a service via oauth2 client credentials |
LAMBDA_EXECUTION_ROLE_ARN | the iam rule that executes the lambda. Needs access to lambda, the buckets, the queues and cloudwatch |
DOMAIN | the domain this service is running under. Needs to be configured for gateway and already an tls certificate assigned |