A curated collection of Python-based AWS Lambda functions designed to solve real-world cloud automation and DevOps problems.
Each folder in this repository contains a self-contained function with its own logic, intended to be deployed to the AWS Serverless environment.
Location: S3-Slack-Notifier/lambda_function.py
A secure, event-driven notification system that bridges AWS S3 and Slack. It instantly alerts a team channel whenever a new file is uploaded to a specific S3 bucket.
Key Features:
- Event-Driven: Triggered automatically by S3
ObjectCreatedevents. - Secure Sharing: Generates a temporary Presigned URL (valid for 1 hour) so users can download private files without public bucket access.
- Smart Decoding: Automatically handles URL-encoded filenames (e.g.,
Team+Photo.jpg->Team Photo.jpg) to prevent broken links. - Ops-Friendly: Uses Environment Variables for webhook security and includes robust error handling for "test" events.
Architecture:
User Uploads File -> S3 Bucket -> Lambda Trigger -> Generate Presigned URL -> Post to Slack Webhook
- Clone the repo:
git clone [https://github.com/shakeelsaga/Serverless-Functions-Collection.git](https://github.com/shakeelsaga/Serverless-Functions-Collection.git)
- Select a function: Navigate to the specific folder.
- Deploy: Copy the code into the AWS Lambda Console (Python 3.x runtime).
- Configure: Set the required Environment Variables (documented in the code comments).
- Runtime: Python 3.9+
- AWS SDK: Boto3 (Core integration)
- Libraries:
urllib(Standard library for lightweight HTTP requests)
I am actively adding new automation patterns to this repository. If you have a suggestion for a useful Lambda function, feel free to open an issue or pull request!
MIT License