Skip to content

developergith/terraform-Lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Serverless Pipeline (Terraform)

Project Overview

This project demonstrates an event-driven serverless architecture on AWS using Terraform.

When a file is uploaded to S3, it automatically triggers a Lambda function, which processes the event and stores metadata in DynamoDB.


Architecture Flow

Architecture


Services Used

  • AWS S3 (Storage)
  • AWS Lambda (Compute)
  • AWS DynamoDB (Database)
  • AWS IAM (Permissions)
  • Terraform (Infrastructure as Code)

Features

  • Fully automated infrastructure using Terraform
  • Event-driven architecture
  • Serverless (no server management)
  • Scalable and cost-efficient

Project Structure

lambda-terraform/
│
├── main.tf
├── lambda_function.py
├── lambda.zip
└── README.md

How It Works

  1. User uploads a file to S3 bucket
  2. S3 triggers Lambda function
  3. Lambda extracts file name
  4. Lambda stores data in DynamoDB

How to Run

1. Initialize Terraform

terraform init

2. Plan Infrastructure

terraform plan

3. Apply Infrastructure

terraform apply

Testing

  1. Upload a file to S3 bucket
  2. Check Lambda logs in CloudWatch
  3. Verify entry in DynamoDB

Common Issues

  • S3 bucket name must be globally unique
  • Lambda zip file must contain code at root
  • Ensure correct IAM permissions

Learnings

  • Terraform basics (init, plan, apply)
  • Event-driven architecture
  • AWS Lambda integration with S3 and DynamoDB

📸 Screenshots

⚙️ Terraform Initialization

Terraform Init


🚀 Terraform Apply (Infrastructure Creation)

Terraform Apply


🪣 S3 Bucket Created

S3 Bucket


⚡ Lambda Function

Lambda Function


🔗 Lambda Trigger (S3 → Lambda)

Lambda Trigger


📊 CloudWatch Logs (Execution)

CloudWatch Logs


Author

Ayush Nath Motichur

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages