This diagram is a little out of date (missing direct lambdas, etc.), but it gives you the basic gist of it.
Diagram by Cloudcraft.
The AWS CDK entry point is src/Main.ts, this instantiates the components shown in the diagram from the stack classes under src/Stack
The implementation code for the LambdaApi is contained in the
lambda package - it has it's own package.json
, but is not completely
standalone (it has some relative references back out to the Stack code - I hope
to get rid of those at some point.)
- before you can run the
diff
ordeploy
scripts, you must run theclient
build-prd
script to build the client app code or theaws-infra
build will fail saying it couldn't find those files. - run
npm diff
to compile the project and look for any changes that need to be made to the AWS infrastructure to bring it in line with the codebase - run
npm deploy
to make changes to the AWS infrastrucure - run
npm hotswap-lambda
to do a quick deploy of Lambda code (10 - 15 seconds)
I like absolute paths for my imports, got the implementation from: https://github.com/moltar/cdk-ts-path-mapping