MCPcopy Index your code
hub / github.com/aws-samples/reactive-refarch-cloudformation

github.com/aws-samples/reactive-refarch-cloudformation @5.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 5.0 ↗ · + Follow
194 symbols 369 edges 19 files 71 documented · 37%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Reactive Microservices Architectures with Amazon ECS, AWS Fargate, AWS Lambda, Amazon Kinesis Data Streams, Amazon ElastiCache, and Amazon DynamoDB

This reference architecture provides an Amazon CDK application for deploying a reactive microservices architecture based on Amazon Elastic Container Service (Amazon ECS) using AWS Fargate, AWS Lambda, Amazon Kinesis Data Streams, Amazon ElastiCache, and Amazon DynamoDB.

Overview

infrastructure-overview

The repository consists of a set of nested templates that deploy the following:

Deployment

Compile and upload Lambda functions

  1. Compile the Kinesis-consumer Lambda function
cd services/kinesis-consumer
cargo lambda build --release --target x86_64-unknown-linux-musl --output-format zip   
mv target/lambda/kinesis-consumer-lambda/bootstrap.zip target/lambda/kinesis-consumer-lambda/kinesis-consumer.zip
cd ..
  1. Upload the kinesis-consumer.zip-file to

  2. Compile the Redis-update Lambda function

cd services/redis-updater 
cargo lambda build --release --target x86_64-unknown-linux-musl --output-format zip   
mv target/lambda/redis-updater/bootstrap.zip target/lambda/redis-updater/redis-updater.zip
cd ..
  1. Upload the redis-updater.zip-file to

Build Java app and container image

cd services/tracking-service/reactive-quarkus
docker build -t <your-container-image> -f src/main/docker/Dockerfile.jvm .
docker push <your-container-image>

Deploy CDK app

cd infrastructure/reactive-cdk-app 
cdk bootstrap
cdk synth
cdk deploy --parameters containerImage=<your-container-image> --parameters s3Bucket=<your-preferred-S3-bucket>

Test the application

After the application has been deployed correctly, you can load test data into Redis by calling the following URL using e.g. curl:

curl http://<endpoint>/cache/fill

After the cache has been filled succesfully, you can call the tracking application with an existing program id e.g. 212313

curl http://<endpoint>/event/212313

This HTTP call returns a response like

{"userAgent":"curl/7.54.0","programId":"212313","programName":"program2","checksum":"124","customerId":9124,"customerName":"Customer2","messageId":"06bc2944-886c-4e56-907c-fa248c8af023","valid":true"}

Contributing

Please create a new GitHub issue for any feature requests, bugs, or documentation improvements.

Where possible, please also submit a pull request for the change.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 165
Class 17
Function 6
Interface 6

Languages

Java86%
Rust13%
TypeScript2%

Modules by API surface

services/tracking-service/reactive-quarkus/src/main/java/com/amazon/proto/TrackingEventProtos.java110 symbols
services/tracking-service/reactive-quarkus/src/main/java/com/amazon/vo/TrackingMessage.java21 symbols
services/tracking-service/reactive-quarkus/src/main/java/com/amazon/verticles/HttpVerticle.java9 symbols
services/tracking-service/reactive-quarkus/src/main/java/com/amazon/verticles/RedisVerticle.java8 symbols
services/tracking-service/reactive-quarkus/src/main/java/com/amazon/verticles/KinesisVerticle.java6 symbols
services/tracking-service/reactive-quarkus/src/main/java/com/amazon/verticles/CacheVerticle.java6 symbols
services/kinesis-consumer/src/persistence/dynamodb/mod.rs6 symbols
services/kinesis-consumer/src/persistence/mod.rs5 symbols
services/redis-updater/src/main.rs4 symbols
services/kinesis-consumer/src/model/tracking.rs4 symbols
services/tracking-service/reactive-quarkus/src/main/java/com/amazon/VertxResource.java3 symbols
infrastructure/reactive-cdk-app/lib/reactive-cdk-app-stack.ts3 symbols

For agents

$ claude mcp add reactive-refarch-cloudformation \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page