Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

afrankevych/cdk-poc

Repository files navigation

⚠️ Disclaimer: This service is a work in progress used to learn and explore AWS CDK features and is not intended to be used in production (a.k.a. the code is shit, I'm just messing around)

CDK Media Extraction POC

test

Pokémon™️ and Digimon™️ media assets extraction service

Architecture

The service is subscribed to a media extraction event.

When the event is received the service extracts an image from Pokémon and Digimon public API services and uploads it to an S3 bucket.

flowchart TD
eb(eventbus)
subgraph step function
	sf1{choice state}
	sf2p(pokemon img extractor)
	sf2d(digimon img extractor)
	sf3(extraction completed task)
end
s3[(creature img bucket)]

eb -- sub event --> sf1
sf1 -- pokemon --> sf2p
sf1 -- digimon --> sf2d
sf1 -- unknown input --> sf3
sf2p -. uploads img .-> s3
sf2d -. uploads img .-> s3
sf2p --> sf3
sf2d --> sf3
sf3 -- pub event --> eb
Loading

Development

The cdk.json file tells the CDK Toolkit how to execute your app.

Useful commands

  • npm run tc perform ts type-check
  • npm run build compile typescript to js in dist folder
  • npm run test perform the jest unit tests
  • npm run cdk deploy deploy this stack to your default AWS account/region
  • npm run cdk diff compare deployed stack with current state
  • npm run cdk synth emits the synthesized CloudFormation template

TODO:

  • Add S3 storage to infra
  • Add Pokemon media extractor
    • Add Pokemon API integration
    • Add S3 integration
  • Add Digimon media extractor
    • Add Digimon API integration
    • Add S3 integration
  • Add lambda handler for pokemon media extraction
  • Add lambda handler for pokemon media extraction
  • Add step function
    • Lambda choice step
    • Media extraction completed task
  • Add EventBridge Integration
    • Trigger state machine on event bus event
    • Publish extracted media event to event bus
    • Log extracted media event to cloudwatch
  • Add DataDog integration (via lambda construct extension or using CDK Aspects DataDog does not support CDK Aspects)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published