Welcome to the AWS Lambda Deployment project, where we deploy a simple AWS Lambda function and its associated infrastructure using Terraform (Infrastructure as Code) and establish CI/CD using Github Actions. 💼
- A simple Lambda handler (
src/file_reader/reader.py
) that responds to an S3 event, verifies if it pertains to atxt
file, and logs the file's contents. - Comprehensive error handling, including custom error management and unexpected
RuntimeErrors
. - Rigorous testing (
test/test_file_reader/test_lambda.py
) utilizing themoto
library to mock AWS resources. Achieved test coverage for executed code is 86%. - Streamlined project setup through a
Makefile
, offering security vulnerability checks withbandit
andsafety
, and PEP8 compliance verification usingflake8
. - Infrastructure provisioning on AWS via Terraform, including Lambda, IAM, and S3.
- Seamless Continuous Integration and Delivery (CI/CD) pipeline using Github Actions with the deployment workflow defined in
deploy.yaml
.
Before you get started, ensure you have the following tools installed:
- Python
- Make
- AWS CLI tool (version 2) - You can find installation instructions here: AWS CLI Installation Guide
- Start by forking and cloning this repository.
- Open your terminal and navigate to the root directory of the project.
- Run the following commands:
make requirements
make dev-setup
make run-checks