AWS FastAPI CDK deployment with sample Bedrock-based AI solution.
- Deployed on AWS with Infrastructure as Code on CDK-Python.
- API developed with FastAPI.
- AI Models on top of AWS Bedrock.
- Unit and Integration Tests for the source code with PyTest.
The AWS infrastructure solution is deployed with CDK-Python with the resources defined on the cdk
folder:
This repository consists of multiple folders/files, which are explained as follows:
- Infrastructure as Code: (
./cdk/
). - Source Code: (
./src/
). - Python dependencies on top of custom Lambda Layers: (
./lambda-layers
). - Tests: (
./tests/
)
Follow these steps to configure the project locally:
Go to AWS Console, and request access to the Bedrock models that will be used.
First, clone the repository:
git clone https://github.com/san99tiago/aws-cdk-bedrock-lambda-poc
cd aws-cdk-bedrock-lambda-poc
Review the step by step commands for configuring the CDK at:
Note: python dependencies for this project are managed by Poetry. Review
./pyproject.toml
for details.
Note: for deploying or destroying the solution, see ("part 3") inside
./important_commands.sh
.
-
Visual Studio Code
Visual Studio Code is my main code editor for high-level programming. This is not absolutely necessary, but from my experience, it gives us a great performance and we can link it with Git and GitHub easily. -
Python
Python is a dynamic programming language that let us work fast, with easy and powerful integration of different software solutions.
-
CDK CLI (Toolkit)
To work with the CDK, it is important to install the main toolkit as a NodeJs global dependency. Please refer to the official AWS Getting started with the AWS CDK -
AWS CLI
The AWS Command Line Interface (AWS CLI) is a unified tool to manage your AWS services. We will use it for connecting to our AWS account from the terminal (authentication and authorization towards AWS).
- I am grateful to the talented individuals who have dedicated their time and effort to develop the exceptional open-source projects that have been used in the creation of this solution.
Santiago Garcia Arango
As a curious DevOps Engineer, I am deeply passionate about implementing cutting-edge cloud-based solutions on AWS. |
Copyright 2023 Santiago Garcia Arango