Skip to content

CDK IaC buildout to deploy a stack(s) to AWS, including S3, Lambda , SQS, and a Fargate service for our FastAPI app.

Notifications You must be signed in to change notification settings

tangledpath/cdk-fast-api-jwt

Repository files navigation

Welcome to your CDK Python project!

This is your CDK-based deployment project for the fast_api_jwt app. It works by using CDK IaC to create deployment stacks using code from that project, by virtue of its being in a known relative directory. We will also have other projects associated with this stack, so it makes sense to have a dedicated master project to create comprehensive stack which will include the lambda handler, the fastapi service, a user interface and additional services.

The cdk.json file tells the CDK Toolkit how to execute your app. This app is poetry-based for your convenience. If you don't have poetry, install it.

To get started in your poetry environment

poetry install --no-root
poetry shell

At this point you can now synthesize the CloudFormation template for this code.

$ cdk synth

To add additional dependencies, for example other CDK libraries, just add them to the pyproject.toml file and run the poetry update command. Instead of editing pyproject.toml, you can also add dependencies using poetry add <package_name>. For example, to install python-dotenv, use the command: poetry add python-dotenv

Useful commands

  • cdk ls list all stacks in the app
  • cdk synth emits the synthesized CloudFormation template
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk docs open CDK documentation

Enjoy!

About

CDK IaC buildout to deploy a stack(s) to AWS, including S3, Lambda , SQS, and a Fargate service for our FastAPI app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published