Skip to content
Go back

Setting Up WhatsApp Messaging with Meta and AWS

Published:  at  10:00 AM

Another random idea from some random comment on a podcast this morning; “Can I do some AI genertaed response to a Whatsapp message?”. Turns out - yep, you can and the test setup is quite easy. The setup I got workingfor the WhatsApp bot using the Meta Cloud API, AWS Lambda, and API Gateway.

I’m documenting the exact steps here for future reference, or if I want to rebuild this somewhere else.


What I Built

A WhatsApp bot that:


Stack


Step-by-Step Setup

1. Meta Developer Setup


2. Created the Lambda Function

Used Python 3.13.

mkdir teambot-lambda
cd teambot-lambda
pip install requests -t .

Wrote lambda_function.py to:

Zipped it:

zip -r function.zip .

Uploaded to AWS Lambda.

Set environment variables:


3. API Gateway Setup

Important: used REST API, not HTTP API.

Endpoint looked like:

https://abc123.execute-api.us-west-2.amazonaws.com/prod/webhook

4. Webhook Verification

In Meta Developer Portal:

Added webhook GET logic in the Lambda to echo back hub.challenge.

Meta confirmed the webhook ✅


5. Subscribed to Message Events

In Webhooks → Manage:


6. Test Message Loop

Sent “hi” to the test number.

Lambda received the message and replied with:

"hello gee"

Confirmed everything working via:

Next Steps

Will expand this to:

But for now — the core pipeline is live. WhatsApp in, Lambda logic, WhatsApp out.


TeamBot is alive. 🧠📲


Suggest Changes

Previous Post
Gemini 2.5 - my side piece
Next Post
Starting to hate this blog setup!