Skip to content

An AWS Lambda for converting JSON from Octopus into Thrift.

Notifications You must be signed in to change notification settings

guardian/flexible-octopus-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flexible-octopus-converter

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.

Deployment

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

Logs are sent to Cloudwatch and the lambda's performance can be monitored in Grafana.

Links

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.

Testing

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>

About

An AWS Lambda for converting JSON from Octopus into Thrift.

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Languages