This project is a serverless multi-language translation chatbot built on AWS.
Hereβs a quick look at my AWS Translation Bot in action:
π Watch the full demo on YouTube
User β Amazon Lex V2 β AWS Lambda (Python) β Amazon Translate β Response back to Lex β User βοΈ CloudWatch Logs (Monitoring) The solution leverages a fully serverless design:
-
Amazon Lex V2 β Captures user input, interprets intents, and triggers fulfillment.
-
AWS Lambda (Python 3.12) β Acts as the fulfillment code hook. Handles slot data, invokes Amazon Translate, and returns translated text back to Lex.
-
Amazon Translate β Provides language translation service.
-
Amazon CloudWatch β Logs events, errors, and metrics for debugging and monitoring.
-
IAM Roles & Policies β Securely allow Lex to invoke Lambda and Lambda to call Amazon Translate.
- Natural Language Understanding with Lex intents and slots.
- Custom Lambda Fulfillment written in Python.
- Multi-language Translation using Amazon Translate API.
- Cloud-native, serverless and scalable design.
- Error Handling & Logging integrated with CloudWatch.
- AWS Services: Amazon Lex V2, AWS Lambda, Amazon Translate, IAM, CloudWatch
- Language: Python 3.12
- Infrastructure: Serverless (fully managed AWS services)
-
Create Lambda Function
- Runtime: Python 3.12
- Add permissions:
TranslateText
,CloudWatch Logs
, and allow Lex to invoke.
-
Deploy Lambda Code
Upload thelambda_function.py
(see code in repo). -
Configure Amazon Lex
- Create a bot with an intent (
TranslateText
). - Add slots:
Text
,LanguageCode
. - Enable fulfillment with the Lambda function.
- Create a bot with an intent (
-
Test & Debug
Use the Lex test console. Monitor errors via CloudWatch Logs.