Streaming Solution with the AWS CDK
This is a sample CDK project that shows how to provision kinesis resources to build a real time analytical application.
The cdk.json
file tells the CDK Toolkit how to execute your app.
Useful commands
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
Build steps
These build steps where produced on a MacOS machine where python 3 is installed and alias as python3
and the CDK command line tool (cdk
) was installed via npm install -g aws-cdk
- Clone the repository to your local machine
cd
into the repository- Execute
npm install
to download all dependencies - Run
cdk deploy
to deploy all resources - Take note of CDK outputs when CDK finishes
- Install boto3 and faker libraries by running
pip3 install boto3 faker
- Update scripts/producer.py with the AWS region where you deployed the CDK app.
- Once provisioned, run
python3 scripts/producer.py
- Enter the stream name from CDK outputs
- Visit the URL for the DynamoDB table view and watch updates come in.
Clean up steps
Run cdk destroy
to cleanup all provisioned resources.
Security
See CONTRIBUTING for more information.
License
This project is licensed under the Apache-2.0 License.