Skip to content

Commit a1e1932

Browse files
Update README.md with new project description
1 parent 4c516ec commit a1e1932

1 file changed

Lines changed: 227 additions & 9 deletions

File tree

β€ŽREADME.mdβ€Ž

Lines changed: 227 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,231 @@
1-
# Serverless Lambda Project
1+
# Serverless Newsletter Subscription System
22

3-
This project is a serverless application designed to handle user subscriptions efficiently. It leverages several AWS services including Lambda, CloudFront, S3, DynamoDB, and SES.
3+
A serverless web application that handles newsletter subscriptions automatically using AWS services. When users subscribe, they receive a confirmation email, the admin is notified, and the subscription data is stored in a database - all without managing any servers!
44

5-
## Functionality
6-
- **User Subscription:** Users can subscribe to the website. Upon subscription, an email notification is sent to both the user and the site administrator.
7-
- **Data Storage:** User subscription data is securely stored in DynamoDB, ensuring easy access and management.
5+
> **Note**: This is a demo project built to learn AWS serverless architecture. The website template is for demonstration purposes only.
86
9-
## Live Demo
10-
You can check out the live project here: [Live Link](https://jhgalkj.xyz/)
7+
---
118

12-
## Problem Solved
13-
This application simplifies the subscription process for websites, automating email notifications and data management, which enhances user experience and reduces manual efforts for site administrators.
9+
## 🌐 Live Demo
10+
11+
**Check it out**: [https://jhgalkj.xyz/](https://jhgalkj.xyz/)
12+
13+
Try subscribing with your email to see the serverless workflow in action!
14+
15+
---
16+
17+
## 🎯 What Does This Project Do?
18+
19+
This application handles the complete newsletter subscription workflow:
20+
21+
1. **User subscribes** on the website with their email
22+
2. **Lambda function** processes the subscription
23+
3. **Email sent to user** confirming their subscription (via SES)
24+
4. **Email sent to admin** notifying them of the new subscriber (via SES)
25+
5. **Data stored** in DynamoDB for future reference
26+
27+
All of this happens automatically, without any server management!
28+
29+
---
30+
31+
## πŸ—οΈ AWS Services Used
32+
33+
### **Amazon S3**
34+
- **What it does**: Stores the static website files (HTML, CSS, JavaScript, images)
35+
- **Why I used it**: S3 is perfect for hosting static websites - it's cheap, reliable, and scales automatically
36+
37+
### **Amazon CloudFront**
38+
- **What it does**: Content Delivery Network (CDN) that delivers the website to users worldwide
39+
- **Why I used it**: Makes the website load super fast by caching content in edge locations close to users, plus provides HTTPS
40+
41+
### **AWS Lambda**
42+
- **What it does**: Runs the subscription processing code without needing to manage servers
43+
- **Why I used it**: I only pay when someone subscribes (pay-per-use), and it scales automatically from 0 to thousands of requests
44+
45+
### **Amazon DynamoDB**
46+
- **What it does**: NoSQL database that stores subscriber information
47+
- **Why I used it**: Serverless database that scales automatically and has millisecond response times
48+
49+
### **Amazon SES (Simple Email Service)**
50+
- **What it does**: Sends confirmation emails to subscribers and notification emails to admin
51+
- **Why I used it**: Reliable, cost-effective email service that integrates seamlessly with Lambda
52+
53+
### **Amazon API Gateway**
54+
- **What it does**: Creates the API endpoint that the website calls when users subscribe
55+
- **Why I used it**: Acts as the "front door" for the Lambda function, handling HTTP requests from the website
56+
57+
---
58+
59+
## πŸ”„ How It Works - Complete Workflow
60+
61+
Here's exactly what happens when someone subscribes:
62+
63+
### **Step-by-Step Process:**
64+
65+
```
66+
1. User visits website (CloudFront β†’ S3)
67+
↓
68+
2. User enters email and clicks "Subscribe"
69+
↓
70+
3. Website sends request to API Gateway
71+
↓
72+
4. API Gateway triggers Lambda function
73+
↓
74+
5. Lambda function processes the subscription:
75+
- Validates the email
76+
- Stores data in DynamoDB
77+
- Sends confirmation email to user (SES)
78+
- Sends notification email to admin (SES)
79+
↓
80+
6. User sees "Successfully subscribed!" message
81+
↓
82+
7. User receives confirmation email
83+
↓
84+
8. Admin receives notification email
85+
```
86+
87+
### **Visual Flow:**
88+
89+
```
90+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
91+
β”‚ User β”‚
92+
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
93+
β”‚
94+
β–Ό
95+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
96+
β”‚ CloudFront │◄────── S3 β”‚
97+
β”‚ (CDN) β”‚ β”‚ (Website)β”‚
98+
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
99+
β”‚
100+
β–Ό
101+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
102+
β”‚ API Gateway β”‚
103+
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
104+
β”‚
105+
β–Ό
106+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
107+
β”‚ Lambda │─────►│ DynamoDB β”‚ β”‚ SES β”‚
108+
β”‚ (Function) β”‚ β”‚ (Database) β”‚ β”‚ (Email) β”‚
109+
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
110+
β”‚
111+
β–Ό
112+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
113+
β”‚ User & Admin β”‚
114+
β”‚ Receive Emails β”‚
115+
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
116+
```
117+
118+
---
119+
120+
## 🎯 Real-World Problem Solved
121+
122+
### **The Traditional Approach (Without Serverless):**
123+
124+
To build a subscription system the old way, you would need:
125+
- ❌ A server running 24/7 (costs money even when no one is subscribing)
126+
- ❌ Manual server maintenance, security patches, and updates
127+
- ❌ Setting up and managing an email server or third-party integration
128+
- ❌ Database server setup and maintenance
129+
- ❌ Load balancer if you expect high traffic
130+
- ❌ Manual scaling during traffic spikes
131+
132+
**Monthly Cost**: $20-$100+ for a server running 24/7
133+
134+
### **The Serverless Approach (This Project):**
135+
136+
With serverless architecture:
137+
- βœ… No servers to manage - AWS handles everything
138+
- βœ… Pay only when someone subscribes (could be $0-$5/month for moderate traffic)
139+
- βœ… Automatically scales from 0 to thousands of subscriptions
140+
- βœ… Built-in email service (SES)
141+
- βœ… Serverless database (DynamoDB)
142+
- βœ… No maintenance required
143+
144+
**Monthly Cost**: ~$1-$5 for hundreds of subscribers (mostly under AWS free tier!)
145+
146+
### **Benefits:**
147+
- **Cost-Effective**: Only pay for what you use
148+
- **Scalable**: Handles 1 subscriber or 10,000 subscribers automatically
149+
- **Reliable**: 99.99% uptime guaranteed by AWS
150+
- **Fast**: Global content delivery via CloudFront
151+
- **Secure**: HTTPS, encryption, and AWS security built-in
152+
- **No Maintenance**: No servers to patch or update
153+
154+
---
155+
156+
## πŸ“ Project Structure
157+
158+
```
159+
serverless-lambda-project/
160+
β”œβ”€β”€ index.html # Main website page with subscription form
161+
β”œβ”€β”€ css/ # Website styling
162+
β”œβ”€β”€ js/ # Frontend JavaScript (handles form submission)
163+
β”œβ”€β”€ img/ # Website images
164+
└── README.md # This file
165+
```
166+
167+
---
168+
169+
## πŸ’‘ What I Learned
170+
171+
This project taught me:
172+
- βœ… How to build serverless applications on AWS
173+
- βœ… Integrating multiple AWS services together
174+
- βœ… Creating Lambda functions to process data
175+
- βœ… Using API Gateway to expose Lambda functions
176+
- βœ… Sending automated emails with SES
177+
- βœ… Storing data in DynamoDB
178+
- βœ… Hosting static websites with S3 and CloudFront
179+
- βœ… Cost optimization with serverless architecture
180+
181+
---
182+
183+
## πŸŽ“ Course Reference
184+
185+
This project was built following Section 2 of:
186+
**AWS Mastery: Hands-On Cloud Projects for Engineers** on Udemy
187+
188+
Course Link: [Udemy Course](https://www.udemy.com/course/aws-mastery-hands-on-cloud-projects-for-engineers/)
189+
190+
---
191+
192+
## πŸ’° Estimated Cost
193+
194+
**AWS Free Tier includes:**
195+
- Lambda: 1M free requests/month
196+
- DynamoDB: 25GB storage + 25 write/read capacity units
197+
- S3: 5GB storage + 20,000 GET requests
198+
- CloudFront: 50GB data transfer + 2M requests
199+
- SES: 62,000 emails/month (when called from Lambda)
200+
201+
**For moderate usage (100-500 subscribers/month):**
202+
- Lambda: $0 (within free tier)
203+
- DynamoDB: $0 (within free tier)
204+
- S3: $0.50
205+
- CloudFront: $1-2
206+
- SES: $0 (within free tier)
207+
208+
**Total: ~$1-3/month** πŸŽ‰
209+
210+
---
211+
212+
## πŸš€ Key Features
213+
214+
βœ… Serverless architecture (no server management)
215+
βœ… Automatic email confirmation to subscribers
216+
βœ… Admin notification emails
217+
βœ… Data storage in DynamoDB
218+
βœ… Fast global content delivery
219+
βœ… HTTPS enabled
220+
βœ… Auto-scaling from 0 to thousands of requests
221+
βœ… Cost-effective (pay-per-use model)
222+
223+
---
224+
225+
## πŸ“§ Contact
226+
227+
For questions or feedback about this project, feel free to open an issue or reach out!
228+
229+
---
230+
231+
**Built with ☁️ AWS Serverless Services

0 commit comments

Comments
Β (0)