Using Amazon Translate Api on Java

Sat, Jul 21, 2018 One-minute read

In this post i’ll show how to use amazon translate api on java with aws sdk to do real-time translations.

Amazon Translate

Translate service offers neural and accurate translation service. Using 2million “character” per month is free.

In this post we use this service with our java code.

First of all amazon dependency on our maven code.

        <!-- -->


Our code is translating english to italian


public class TranslateApp {

    public static void main(String[] args) {
        AmazonTranslate translate = AmazonTranslateClient.builder()

        TranslateTextRequest request = new TranslateTextRequest()
                .withText("Greetings from webischia :)")
        TranslateTextResult result  = translate.translateText(request);

Our response is :

Saluti da webischia:)

Process finished with exit code 0

You can find source code on github.