DEV Community

Cover image for How I Built a Fully Serverless AI SaaS with AWS Bedrock
Ismail G.
Ismail G.

Posted on

How I Built a Fully Serverless AI SaaS with AWS Bedrock

Most AI products today start with a chatbot.

When I started building Cogletta, I wanted to solve a different problem.

Instead of generating more content, I wanted to help people spend less time searching and more time reading.

Cogletta delivers three curated articles tailored to each user's interests and sends an email newsletter to that user.

From the user's perspective, it's simple.

Behind the scenes, however, there's an entirely serverless architecture that automatically discovers, evaluates, summarizes, and delivers high-quality articles every day.


Why Serverless?

As a solo founder, I didn't want to spend weekends maintaining infrastructure.

No Kubernetes clusters.

No EC2 instances.

No database servers.

No operating system updates.

My goal was simple:

Spend my time improving the product, not operating servers.

AWS already provides managed services for almost everything I needed.

So I decided to build this platform around serverless services.


High-Level Architecture

The frontend is a static Next.js application. It is hosted on Amazon S3 and distributed globally through CloudFront.

User authentication is, of course, handled by Amazon Cognito.

Backend processes run inside AWS Lambda.

EventBridge schedules the daily workflows.

DynamoDB stores users, preferences, articles, and recommendation history.

Amazon SES delivers personalized emails.

Finally, Amazon Bedrock acts as the intelligence layer that evaluates and curates articles.

The result is a platform with virtually no infrastructure to manage.


Why I Chose Amazon Bedrock

Many AI projects simply ask an LLM to summarize an article.

I wanted something more sophisticated.

The AI has to answer questions like:

  • Is this article actually worth reading?
  • Is it original?
  • Is it balanced?
  • Does it overlap with another article?
  • Is it still relevant today?

Amazon Bedrock made this easy because I could use Claude without worrying about hosting models.

The model evaluates candidate articles, ranks them, categorizes them, and generates concise summaries.

The goal isn't to generate new content.

It's to help users discover better content.


Event-Driven Processing

One of my favorite parts of the architecture is that almost everything is event-driven.

Every morning:

  1. EventBridge starts the workflow.
  2. Lambda collects new articles.
  3. Articles are cleaned and normalized.
  4. Bedrock evaluates quality.
  5. The best candidates are selected.
  6. Personalized recommendations are generated.
  7. SES sends emails.

No cron servers.

No background workers.

No permanently running services.

Only short-lived functions that execute when needed.


Why DynamoDB?

Many people automatically reach for PostgreSQL.

For Cogletta, DynamoDB was actually a better fit.

The application mostly performs predictable key-based lookups:

  • user preferences
  • article metadata
  • recommendation history
  • daily selections

There are very few complex joins.

DynamoDB offers automatic scaling, high availability, and requires essentially zero maintenance.

Exactly what I wanted.


Cost Matters

One reason I chose serverless is cost.

In the early stages of a SaaS, usage is unpredictable.

With Lambda, EventBridge, DynamoDB, and S3, I only pay for what is actually used.

That allows me to keep infrastructure costs extremely low while focusing on product development.


Lessons Learned

Building an AI product isn't only about choosing the best language model.

Most of the engineering effort happens before the prompt.

Cleaning data.

Removing duplicates.

Selecting trusted sources.

Building reliable workflows.

Reducing operational complexity.

Those decisions have a much bigger impact on the user experience than simply changing models.


What's Next?

I am still developing Cogletta. It is still evolving.

Some of the features I'm currently working on include:

  • Better personalization
  • Smarter article ranking
  • More high-quality content sources

The infrastructure is already capable of scaling far beyond the current user base. So I can focus on building features instead of rebuilding the backend.


Final Thoughts

Choosing serverless wasn't just a technical decision.

It was a product decision.

Every hour I don't spend maintaining servers is another hour I can spend making Cogletta better.

And as a solo founder, that's probably the most valuable optimization of all.


If you're building a serverless product with AWS or experimenting with Amazon Bedrock, I'd love to hear about your experience.

By the way if you love morning reads visit cogletta.com :)

Top comments (0)