Skip to main content

2 posts tagged with "Cognito"

Managing authentication and authorization with AWS Cognito. Covers user pools, identity pools, guest access, token flows, and securing access to APIs and cloud resources.

View All Tags

Day 13: Build your secure backend trigger

ยท 38 min read
Norah Klintberg Sakal
AI Consultant & Developer

Build your secure backend trigger

What you'll learn

How to build a secure Lambda backend with API Gateway and Cognito authorization to trigger AI calls

Why you need a secure triggerโ€‹

Day 12: You build a protected frontend

Today: We build the secure backend that triggers calls

Here's the critical security issue:

Remember your ALB endpoint we built on Day 9 โ†—?

https://ai-caller.yourdomain.com

If we add a /make-call endpoint directly to Fargate:

POST https://ai-caller.yourdomain.com/make-call
โ†’ Publicly accessible
โ†’ Anyone can trigger calls
โ†’ Could rack up *huge* OpenAI/Twilio bills
โ†’ Even with frontend auth, the endpoint is exposed

This is not acceptable.

Day 12: Deploy your frontend (with authentication)

ยท 50 min read
Norah Klintberg Sakal
AI Consultant & Developer

Deploy your frontend (with authentication)

What you'll learn

How to build a secure frontend with Vite, React and Cognito authentication, then deploy it to S3 + CloudFront

Protect your app from unauthorized useโ€‹

Days 9-11: You built the infrastructure

Today: We build the protected frontend

Here's the critical security issue:

When you deploy your AI calling agent:

https://app.yourdomain.com
โ†’ Publicly accessible
โ†’ Anyone can use it
โ†’ Could rack up huge OpenAI/Twilio bills

This is not acceptable.

What you need: