Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Outline

Kinesis Consumer Example

This folder contains an example on how to build a consumer application using Cerone, Docker and a custom function.

Requirements

The Kinesis Client Library for Python will try to grab the AWS using DefaultAWSCredentialsProviderChain. You should pass AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables to your Docker image.

Files

The Docker image will need two files in /app:

  • main.py: The MultiLangDaemon will call this script. We'll run the processing_function for all the records in the stream.
  • main.properties: Stream related configuration.

Usage

You can add requirements.txt as shown in this example. Once you've coded your function, build a Docker image using bufferapp/cerone-consumer:0.1.1 as the base. In our case:

docker build -t cerone-sample-consumer .

Then, simply run the image with the required environment variables:

docker run -it --rm --env-file .env cerone-sample-consumer
Morty Proxy This is a proxified and sanitized view of the page, visit original site.