Inspiration
At the moment there are many events platform, but they all have the disadvantage that users need to pay to post their events. For this reason, normal people that would like to organize events with friends (e.g., birthday parties, casual parties, etc.) won't use these platforms. Instead they would just use the free messagging applications like whatsapp (which is the most used in my country).
Therefore, the idea is to create a WhatsApp bot (or at least a prototype), that allows user to create simple events and share them with their friends.
What it does
- The user sends to the bot an event to be created.
- The bot creates the event and returns the link to it.
- The user can share the link with their friends
- The user can delete or lists all their events
How I built it
Architecture Overview
The application follows a serverless microservices architecture using AWS Lambda functions:
WhatsApp User → Twilio Webhook → API Gateway → Router Lambda
↓
┌─────────────┼─────────────┐
↓ ↓ ↓
Create Event List Events Delete Event
Lambda Lambda Lambda
↓ ↓ ↓
DynamoDB + S3 DynamoDB DynamoDB
Additional components:
- Get Event Lambda: Serves the React app via separate API endpoint
- React App: Hosted on S3 + CloudFront for event display
AWS Lambda
The bot uses 4 core Lambda functions plus 1 additional function for the web interface:
| Function | Trigger |
|---|---|
| Router | API Gateway POST |
| Create Event | Direct invocation |
| List Events | Direct invocation |
| Delete Event | Direct invocation |
| Get Event | API Gateway GET |
DynamoDB
- Purpose: Stores event data
S3
- Bucket 1: Event images with public read access
- Bucket 2: Static React application hosting
CloudFront Distribution
- Purpose: CDN for React application with global edge locations
Challenges I ran into
The hardest challenge I encountered was defining permissions for lambda functions and other services. Even though I managed to make the stack work in local (oldest assumptions for a developer), I had many problems once it was deployed. After a lot of time spent for debugging, I found out that the permissions were not set correctly and e.g. my router function was not able to invoke the other functions.
Still regarding permissions, another challenge was setting up the edge lambda function to allow SSR for my React App. The problem was that I was not able to grant read permissions to my DynamoDB to fetch the event data.
Accomplishments that I'm proud of
For the first time, I managed to create a cdk stack that builds an entire working application. I developed an app to address a specific need identified among peers, with the goal of encouraging more real-world engagement.
What I learned
I learned how permissions work for lambda functions and how to set them. I learned that using cdk stack, it is in the end very easy to deploy an entire application without accessing the AWS console and doing everything in the terminal.
What's next for Whatsapp Events Bot
Considering the extendibility of the code, I have some features planned
Planned Features
- Amazon Bedrock Integration: Automatic event information extraction from images using AI
- Location-Based Discovery: Find events near user's location
Log in or sign up for Devpost to join the conversation.