I designed and implemented this cloud-native ride booking system using AWS, Terraform, and Telegram.
It enables users to request rides via Telegram, calculates routes and pricing with Amazon Location Service, stores trip data in DynamoDB, and notifies drivers instantly.
This project showcases a serverless ride-booking workflow built on AWS and is not intended to be a commercial multi-tenant platform.
flowchart LR
TG["Telegram User"] --> APIGW["API Gateway v2<br/>(HTTP API)"]
APIGW --> LBD["AWS Lambda<br/>(app.py)"]
LBD --> GEO["Amazon Location Service<br/>PlaceIndex & RouteCalculator"]
LBD --> DDB["DynamoDB<br/>ridebot-trips"]
LBD --> SSM["SSM Parameter Store<br/>/ridebot/*"]
LBD --> LOGS["CloudWatch Logs"]
subgraph AWS
APIGW
LBD
GEO
DDB
SSM
LOGS
end
Components:
- Terraform – manages all infrastructure (API Gateway, Lambda, DynamoDB, IAM, SSM, Amazon Location).
- AWS Lambda (Python) – core logic (Telegram webhook, route calculation, price rules).
- Amazon API Gateway – webhook endpoint for Telegram.
- Amazon DynamoDB – trip storage.
- Amazon Location Service – geocoding + route calculation.
- SSM Parameter Store – keeps bot token and driver profiles secure.
- GitHub Actions (OIDC) – CI/CD pipeline for automated deploys.
ridebot-infra/
├── .github/ # GitHub workflows (infra.yml)
├── terraform/ # All Terraform infrastructure (API, Lambda, DynamoDB, SSM, Location)
├── lambda_src/ # Lambda function source code (app.py)
├── docs/ # ADRs, technical docs, limitations
├── .tflint.hcl # Linter configuration for Terraform
├── LICENSE # MIT license
└── README.md # Project overview (main root README)
Full detailed structure: see docs/TECHNICAL.md
cd terraform
terraform init
terraform apply -auto-approve- Push to
main→ triggers Terraform plan & apply via OIDC. - GitHub assumes role
ridebot-terraform-ghain AWS. - Fully automated infra deployment.
Secrets are stored in AWS SSM Parameter Store:
/ridebot/telegram_bot_token– Telegram bot token./ridebot/driver_profiles– list of drivers (IDs, names, cars).
Example driver config:
[
{ "chat_id": "123456", "name": "Driver1", "car": "Honda Accord" },
{ "chat_id": "987654", "name": "Driver2", "car": "Toyota Sienna" }
]- Order ride via Telegram (pick-up & drop-off)
- Price calculation (minimum $10 for < 5 miles)
- Driver notification via SMS/Telegram
- Schedule rides (date & time picker)
- Multi-driver support
- Infrastructure fully managed by Terraform
Planned enhancements to evolve this demo into a more robust, production-aligned service:
- Add structured JSON logging (Powertools).
- Add basic CloudWatch dashboards for Lambda & API Gateway.
- Migrate SSM parameters to a dedicated KMS key.
- Introduce least-privilege IAM boundaries.
- Add TTL for user sessions and old trips.
- Add driver-centric GSI for listing active/assigned rides.
- Add
/healthendpoint. - Add optional SMS notification (SNS) for confirmations.
- Add static map preview for pickup/dropoff points.
- Add staging environment + GitHub Actions protection rules.
- Add pre-commit hooks (tflint, tfsec, checkov).
- AWS Lambda (Python 3.11)
- Amazon API Gateway v2 (HTTP API)
- Amazon DynamoDB
- Amazon Location Service
- AWS SSM Parameter Store
- Terraform
- GitHub Actions (OIDC)
This project is released under the MIT License.
See the LICENSE file for details.