☀️ How I Built a Daily Motivation SMS Bot with AWS in 10 Minutes

Mornings can be rough. Some people need coffee, others scroll through social media, but I wanted something different. I wanted a simple text message with a motivational quote waiting for me each day.

So I built a Daily Motivation SMS Bot on AWS. Every morning at 9 AM, my phone buzzes with a fresh quote from the internet.

🏗️ The Architecture

The idea is simple:

  1. EventBridge (scheduled rule) triggers every morning at 9 AM.
  2. The event invokes a Lambda function.
  3. Lambda fetches a random quote from an external API.
  4. Lambda uses Amazon SNS to send the quote straight to your phone as an SMS.

EventBridge (Daily Schedule) → Lambda → ZenQuotes API → SNS → SMS

⚡ Step 1: Setting Up Amazon SNS

SNS is the service that delivers the SMS to your phone.

  1. Go to the SNS Console and create a new Topic.
  • Type: Standard
  • Name: DailyMotivation

2. Add a subscription to the topic:

  • Protocol: SMS
  • Endpoint: your phone number

That’s it. SNS is now ready to send texts.

⚡ Step 2: Fetching Quotes from the Internet

Instead of hardcoding motivational quotes inside Lambda, we can use an API.

The one I used is ZenQuotes API. It’s lightweight, free, and doesn’t need an API key.

👉 Example API call:

https://zenquotes.io/api/random

It returns a response like this:

⚡ Step 3: Writing the Lambda Function

Here’s the Python Lambda function I used:

import boto3
import requests

sns = boto3.client(‘sns’)

def lambda_handler(event, context):
# Fetch a random quote
resp = requests.get(“https://zenquotes.io/api/random“)
data = resp.json()[0]

# Format the message
quote = f”“{data[‘q’]}” — {data[‘a’]}”

# Publish to SNS
sns.publish(
TopicArn=”arn:aws:sns:REGION:ACCOUNT_ID:DailyMotivation”,
Message=quote
)

return {“status”: “Quote sent!”, “quote”: quote}

Every time this Lambda runs, it pulls a new quote from the API and sends it to your phone.

⚡ Step 4: Automating with EventBridge

We don’t want to run this function manually. That’s where EventBridge comes in.

  1. Go to EventBridge → Rules → Create Rule.
  2. Choose Schedule and set it to run daily at 9 AM.
  3. Add your Lambda function as the target.

Now your bot runs automatically, every single morning.

📲 The Result

The next day, my phone buzzed:

“Believe you can and you’re halfway there.”-Theodore Roosevelt

It’s a small thing, but honestly, it feels great. Starting the day with a little dose of motivation makes mornings lighter.

🔥 Going Beyond Motivation

Once this worked, I realized the same idea can be applied in so many fun ways:

  • Send daily weather alerts using the OpenWeather API.
  • Send jokes or fun facts instead of quotes.
  • Send your to-do list or reminders.
  • Generate AI-based affirmations with Amazon Bedrock.

The pattern remains the same: EventBridge → Lambda → API → SNS → SMS.

✨ See Y’all

Thanks for reading. If you found this interesting, I’d love to connect and exchange ideas. You can reach me here on Medium or on LinkedIn@https://www.linkedin.com/in/mukhteshpendem/


☀️ How I Built a Daily Motivation SMS Bot with AWS in 10 Minutes was originally published in Javarevisited on Medium, where people are continuing the conversation by highlighting and responding to this story.

This post first appeared on Read More