Seamless multilingual translation in the cloud.
ScribeCloud is a production-ready, serverless language translation platform built on AWS. It allows you to translate text between multiple languages using Amazon Translate, with automation powered by Lambda, API Gateway (HTTP v2), and S3, all provisioned using Terraform. It includes a CLI client that handles user login via Cognito Hosted UI and translates via token-authenticated API calls.
- Translate text between supported languages via AWS Translate.
- Secure login flow using Cognito Hosted UI in the CLI.
- Authenticated API calls with JWT access tokens.
- Upload and manage translation requests via CLI.
- Translate and receive results directly from CLI.
- Infrastructure-as-Code with Terraform.
- Serverless, scalable, and low-maintenance.
User (CLI) --> Cognito Hosted UI Login
--> Access Token
--> API Gateway (JWT Auth)
|
v
AWS Lambda
/ \
AWS S3 Requests AWS S3 Responses
|
AWS Translate Service
modules/s3
– Secure request/response S3 buckets.modules/lambda
– Lambda function that performs translation.modules/iam
– IAM roles and permissions for Lambda.modules/apigateway
– HTTP API Gateway v2 with Cognito JWT authorizer.modules/cognito
– Cognito User Pool, Hosted UI domain, and client app.
-
Located under
cli/
__main__.py
– CLI entrypointauth.py
– Handles Cognito Hosted UI login and token storagetranslate.py
– Sends authenticated translation requests
-
Login flow opens browser to Hosted UI, captures token, and caches it securely
- AWS CLI configured (
aws configure
) - Terraform v1.3+
- Python 3.9+
- Valid Cognito User (via Hosted UI or Admin Invite)
- Web browser for CLI login
- No manual configuration of URL or tokens required
# Clone repository
git clone https://github.com/attaradev/scribecloud && cd scribecloud
# Initialize Terraform
terraform init
# Apply infrastructure
terraform apply -var-file="terraform.tfvars"
# Outputs will include:
# - API URL
# - Cognito Hosted UI domain
# - Congnito Client ID
python -m cli configure
- Opens your browser to the Cognito Hosted UI
- After login/signup, stores token locally (
~/.scribecloud/token.json
)
python -m cli translate --source en --target fr --text "Hello, world"
✅ Translated text:
Bonjour, le monde
- Cognito for user authentication (via Hosted UI)
- JWT token validation in API Gateway using Cognito User Pool authorizer
- S3 buckets encrypted with AWS KMS and private access only
- IAM roles scoped with least privilege for Lambda
-
CloudWatch Logs enabled for:
- Lambda function
- API Gateway access and errors
To destroy all resources:
terraform destroy
Pull requests are welcome! Feel free to open issues or submit enhancements.
By: Mike Attara