DEV Community

1

Real Time Language Translation of File Content Using Amazon Translate

“ I have checked the documents of AWS to do real time language translation of file content using amazon translate. Pricing of S3 bucket as per storage size and amazon translate as per character.”

Amazon Translate is a text translation service that uses advanced machine learning technologies to provide high-quality translation on demand. You can use Amazon Translate to translate unstructured text documents or to build applications that work in multiple languages.

In this post, you will get to know how to do real time language translation of file content using amazon translate. Here I have created a s3 bucket, iam role and real time translation with batch translation.

Prerequisites

You’ll need an Amazon Simple Storage Service for this post. Getting started with Amazon Simple Storage Service provides instructions on how to create a bucket in simple storage service.

Architecture Overview

Image description
The architecture diagram shows the overall deployment architecture with data flow, amazon translate, iam role and s3 bucket.

Solution overview

The blog post consist of the following phases:

  1. Language Translation of Text and Document Content with Real-Time Translation
  2. Create of IAM Role with Required Bucket Permission and Create of Job Using Batch Translation
  3. Output of Translated Text in File

I have s3 bucket as below →

Image description

Image description

Phase 1: Language Translation of Text and Document Content with Real-Time Translation

  1. Open the Amazon Translate console and launch real-time translation with text option. Choose source language and target language, enter the text content in source language and it generates the text content in target language as translated text. We can see the output in json on the application integration option. Similarly launch real-time translation with document option, upload of documents which require translation of content from source language to target language with choice of document type and can view the translated text in application integration in json.

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Phase 2: Create of IAM Role with Required Bucket Permission and Create of Job Using Batch Translation

  1. Open the IAM console and create a role with required bucket permission. Create a job with batch translation option; enter job name, select source language and target language. Select input s3 location with file format, select output s3 location, iam role and required custom settings. Once the job is created successfully, we can see the output file in s3 bucket output folder.

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Phase 3: Output of Translated Text in File

Image description

Image description

Image description

Image description

Clean-up

Delete S3 Bucket and IAM Role.

Pricing

I review the pricing and estimated cost of this example.

Cost of S3 Bucket = $0.0

Cost of Amazon Translate Text Translation Job = $0.000015 per Character for TextTranslationJob:TextTranslationJob in US East (N. Virginia) x 42 Character = $0.0

Cost of Amazon Translate Translate Document = $0.000015 per Character for TranslateDocument:TranslateDocument in US East (N. Virginia) x 42 Character = $0.0

Cost of Amazon Translate Translate Text = Processed translation request in US East (N. Virginia) - free-tier x 550 Character = $0.0

Total Cost = $0.0

Summary

In this post, I showed “real time language translation of file content using amazon translate”.

For more details on Amazon Translate, Checkout Get started Amazon Translate, open the Amazon Translate console. To learn more, read the Amazon Translate documentation.

Thanks for reading!

Connect with me: Linkedin
Image description

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

Best Practices for Running  Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK cover image

Best Practices for Running Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK

This post discusses the process of migrating a growing WordPress eShop business to AWS using AWS CDK for an easily scalable, high availability architecture. The detailed structure encompasses several pillars: Compute, Storage, Database, Cache, CDN, DNS, Security, and Backup.

Read full post

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay