Skip to content

Example of implementing, deploying, and observing a serverless AWS Lambda function in a microservice environment using AWS CDK and Python

Notifications You must be signed in to change notification settings

myarik/aws_cdk_python_demo

Repository files navigation

AWS CDK Python Demo: Lambda Function in a Microservice Architecture

Build Status

This repository demonstrates how to set up, deploy, and observe an AWS Lambda function in a microservice architecture using AWS CDK with Python.

The repository article can be found here.

Table of Contents

Prerequisites

  • Python 3.12+
  • AWS CLI configured with appropriate permissions
  • Node.js and npm (for AWS CDK)
  • Poetry for Python dependency management

Installation

  1. Clone the repository:
git clone https://github.com/myarik/aws-cdk-python-demo.git 
cd aws-cdk-python-demo
  1. Install the dependencies:
make dev

Project Structure

aws-cdk-python-demo/
├── app.py                  # CDK app entry point
├── infrastructure/         # CDK stack definitions
├── service/                # Lambda function code
├── tests/                  # Test files
├── Makefile                # Utility commands
├── README.md
└── pyproject.toml          # Python project configuration

Testing

Run tests using:

make test

Deployment

Deploy the stack:

make deploy

To destroy the stack:

make destroy

About

Example of implementing, deploying, and observing a serverless AWS Lambda function in a microservice environment using AWS CDK and Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published