Skip to main content

Text-to-Speech Serverless App — Phase 1: Frontend & Login System

·1 min read

by Frank Doka

Article

Text-to-Speech Serverless App — Phase 1: Frontend & Login System

Phase 1 establishes the user-facing layer: a React frontend with secure authentication, ready to submit text to the serverless backend built in later phases.

Text-to-speech serverless architecture: an Amplify React frontend with Cognito auth calls API Gateway and Lambda, which use Amazon Translate and Polly, storing audio in S3.
The serverless text-to-speech architecture this series builds toward.

What I Built

  1. Cognito authentication — Set up a Cognito User Pool for sign-up, sign-in, and JWT token issuance. Only authenticated users with valid tokens can access the API endpoints downstream.
  2. React frontend on Amplify — Used AWS Amplify to scaffold the React app and integrate the Cognito login UI. Amplify abstracts the token management and auth state, keeping the frontend code clean.
  3. Text submission form — Input field for text, dropdown for target language selection, and a submit button. This is the core interaction — everything else in the project flows from this form.

Why Cognito + Amplify

Amplify handles the entire auth flow (sign-up, confirmation, sign-in, token refresh) with a few configuration lines. The JWT tokens it manages are passed as Authorization headers to API Gateway in later phases, so the security model is consistent from frontend to backend.

What's Next

Phase 2 builds the serverless backend — API Gateway, Lambda, DynamoDB, and SNS — to receive and store submissions.

More articles

Text-to-Speech Serverless App — Phase 4: Frontend Integration & Retrieval

Completing the end-to-end flow — retrieval Lambda, React audio playback, and the full submit-to-listen pipeline.

Read more

Text-to-Speech Serverless App — Phase 3: AWS Polly, Translate & S3 Storage

Wiring in Amazon Translate for multilingual support and Polly for speech synthesis, with audio output stored in S3.

Read more