Skip to content

An AWS Lambda function that automatically triggers when a new file is uploaded to an S3 bucket. It logs the uploaded filename and demonstrates event-driven architecture in AWS.

Notifications You must be signed in to change notification settings

tnhkoc/lambda-s3-file-trigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Lambda S3 File Trigger (Python)

Event-driven serverless automation for S3 bucket uploads.

🎯 Objective

This project implements a basic event-driven architecture where an AWS Lambda function is automatically triggered whenever a new file is uploaded to an S3 bucket.

πŸš€ Key Features

  • Serverless Automation: Zero infrastructure to manage; function runs only on events.
  • Event Correlation: Demonstrates how Lambda parses S3 metadata from event objects.
  • IAM Best Practices: Uses the principle of least privilege for the Lambda execution role.

πŸ—οΈ Architecture

flowchart LR
  User((User)) -->|Upload| S3["S3 Bucket"]
  S3 -->|Event Trigger| Lambda["AWS Lambda (Python)"]
  Lambda -->|Log Filename| CW["CloudWatch Logs"]
Loading

πŸ“ Project Structure

.
β”œβ”€β”€ screenshots/    # Step-by-step implementation visuals
└── README.md       # Project documentation

πŸ› οΈ Tech Stack

  • Compute: AWS Lambda (Python 3.10)
  • Storage: Amazon S3
  • Monitoring: CloudWatch Logs
  • Security: IAM Roles

πŸ”§ Setup & Steps

1. Create S3 Bucket

S3 Bucket Creation

2. Lambda Function Code

Implement the Python logic to process the S3 event. Lambda Code

3. Configure Trigger

Ensure the Lambda function has permissions to be invoked by S3. Trigger Config

βœ… Verification

Upload a file and monitor the execution in CloudWatch Logs. CloudWatch Logs


Created by Tunahan KoΓ§ | LinkedIn | GitHub

About

An AWS Lambda function that automatically triggers when a new file is uploaded to an S3 bucket. It logs the uploaded filename and demonstrates event-driven architecture in AWS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors