This repo contains the lambda function which converts incoming Octopus JSON into Thrift. The lambda gets records from one Kinesis stream, validates and parses them, them puts them on a second Kinesis stream, which is made available to Editorial Tools services.
The lambda is deployed via RiffRaff, using the Editorial Tools::Octopus Conversion Lambda project. On merge to main, the lambda will be automatically deployed.
Logs are sent to Cloudwatch and the lambda's performance can be monitored in Grafana.
The cloud formation for these resources can be found in the editorial-tools-platform repo.
The thrift model can be found in the flexible-octopus-model repo.
The project includes some basic tests for the functionality of the lambda. It is also possible to test a production environment by putting data onto the kinesis stream in base64. You can use the test resources as a starting point:
Base64 encoding a file:
EXAMPLE=$(cat ./src/test/resources/exampleBundleObject.json | base64)
Putting a record onto the stream:
aws kinesis put-record --stream-name <STREAM_NAME> --data $EXAMPLE --profile <PROFILE> --partition-key example --region <REGION>