From 7f5b37f736c24117b4b371210cbd9be081bbfd96 Mon Sep 17 00:00:00 2001 From: Josh Bean <1139540+joshbean@users.noreply.github.com> Date: Mon, 3 Jul 2023 14:21:59 -0700 Subject: [PATCH] Delete documentation content --- doc_source/api_reference.md | 3 - doc_source/async-monitor.md | 74 --- doc_source/async-prereqs.md | 188 -------- doc_source/async-results.md | 57 --- doc_source/async-start.md | 167 ------- doc_source/async.md | 28 -- doc_source/compliance.md | 12 - doc_source/creating-custom-terminology.md | 69 --- doc_source/ct-best-practices.md | 7 - .../customizing-translations-formality.md | 45 -- ...izing-translations-parallel-data-adding.md | 88 ---- ...-translations-parallel-data-input-files.md | 176 ------- ...ing-translations-parallel-data-managing.md | 143 ------ .../customizing-translations-parallel-data.md | 57 --- .../customizing-translations-profanity.md | 42 -- doc_source/customizing-translations-tags.md | 52 -- doc_source/customizing-translations.md | 15 - doc_source/data-protection.md | 18 - doc_source/disaster-recovery-resiliency.md | 5 - doc_source/doc-history.md | 45 -- doc_source/encryption-at-rest.md | 29 -- doc_source/encryption-in-transit.md | 3 - doc_source/examples-ddb.md | 184 ------- doc_source/examples-java.md | 38 -- doc_source/examples-polly.md | 251 ---------- doc_source/examples-python.md | 104 ---- doc_source/examples-sigv4.md | 169 ------- doc_source/examples-split.md | 104 ---- doc_source/examples-twitch.md | 448 ------------------ doc_source/examples-web.md | 155 ------ doc_source/examples.md | 11 - doc_source/get-started-cli.md | 80 ---- doc_source/get-started-console.md | 19 - doc_source/get-started-sdk.md | 11 - doc_source/getting-started-android.md | 85 ---- doc_source/getting-started-ios.md | 81 ---- doc_source/getting-started.md | 10 - doc_source/glossary.md | 3 - doc_source/how-custom-terminology.md | 20 - doc_source/how-it-works.md | 29 -- doc_source/identity-and-access-management.md | 141 ------ doc_source/index.md | 81 ---- doc_source/infrastructure-security.md | 7 - doc_source/logging-using-cloudtrail.md | 68 --- doc_source/monitoring-translate.md | 60 --- doc_source/monitoring-with-eventbridge.md | 99 ---- doc_source/permissible-language-pairs.md | 26 - doc_source/processing.md | 5 - doc_source/protect-terminology.md | 8 - doc_source/security.md | 18 - .../security_iam_id-based-policy-examples.md | 138 ------ doc_source/security_iam_service-with-iam.md | 85 ---- doc_source/security_iam_troubleshoot.md | 66 --- doc_source/setting-up.md | 47 -- doc_source/setup-awscli.md | 32 -- doc_source/sync.md | 5 - doc_source/tagging-existingtags.md | 22 - doc_source/tagging-newtags.md | 30 -- doc_source/tagging.md | 23 - doc_source/translate-api-permissions-ref.md | 9 - doc_source/translate-cloudwatch.md | 25 - doc_source/using-ct.md | 41 -- doc_source/vpc-interface-endpoints.md | 70 --- doc_source/what-is-languages.md | 93 ---- doc_source/what-is-limits.md | 90 ---- doc_source/what-is.md | 53 --- 66 files changed, 4467 deletions(-) delete mode 100644 doc_source/api_reference.md delete mode 100644 doc_source/async-monitor.md delete mode 100644 doc_source/async-prereqs.md delete mode 100644 doc_source/async-results.md delete mode 100644 doc_source/async-start.md delete mode 100644 doc_source/async.md delete mode 100644 doc_source/compliance.md delete mode 100644 doc_source/creating-custom-terminology.md delete mode 100644 doc_source/ct-best-practices.md delete mode 100644 doc_source/customizing-translations-formality.md delete mode 100644 doc_source/customizing-translations-parallel-data-adding.md delete mode 100644 doc_source/customizing-translations-parallel-data-input-files.md delete mode 100644 doc_source/customizing-translations-parallel-data-managing.md delete mode 100644 doc_source/customizing-translations-parallel-data.md delete mode 100644 doc_source/customizing-translations-profanity.md delete mode 100644 doc_source/customizing-translations-tags.md delete mode 100644 doc_source/customizing-translations.md delete mode 100644 doc_source/data-protection.md delete mode 100644 doc_source/disaster-recovery-resiliency.md delete mode 100644 doc_source/doc-history.md delete mode 100644 doc_source/encryption-at-rest.md delete mode 100644 doc_source/encryption-in-transit.md delete mode 100644 doc_source/examples-ddb.md delete mode 100644 doc_source/examples-java.md delete mode 100644 doc_source/examples-polly.md delete mode 100644 doc_source/examples-python.md delete mode 100644 doc_source/examples-sigv4.md delete mode 100644 doc_source/examples-split.md delete mode 100644 doc_source/examples-twitch.md delete mode 100644 doc_source/examples-web.md delete mode 100644 doc_source/examples.md delete mode 100644 doc_source/get-started-cli.md delete mode 100644 doc_source/get-started-console.md delete mode 100644 doc_source/get-started-sdk.md delete mode 100644 doc_source/getting-started-android.md delete mode 100644 doc_source/getting-started-ios.md delete mode 100644 doc_source/getting-started.md delete mode 100644 doc_source/glossary.md delete mode 100644 doc_source/how-custom-terminology.md delete mode 100644 doc_source/how-it-works.md delete mode 100644 doc_source/identity-and-access-management.md delete mode 100644 doc_source/index.md delete mode 100644 doc_source/infrastructure-security.md delete mode 100644 doc_source/logging-using-cloudtrail.md delete mode 100644 doc_source/monitoring-translate.md delete mode 100644 doc_source/monitoring-with-eventbridge.md delete mode 100644 doc_source/permissible-language-pairs.md delete mode 100644 doc_source/processing.md delete mode 100644 doc_source/protect-terminology.md delete mode 100644 doc_source/security.md delete mode 100644 doc_source/security_iam_id-based-policy-examples.md delete mode 100644 doc_source/security_iam_service-with-iam.md delete mode 100644 doc_source/security_iam_troubleshoot.md delete mode 100644 doc_source/setting-up.md delete mode 100644 doc_source/setup-awscli.md delete mode 100644 doc_source/sync.md delete mode 100644 doc_source/tagging-existingtags.md delete mode 100644 doc_source/tagging-newtags.md delete mode 100644 doc_source/tagging.md delete mode 100644 doc_source/translate-api-permissions-ref.md delete mode 100644 doc_source/translate-cloudwatch.md delete mode 100644 doc_source/using-ct.md delete mode 100644 doc_source/vpc-interface-endpoints.md delete mode 100644 doc_source/what-is-languages.md delete mode 100644 doc_source/what-is-limits.md delete mode 100644 doc_source/what-is.md diff --git a/doc_source/api_reference.md b/doc_source/api_reference.md deleted file mode 100644 index b77c000..0000000 --- a/doc_source/api_reference.md +++ /dev/null @@ -1,3 +0,0 @@ -# API reference - -The Amazon Translate API Reference is now a separate document\. For more information, see [Amazon Translate API Reference](https://docs.aws.amazon.com/translate/latest/APIReference/Welcome.html)\. \ No newline at end of file diff --git a/doc_source/async-monitor.md b/doc_source/async-monitor.md deleted file mode 100644 index 74719cd..0000000 --- a/doc_source/async-monitor.md +++ /dev/null @@ -1,74 +0,0 @@ -# Monitoring and analyzing batch translation jobs - -You can use a job's ID to monitor its progress and get the Amazon S3 location of its output documents\. To monitor a specific job, use the [DescribeTextTranslationJob](https://docs.aws.amazon.com/translate/latest/APIReference/API_DescribeTextTranslationJob.html) operation\. You can also use the [ListTextTranslationJobs](https://docs.aws.amazon.com/translate/latest/APIReference/API_ListTextTranslationJobs.html) operation to retrieve information on all of the translation jobs in your account\. To restrict results to jobs that match a certain criteria, use the [ListTextTranslationJobs](https://docs.aws.amazon.com/translate/latest/APIReference/API_ListTextTranslationJobs.html) operation's `filter` parameter\. You can filter results by job name, job status, or the date and time that the job was submitted\. - -**Example describe\-text\-translation\-job command** -The following example check's a job's status by using the AWS CLI to run the [DescribeTextTranslationJob](https://docs.aws.amazon.com/translate/latest/APIReference/API_DescribeTextTranslationJob.html) command: - -``` -$ aws translate describe-text-translation-job --job-id 1c1838f470806ab9c3e0057f14717bed -``` -This command returns the following output: - -``` -{ - "TextTranslationJobProperties": { - "InputDataConfig": { - "ContentType": "text/plain", - "S3Uri": "s3://input-bucket-name/folder" - }, - "EndTime": 1576551359.483, - "SourceLanguageCode": "en", - "DataAccessRoleArn": "arn:aws:iam::012345678901:role/service-role/AmazonTranslateInputOutputAccess", - "JobId": "1c1838f470806ab9c3e0057f14717bed", - "TargetLanguageCodes": [ - "fr" - ], - "JobName": "batch-test", - "SubmittedTime": 1576544017.357, - "JobStatus": "COMPLETED", - "Message": "Your job has completed successfully.", - "JobDetails": { - "InputDocumentsCount": 77, - "DocumentsWithErrorsCount": 0, - "TranslatedDocumentsCount": 77 - }, - "OutputDataConfig": { - "S3Uri": "s3://bucket-name/output/012345678901-TranslateText-1c1838f470806ab9c3e0057f14717bed/" - } - } -} -``` - -You can stop a batch translation job while its status is `IN_PROGRESS` by using the [StopTextTranslationJob](https://docs.aws.amazon.com/translate/latest/APIReference/API_StopTextTranslationJob.html) operation\. - -**Example stop\-text\-translation\-job command** -The following example stops a batch translation with by using the AWS CLI to run the [StopTextTranslationJob](https://docs.aws.amazon.com/translate/latest/APIReference/API_StopTextTranslationJob.html) command: - -``` -$ aws translate stop-text-translation-job --job-id 5236d36ce5192abdb3e2519f3ab8b065 -``` -This command returns the following output: - -``` -{ - "TextTranslationJobProperties": { - "InputDataConfig": { - "ContentType": "text/plain", - "S3Uri": "s3://input-bucket-name/folder" - }, - "SourceLanguageCode": "en", - "DataAccessRoleArn": "arn:aws:iam::012345678901:role/service-role/AmazonTranslateInputOutputAccess", - "TargetLanguageCodes": [ - "fr" - ], - "JobName": "canceled-test", - "SubmittedTime": 1576558958.167, - "JobStatus": "STOP_REQUESTED", - "JobId": "5236d36ce5192abdb3e2519f3ab8b065", - "OutputDataConfig": { - "S3Uri": "s3://output-bucket-name/012345678901-TranslateText-5236d36ce5192abdb3e2519f3ab8b065/" - } - } -} -``` \ No newline at end of file diff --git a/doc_source/async-prereqs.md b/doc_source/async-prereqs.md deleted file mode 100644 index e69fcbe..0000000 --- a/doc_source/async-prereqs.md +++ /dev/null @@ -1,188 +0,0 @@ -# Prerequisites for batch translation jobs - -The following prerequisites must be met in order for Amazon Translate to perform a successful batch translation job: -+ The Amazon S3 buckets that contain your input and output documents must be in the same AWS Region as the API endpoint you are calling\. -+ The collection of batch input documents must be 5 GB or less in size\. -+ There can be a maximum of one million documents submitted in a batch translation job\. -+ Each input document must be 20 MB or less and must contain fewer than 1 million characters\. -+ Your input files must be in a folder in an Amazon S3 bucket\. If you add your input files to the top level of a bucket, Amazon Translate throws an error when you attempt to run a batch translation job\. This requirement applies to the input files\. No folder is necessary for the output files, and Amazon Translate can place them at the top level of an Amazon S3 bucket\. -+ Your input file folder can contain nested folders\. Make sure none of the nested folders are named details, otherwise Amazon Translate throws an error when you attempt to run the batch translation job\. - -## Supported file formats - -Amazon Translate supports the following types of files for batch translation jobs: -+ Plain text\. -+ HTML\. -+ Word documents \(\.docx\)\. -+ PowerPoint Presentation files \(\.pptx\)\. -+ Excel Workbook files \(\.xlsx\)\. -+ XML Localization Interchange File Format \(XLIFF\) files \(\.xlf\)\. Amazon Translate supports only XLIFF version 1\.2\. - -Amazon Translate requires files to be UTF\-8 encoded\. - -## Prerequisite permissions - -Before you can run a batch translation job, your AWS account must have a service role in IAM\. This role must have a permissions policy that grants Amazon Translate: -+ Read access to your input folder and all its sub\-folders in Amazon S3\. -+ Read and write access to your output bucket\. - -It must also include a trust policy that allows Amazon Translate to assume the role and gain its permissions\. This trust policy must allow the `translate.amazonaws.com` service principal to perform the `sts:AssumeRole` action\. - -When you create a batch translation job by using the Amazon Translate console, you have the option to allow Amazon Translate to automatically create this role for you\. When you run a batch translation job by using the AWS CLI or the Amazon Translate API, you provide the Amazon Resource Name \(ARN\) of the role in your request\. - -For more information, see [Creating a Role to Delegate Permissions to an AWS Service](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html) in the *IAM User Guide*\. - -**Example Permissions policy** -The following example permissions policy grants read access to an input folder in an Amazon S3 bucket\. It grants read and write access to an output bucket\. - -``` -{ - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": "s3:GetObject", - "Resource": [ - "arn:aws:s3:::input-bucket-name/*", - "arn:aws:s3:::output-bucket-name/*" - ] - }, - { - "Effect": "Allow", - "Action": "s3:ListBucket", - "Resource": [ - "arn:aws:s3:::input-bucket-name", - "arn:aws:s3:::output-bucket-name" - ] - }, - { - "Effect": "Allow", - "Action": [ - "s3:PutObject" - ], - "Resource": "arn:aws:s3:::output-bucket-name/*" - } - ] -} -``` - -**Example Trust policy** -The following trust policy allows Amazon Translate to assume the IAM role that the policy belongs to\. -We recommend that you verify the AWS account that is using the trust policy, to mitigate the [ Confused deputy](https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html) problem\. This example uses the aws:SourceArn and aws:SourceAccount condition keys to verify the source account\. Enter the AWS account that submits the batch translation job\. - -``` -{ - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Principal": { - "Service": "translate.amazonaws.com" - }, - "Action": "sts:AssumeRole", - "Condition": { - "ArnLike": { - "aws:SourceArn": "arn:aws:translate:*:111122223333:*" - }, - "StringEquals": { - "aws:SourceAccount": "111122223333" - } - } - } - ] -} -``` - -## Prerequisite permissions to customize encryption - -You can customize your encryption settings in Amazon Translate, but first you must add permissions to the service role in IAM\. - -Amazon Translate encrypts the translation output that you produce when you run a batch translation job\. By default, it does this encryption with an *AWS managed key*\. This type of key is created by AWS and stored in AWS Key Management Service \(AWS KMS\) in your account\. However, you cannot manage this KMS key yourself\. It is managed and used on your behalf only by AWS\. - -Optionally, you can choose to encrypt your output with a *customer managed key*, which is a KMS key that you create, own, and manage in your AWS account\. - -Your key must have a key policy that enables Amazon Translate to use it\. The key policy does this by granting its permissions to the service role that allows Amazon Translate to access your Amazon S3 bucket\. - -The key policy allows the service role to perform the AWS KMS operations that are required to encrypt your output, as shown by the following example policy statement\. - -**Example KMS key policy statement** - -``` -{ - "Effect": "Allow", - "Principal": - { - "AWS": - [ - "arn:aws:iam::111122223333:role/AmazonTranslateServiceRoleS3FullAccess" - ] - }, - "Action": - [ - "kms:Decrypt", - "kms:GenerateDataKey", - "kms:CreateGrant", - "kms:RetireGrant", - "kms:DescribeKey" - ], - "Resource": "*" -} -``` - -For more information, see [Key policies in AWS KMS](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) in the *AWS Key Management Service Developer Guide* - -### Permissions to use an AWS KMS key from another AWS account - -If you want to use a KMS key that's in a different AWS account from the one where you use Amazon Translate, then you must: - -1. Update the service role for Amazon Translate in IAM\. - -1. Update the key policy in AWS KMS\. - -To update your service role, attach a policy that allows it to perform the necessary AWS KMS operations with the KMS key that's in the other AWS account, as shown by the following example\. - -**Example IAM policy to grant access to a KMS key in a different account** - -``` -{ - "Effect": "Allow", - "Action": - [ - "kms:Decrypt", - "kms:GenerateDataKey", - "kms:CreateGrant", - "kms:RetireGrant", - "kms:DescribeKey" - ], - "Resource": "arn:aws:kms:us-west-2:111122223333:key/key-id" -} -``` - -To update your KMS key policy, add the service role and root user as principals that are allowed to use the key, as shown by the following example policy statement\. - -**Example KMS key policy statement to allow an IAM role to use the key** - -``` -{ - "Effect": "Allow", - "Principal": - { - "AWS": - [ - "arn:aws:iam::444455556666:role/AmazonTranslateServiceRoleS3FullAccess", - "arn:aws:iam::444455556666:root" - ] - }, - "Action": - [ - "kms:Decrypt", - "kms:CreateGrant", - "kms:GenerateDataKey", - "kms:RetireGrant", - "kms:DescribeKey" - ], - "Resource": "*" -} -``` - -For more information, see [Allowing users in other accounts to use a AWS KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying-external-accounts.html) in the *AWS Key Management Service Developer Guide* \ No newline at end of file diff --git a/doc_source/async-results.md b/doc_source/async-results.md deleted file mode 100644 index ebcc7db..0000000 --- a/doc_source/async-results.md +++ /dev/null @@ -1,57 +0,0 @@ -# Getting batch translation results - -Once the job's status is `COMPLETED` or `COMPLETED_WITH_ERROR`, your output documents are available in the Amazon S3 folder you specified\. The output document names match the input document names, with the addition of the target language code as a prefix\. For instance, if you translated a document called `mySourceText.txt` into French, the output document will be called `fr.mySourceText.txt`\. - -If the status of a batch translation job is `FAILED`, the [DescribeTextTranslationJob](https://docs.aws.amazon.com/translate/latest/APIReference/API_DescribeTextTranslationJob.html) operation response includes a `Message` field that describes the reason why the job didn't complete successfully\. - -Each batch translation job also generates an auxiliary file that contains information on the translations performed, such as the total number of characters translated and the number of errors encountered\. This file, called `target-language-code.auxiliary-translation-details.json`, is generated in the `details` subfolder of your output folder\. - -The following is an example of a batch translation auxiliary file\. - -``` -{ - "sourceLanguageCode": "en", - "targetLanguageCode": "fr", - "charactersTranslated": "105", - "documentCountWithCustomerError": "0", - "documentCountWithServerError": "0", - "inputDataPrefix": "s3://input-bucket-name/folder", - "outputDataPrefix": "s3://output-bucket-name/012345678901-TranslateText-1c1838f470806ab9c3e0057f14717bed/", - "details": [ - { - "sourceFile": "mySourceText.txt", - "targetFile": "fr.mySourceText.txt", - "auxiliaryData": { - "appliedTerminologies": [ - { - "name": "TestTerminology", - "terms": [ - { - "sourceText": "Amazon", - "targetText": "Amazon" - } - ] - } - ] - } - }, - { - "sourceFile": "batchText.txt", - "targetFile": "fr.batchText.txt", - "auxiliaryData": { - "appliedTerminologies": [ - { - "name": "TestTerminology", - "terms": [ - { - "sourceText": "Amazon", - "targetText": "Amazon" - } - ] - } - ] - } - } - ] -} -``` \ No newline at end of file diff --git a/doc_source/async-start.md b/doc_source/async-start.md deleted file mode 100644 index 7a3d88e..0000000 --- a/doc_source/async-start.md +++ /dev/null @@ -1,167 +0,0 @@ -# Running a batch translation job - -You can run a batch translation job by using the Amazon Translate console, the AWS CLI, or the Amazon Translate API\. - -**Note** -Batch translation jobs are long\-running operations and can take significant time to complete\. For example, batch translation on a small dataset might take a few minutes, while very large datasets may take up to 2 days or more\. Completion time is also dependent on the availability of resources\. - -## Amazon Translate console - -To run a translation job by using the Amazon Translate console, use the **Batch translation** page to create the job: - -1. Open the [Amazon Translate console](https://console.aws.amazon.com/translate/home)\. - -1. In the navigation menu on the left, choose **Batch translation**\. - -1. On the **Translation jobs** page, choose **Create job**\. The console shows the **Create translation job** page\. - -1. Under **Job settings**, do the following: - - 1. For **Name**, enter a custom name for the batch translation job\. - - 1. For **Source language**, select the language of the source files\. If you don't know the language of the source files, or your input documents contains different source languages, select `auto`\. Amazon Translate auto detects the source language for each file\. - - 1. For **Target languages**, select up to 10 languages\. Amazon Translate translates each source file into each target language\. - -1. Under **Input data**, do the following: - - 1. For **Input S3 location**, specify the input folder that contains the translation source files in Amazon S3\. To provide the folder by navigating to it in Amazon S3, choose **Select folder**\. - - 1. For **File format**, select format of the translation source files\. - -1. Under **Output data**, do the following: - - 1. For **Output S3 location**, specify the output folder in Amazon S3 where Amazon Translate puts the translation output\. To provide the folder by navigating to it in Amazon S3, choose **Select folder**\. - - 1. Optionally, choose **Customize encryption settings \(advanced\)** if you want to encrypt your output with a customer managed key that you manage in the AWS Key Management Service \(AWS KMS\)\. - - By default, Amazon Translate encrypts your translation output using a KMS key that is created, managed, and used on your behalf by AWS\. Choose this option if you want to encrypt your output with your own KMS key instead\. - - If you want to use a KMS key from the current AWS account, select it under **Choose an AWS Key Management Service key**\. Or, if you want to use a KMS key from a different AWS account, enter the Amazon Resource Name \(ARN\) for that key\. -**Note** -Before you can use your own KMS key, you must add permissions to the service role for Amazon Translate in IAM\. If you want to use a KMS key from a different account, you must also update the key policy in AWS KMS\. For more information, see [Prerequisite permissions to customize encryption](async-prereqs.md#async-prereqs-permissions-custom-encryption)\. - -1. Under **Customizations \- optional**, you can choose to customize the output of your translation job with the following settings: -**Profanity** -Masks profane words and phrases in your translation output\. If you specify multiple target languages for the job, all the target languages must support profanity masking\. If any of the target languages don't support profanity masking, the translation job won't mask profanity for any target language\. -For more information, see [Masking profane words and phrases in Amazon Translate](customizing-translations-profanity.md)\. -**Formality** -For some target languages, you can set **Formality** to formal or informal\. If you specify multiple target languages for the job, translate ignores the formality setting for any unsupported target language\. - For more information, see [Setting formality in Amazon Translate](customizing-translations-formality.md)\. -**Custom terminology** -Consists of example source terms and the desired translation for each term\. If you specify multiple target languages for the job, translate uses the designated terminology for each requested target language that has an entry for the source term in the terminology file\. -For more information, see [Customizing your translations with custom terminology](how-custom-terminology.md)\. -**Parallel data** -Consists of examples that show how you want segments of text to be translated\. If you specify multiple target languages for the job, the parallel data file must include translations for all the target languages\. -When you add parallel data to a batch translation job, you create an *Active Custom Translation* job\. -Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data\. For more information, see [Amazon Translate pricing](http://aws.amazon.com/translate/pricing/)\. -For more information, see [Customizing your translations with parallel data \(Active Custom Translation\)](customizing-translations-parallel-data.md)\. - -1. Under **Access permissions**, provide Amazon Translate with an IAM role that grants the required permissions to your input and output files in Amazon S3: - + If you already have this IAM role in your account, choose **Use an existing IAM role**, and select it under **IAM role**\. - + If you don't already have this IAM role in your account, choose **Create an IAM role**\. For **IAM role**, choose **Input and output S3 buckets**\. For **Role name**, provide a custom name\. When you create the translation job, Amazon Translate creates the role automatically\. The role name in IAM is prefixed with *AmazonTranslateServiceRole\-*\. -**Note** -If you chose to encrypt your translation output with your own KMS key, then you cannot choose **Create an IAM role**\. In this case, you must use a preexisting IAM role, and your KMS key must have a key policy that allows the role to use the key\. -For more information, see [Prerequisite permissions to customize encryption](async-prereqs.md#async-prereqs-permissions-custom-encryption) - -1. Choose **Create job**\. - - The console returns to the **Translation jobs** page, where the job creation status is shown in a banner at the top of the page\. After a few minutes, your job is shown in the table\. - -1. Choose the job name in the **Name** column to open the job details page\. - - While your translation job runs, the **Status** field shows **In progress**\. - -1. When the status becomes **Completed**, go to your translation output by choosing the link under **Output file location**\. The console goes to your output bucket in Amazon S3\. - -1. To download your output files, select the check box for each, and choose **Download**\. - -## AWS CLI - -To run a translation job by using the AWS CLI, use the [https://docs.aws.amazon.com/cli/latest/reference/translate/start-text-translation-job.html](https://docs.aws.amazon.com/cli/latest/reference/translate/start-text-translation-job.html) command, and specify the name of your parallel data resource for the `parallel-data-names` parameter\. - -**Example Start\-text\-translation\-job command** -The following example runs a translation job by submitting an Excel file that is stored in an input bucket in Amazon S3\. This job is customized by the parallel data that is included in the request\. - -``` -$ aws translate start-text-translation-job \ -> --input-data-config ContentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,S3Uri=s3://my-s3-bucket/input/ \ -> --output-data-config S3Uri=s3://my-s3-bucket/output/ \ -> --data-access-role-arn arn:aws:iam::111122223333:role/my-iam-role \ -> --source-language-code en \ -> --target-language-codes es it \ -> --job-name my-translation-job -``` -If the command succeeds, Amazon Translate responds with the job ID and status: - -``` -{ - "JobId": "4446f95f20c88a4b347449d3671fbe3d", - "JobStatus": "SUBMITTED" -} -``` -If you want to customize the output of your translation job, you can use the following parameters: -`--settings` -Settings to configure your translation output, including the following options: -Enable profanity to mask profane words and phrases\. To enable, set the profanity parameter to `Profanity=MASK`\. For more information, see [Masking profane words and phrases in Amazon Translate](customizing-translations-profanity.md)\. If any of the target languages don't support profanity masking, the translation job won't mask profanity for any target language\. -Set the level of formality in the translation output\. Set the `Formality` parameter to `FORMAL` or `INFORMAL`\. If you specify multiple target languages for the job, translate ignores the formality setting for any unsupported target language\. For more information, see [Setting formality in Amazon Translate](customizing-translations-formality.md)\. -`--terminology-names` -The name of a custom terminology resource to add to the translation job\. This resource lists example source terms and the desired translation for each term\. If you specify multiple target languages for the job, translate uses the designated terminology for each requested target language that has an entry for the source term in the terminology file\. -This parameter accepts only one custom terminology resource\. -For a list of available custom terminology resources, use the [https://docs.aws.amazon.com/cli/latest/reference/translate/list-terminologies.html](https://docs.aws.amazon.com/cli/latest/reference/translate/list-terminologies.html) command\. -For more information, see [Customizing your translations with custom terminology](how-custom-terminology.md)\. -`--parallel-data-names` -The name of a parallel data resource to add to the translation job\. This resource consists of examples that show how you want segments of text to be translated\. If you specify multiple target languages for the job, the parallel data file must include translations for all the target languages\. -When you add parallel data to a translation job, you create an *Active Custom Translation* job\. -This parameter accepts only one parallel data resource\. -Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data\. For more information, see [Amazon Translate pricing](http://aws.amazon.com/translate/pricing/)\. -For a list of available parallel data resources, use the [https://docs.aws.amazon.com/cli/latest/reference/translate/list-parallel-data.html](https://docs.aws.amazon.com/cli/latest/reference/translate/list-parallel-data.html) command\. -For more information, see [Customizing your translations with parallel data \(Active Custom Translation\)](customizing-translations-parallel-data.md)\. - -To check the status of your translation job, use the [https://docs.aws.amazon.com/cli/latest/reference/translate/describe-text-translation-job.html](https://docs.aws.amazon.com/cli/latest/reference/translate/describe-text-translation-job.html) command\. - -**Example Describe\-text\-translation\-job command** - -The following example checks the job status by providing the job ID\. This ID was provided by Amazon Translate when the job was initiated by the `start-text-translation-job` command\. - -``` -$ aws translate describe-text-translation-job \ -> --job-id 4446f95f20c88a4b347449d3671fbe3d -``` - -Amazon Translate responds with the job properties, which include its status: - -``` -{ - "TextTranslationJobProperties": { - "JobId": "4446f95f20c88a4b347449d3671fbe3d", - "JobName": "my-translation-job", - "JobStatus": "COMPLETED", - "JobDetails": { - "TranslatedDocumentsCount": 0, - "DocumentsWithErrorsCount": 0, - "InputDocumentsCount": 1 - }, - "SourceLanguageCode": "en", - "TargetLanguageCodes": [ - "es", - "it" - ], - "SubmittedTime": 1598661012.468, - "InputDataConfig": { - "S3Uri": "s3://my-s3-bucket/input/", - "ContentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" - }, - "OutputDataConfig": { - "S3Uri": "s3://my-s3-bucket/output/111122223333-TranslateText-4446f95f20c88a4b347449d3671fbe3d/" - }, - "DataAccessRoleArn": "arn:aws:iam::111122223333:role/my-iam-role" - } -} -``` - -If the `JobStatus` value is `IN_PROGRESS`, allow a few minutes to pass, and run [https://docs.aws.amazon.com/cli/latest/reference/translate/describe-text-translation-job.html](https://docs.aws.amazon.com/cli/latest/reference/translate/describe-text-translation-job.html) again until the status is `COMPLETED`\. When the job completes, you can download the translation results at the location provided by the `S3Uri` field under `OutputDataConfig`\. - -## Amazon Translate API - -To submit a batch translation job by using the Amazon Translate API, use the [StartTextTranslationJob](https://docs.aws.amazon.com/translate/latest/APIReference/API_StartTextTranslationJob.html) operation\. \ No newline at end of file diff --git a/doc_source/async.md b/doc_source/async.md deleted file mode 100644 index c7b8eaf..0000000 --- a/doc_source/async.md +++ /dev/null @@ -1,28 +0,0 @@ -# Asynchronous batch processing with Amazon Translate - -To translate large collections of documents \(up to 5 GB in size\), use the Amazon Translate asynchronous batch processing operation, [StartTextTranslationJob](https://docs.aws.amazon.com/translate/latest/APIReference/API_StartTextTranslationJob.html)\. This is best for collections of short documents, such as social media postings or user reviews, or any situation in which instantaneous translation is not required\. - -To perform an asynchronous batch translation, you typically perform the following steps: - -1. Store a set of documents in an input folder inside of an Amazon S3 bucket\. - -1. Start a batch translation job\. - -1. As part of your request, provide Amazon Translate with an IAM role that has read access to the input Amazon S3 folder and all its sub\-folders\. The role must also have read and write access to an output Amazon S3 bucket\. - -1. Monitor the progress of the batch translation job\. - -1. Retrieve the results of the batch translation job from the specified output bucket\. - -## Region availability - -Batch translation is supported in the following AWS Regions: -+ US East \(N\. Virginia\) -+ US East \(Ohio\) -+ US West \(Oregon\) -+ Asia Pacific \(Seoul\) -+ Europe \(Frankfurt\) -+ Europe \(Ireland\) -+ Europe \(London\) - -**Topics** \ No newline at end of file diff --git a/doc_source/compliance.md b/doc_source/compliance.md deleted file mode 100644 index b99172d..0000000 --- a/doc_source/compliance.md +++ /dev/null @@ -1,12 +0,0 @@ -# Compliance validation for Amazon Translate - -Third\-party auditors assess the security and compliance of Amazon Translate as part of multiple AWS compliance programs\. These include PCI, FedRAMP, HIPAA, and others\. You can download third\-party audit reports using AWS Artifact\. For more information, see [Downloading reports in AWS Artifact](https://docs.aws.amazon.com/artifact/latest/ug/downloading-documents.html)\. - -Your compliance responsibility when using Amazon Translate is determined by the sensitivity of your data, your company's compliance objectives, and applicable laws and regulations\. AWS provides the following resources to help with compliance: -+ [Security and Compliance Quick Start Guides](http://aws.amazon.com/quickstart/?awsf.quickstart-homepage-filter=categories%23security-identity-compliance) – These deployment guides discuss architectural considerations and provide steps for deploying security\- and compliance\-focused baseline environments on AWS\. -+ [Architecting for HIPAA Security and Compliance Whitepaper ](https://d0.awsstatic.com/whitepapers/compliance/AWS_HIPAA_Compliance_Whitepaper.pdf) – This whitepaper describes how companies can use AWS to create HIPAA\-compliant applications\. -+ [AWS Compliance Resources](http://aws.amazon.com/compliance/resources/) – This collection of workbooks and guides might apply to your industry and location\. -+ [AWS Config](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) – This AWS service assesses how well your resource configurations comply with internal practices, industry guidelines, and regulations\. -+ [AWS Security Hub](https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html) – This AWS service provides a comprehensive view of your security state within AWS that helps you check your compliance with security industry standards and best practices\. - -For a list of AWS services in scope of specific compliance programs, see [AWS Services in Scope by Compliance Program](http://aws.amazon.com/compliance/services-in-scope/)\. For general information, see [AWS Compliance Programs](http://aws.amazon.com/compliance/programs/)\. \ No newline at end of file diff --git a/doc_source/creating-custom-terminology.md b/doc_source/creating-custom-terminology.md deleted file mode 100644 index 9ec4e90..0000000 --- a/doc_source/creating-custom-terminology.md +++ /dev/null @@ -1,69 +0,0 @@ -# Creating a custom terminology - -You can use a CSV, TSV, or TMX file with the source text and the target \(translated\) term for the terminology file\. A single source text is used for each term, but there can be multiple target terms, one for each language, as long as the target and source language can be used\. - -**Important** -The source word within a custom terminology is *case\-sensitive* and will not work for words that are not an exact match\. - -## Directionality - -When you create custom terminology in Amazon Translate, you can choose the following types for *directionality*, which indicates whether your terminology has one or multiple source languages\. - -**Uni\-directional** -The file contains one source language\. All other languages are target languages\. For example, if your terminology file is a CSV file, then the first column contains text in the source language, and all other columns contain text in the target languages\. - -**Multi\-directional** -Any language in the file can be a source language or a target language\. For example, if your terminology file contains text in English, Chinese, and Spanish, then you could use the same file for jobs that translate the following language pairs: -+ English to Chinese -+ English to Spanish -+ Chinese to English -+ Chinese to Spanish -+ Spanish to English -+ Spanish to Chinese - -In contrast, if you used uni\-directional terminology for those translation jobs, then you would need to create three terminology files\. Each file would have the same content, but each would use English, Chinese, or Spanish as the source language respectively\. - -## Example terminology files - -See [Supported languages and language codes](what-is-languages.md) for the supported language codes\. - -**CSV \(comma separated values\)** - - -| | | | | -| --- |--- |--- |--- | -| en | fr | de | es | -| Amazon | Amazon | Amazon | Amazon | - -**TMX \(Translation Memory eXchange\) ** - -A TMX file is an XML\-type file commonly used by translation software\. Although the form is different than the CSV, the content is similar: - -``` - - -
- - - - Amazon - - - Amazon - - - Amazon - - - Amazon - - - - -``` - -These files are then attached to your Amazon Translate account\. When a translation job is run and you choose to use the custom terminology, Amazon Translate then uses the designated word whenever it encounters the source word\. \ No newline at end of file diff --git a/doc_source/ct-best-practices.md b/doc_source/ct-best-practices.md deleted file mode 100644 index 2c79520..0000000 --- a/doc_source/ct-best-practices.md +++ /dev/null @@ -1,7 +0,0 @@ -# Best practices - -The following are suggested best practices when using custom terminologies -+ Keep your custom terminology minimal\. Only include words which you want to control and which are completely unambiguous\. Only use words that you know you will never want to use an alternate meaning of, and you want it to only ever be translated in a single way\. Ideally, limit the list to proper names, like brand names and product names\. -+ Custom terminologies are case\-sensitive\. If you need both capitalized and non\-capitalized versions of a word to be included, you must include an entry for each version\. -+ Do not include different translations for the same source phrase \(for example, entry \#1\-EN: Amazon, FR: Amazon; entry \#2\-EN: Amazon FR: Amazone\)\. -+ Some languages do not change the shape of a word based on sentence context\. With these languages, applying a custom terminology is most likely to improve overall translation quality\. However, some languages do have extensive word shape changes\. We do not recommend applying the feature to those languages, but we do not restrict you from doing so\. For more information, see [Compatible languages](permissible-language-pairs.md)\. \ No newline at end of file diff --git a/doc_source/customizing-translations-formality.md b/doc_source/customizing-translations-formality.md deleted file mode 100644 index 88985b6..0000000 --- a/doc_source/customizing-translations-formality.md +++ /dev/null @@ -1,45 +0,0 @@ -# Setting formality in Amazon Translate - -You can optionally specify the desired level of *formality* for translations to supported target languages\. The formality setting controls the level of formal language usage \(also known as [honorifics](https://en.wikipedia.org/wiki/Honorifics_(linguistics)) or [register](https://en.wikipedia.org/wiki/Register_(sociolinguistics)#Register_as_formality_scale)\) in the translation output\. The formality setting is available for real\-time translation and asynchronous batch processing\. - -Formality supports the following values: -+ **Informal** – All sentences in the translated text use language constructs associated with informal communication\. For example, translated text uses the familiar form of second person pronouns and their verb agreement \(or Kudaketa form for Japanese\)\. -+ **Formal** – All sentences in the translated text use language constructs associated with formal, polite communication\. For example, translated text uses the formal form of second person pronouns and their verb agreement \(or Teineigo form for Japanese\)\. - -For example, the sentence ‘Are you sure?’ can have two correct translations in German: ‘Sind Sie sicher?’ for the formal register and ‘Bist du sicher?’ for the informal one\. - -If Amazon Translate doesn’t support formality level for the target language, or you don't specify the formality parameter, the translation job ignores the formality setting\. - -**Topics** -+ [Using the formality setting](#customizing-translations-formality-using) -+ [Supported languages](#customizing-translations-formality-languages) - -## Using the formality setting - -To set formality in a real\-time translation request, do one of the following: -+ On the **Real\-time translation** page in the Amazon Translate console, under **Additional settings**, enable the **Formality** setting and select one of the values\. -+ Use the Settings parameter in the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation in the Amazon Translate API\. -+ For the `translate-text` command in the AWS CLI, set the `--settings` parameter to `Formality=FORMAL` or `Formality=INFORMAL`\. For more information, see [translate\-text](https://docs.aws.amazon.com/cli/latest/reference/translate/translate-text.html) in the *AWS CLI Command Reference*\. - -To set formality in a batch translation request, set the **Formality** parameter when you start the translation job\. For details and examples, see [Running a batch translation job](async-start.md)\. - -For CLI or API requests, the `AppliedSettings` field in the response includes the formality setting \(if any\) from the request\. If the target language doesn't support formality, the `AppliedSettings` value in the response is NULL\. - -## Supported languages - -Amazon Translate supports the formality setting for translation from any source language to the following target languages\. - - -| Language | Language code | -| --- | --- | -| Dutch | nl | -| French | fr | -| German | de | -| Hindi | hi | -| Italian | it | -| Japanese | ja | -| Korean | ko | -| Spanish | es | -| Spanish \(Mexico\) | es\-MX | - -For all the languages that Amazon Translate supports, see [Supported languages and language codes](what-is-languages.md)\. \ No newline at end of file diff --git a/doc_source/customizing-translations-parallel-data-adding.md b/doc_source/customizing-translations-parallel-data-adding.md deleted file mode 100644 index aac6660..0000000 --- a/doc_source/customizing-translations-parallel-data-adding.md +++ /dev/null @@ -1,88 +0,0 @@ -# Adding your parallel data to Amazon Translate - -To add parallel data to Amazon Translate, you import a parallel data input file from Amazon S3\. Afterwards, you can use the parallel data to customize the output produced by a batch translation job\. - -**Prerequisites** -Before you can add parallel data to Amazon Translate, you must: -Have a parallel data input file\. To create one, see [Parallel data input files for Amazon Translate](customizing-translations-parallel-data-input-files.md)\. -Have an Amazon S3 bucket in your AWS account\. To create one, see [How do I create an S3 Bucket?](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/create-bucket.html) in the *Amazon Simple Storage Service User Guide*\. -Upload your input file to an Amazon S3 bucket\. For more information, see [How do I upload files and folders to an S3 bucket?](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/upload-objects.html) in the *Amazon Simple Storage Service User Guide*\. - -## Adding parallel data \(Amazon Translate console\) - -To add parallel data by using the Amazon Translate console, use the **Parallel data** page: - -1. Open the [Amazon Translate console](https://console.aws.amazon.com/translate/home)\. - -1. In the navigation menu on the left, choose **Customization**, and choose **Parallel data**\. - -1. On the **Parallel data** page, choose **Create parallel data**\. The console shows the **Create parallel data** page\. - -1. Provide the following: -**Name** -A custom name for the parallel data resource\. You must assign a name that is unique in the account and region\. -**Description \- *optional*** -A custom description\. -**Parallel data location on S3** -The location of the parallel data input file in Amazon S3\. To provide the location by navigating to the file in Amazon S3, choose **Select file**\. -**File format** -The format of the parallel data input file\. Supported formats are Translation Memory eXchange \(TMX\), comma\-separated values \(CSV\), and tab\-separated values \(TSV\)\. - -1. Under **Encryption key**, choose an AWS KMS key to secure your parallel data\. These KMS keys are managed by AWS Key Management Service \(AWS KMS\)\. For more information about AWS KMS, see the [AWS Key Management Service Developer Guide](https://docs.aws.amazon.com/kms/latest/developerguide/)\. -**Use AWS owned key** -Use a KMS key that is owned and managed by Amazon Translate\. This is the default option and is used to encrypt your information if you don't choose another method\. For more information, see [AWS owned keys](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk) in the *AWS Key Management Service Developer Guide*\. -**Use key from current account** -Use one of the KMS keys that you manage in AWS KMS in your AWS account\. If you choose this option, a menu provides a list of your KMS keys to choose from\. For more information, see [Customer managed keys](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk) in the *AWS Key Management Service Developer Guide*\. -**Use key from different account** -Use a KMS key that is managed in AWS KMS in a different AWS account\. If you choose this option, the console provides a field for you to enter the Amazon Resource Name \(ARN\) of the KMS key\. - - For more information about encryption keys, see the *[AWS Key Management Service Developer Guide](https://docs.aws.amazon.com/kms/latest/developerguide/)*\. - -1. Choose **Create parallel data**\. - - The console returns to the **Parallel data** page, where the import status is shown in a banner at the top of the page\. After a few minutes, your parallel data resource is shown in the table\. When the value in the **Status** column is **Active**, the parallel data is ready for you to use in a batch translation job\. - -### Error file for troubleshooting - -If Amazon Translate generates any errors or warnings while processing your input file, the console provides an error file that you can download to review the error messages\. The contents of this file resemble the following example: - -``` -{ - "summary": { - "record_error_count": 1, - "record_skipped_count": 0 - }, - "messages": [ - { - "content": "Number 1 TU element", - "message": "Invalid TMX format. One tu element should contain exactly one tuv element with the source language code: en" - } - ] -} -``` - -## Adding parallel data \(AWS CLI\) - -To add parallel data by using the AWS CLI, use the `create-parallel-data` command\. - -**Example create\-parallel\-data command** -The following example creates a parallel data object by importing a TSV file from Amazon S3: - -``` -$ aws translate create-parallel-data \ -> --name my-parallel-data \ -> --parallel-data-config S3Uri=s3://input-bucket/parallel-data-file.tsv,Format=TSV -``` -If the command succeeds, Amazon Translate responds with the status of the new parallel data object: - -``` -{ - "Name": "my-parallel-data", - "Status": "CREATING" -} -``` -You can monitor the ongoing status of the parallel data by using the `get-parallel-data` command\. When the status is `ACTIVE`, the parallel data is ready for you to use in a batch translation job\. For an example of the `get-parallel-data` command, see [To view the details for a parallel data object](customizing-translations-parallel-data-managing.md#customizing-translations-parallel-data-managing-cli-get)\. - -## Using your parallel data - -Now that you have created a parallel data resource, you can apply it to a batch translation job to customize the output\. To run a batch job, see [Running a batch translation job](async-start.md)\. \ No newline at end of file diff --git a/doc_source/customizing-translations-parallel-data-input-files.md b/doc_source/customizing-translations-parallel-data-input-files.md deleted file mode 100644 index ce2c66a..0000000 --- a/doc_source/customizing-translations-parallel-data-input-files.md +++ /dev/null @@ -1,176 +0,0 @@ -# Parallel data input files for Amazon Translate - -Before you can create a parallel data resource in Amazon Translate, you must create an input file that contains your translation examples\. Your parallel data input file must use languages that Amazon Translate supports\. For a list of these languages, see [Supported languages and language codes](what-is-languages.md)\. - -## Example parallel data - -The text in the following table provides examples of translation segments that can be formatted into a parallel data input file: - - -| en | es | zh | -| --- | --- | --- | -| Amazon Translate is a neural machine translation service\. | Amazon Translate es un servicio de traducción automática basado en redes neuronales\. | Amazon Translate 是一项神经机器翻译服务。 | -| Neural machine translation is a form of language translation automation that uses deep learning models\. | La traducción automática neuronal es una forma de automatizar la traducción de lenguajes utilizando modelos de aprendizaje profundo\. | 神经机器翻译使用深度学习模型,是一种语言翻译自动化的形式。 | -| Amazon Translate allows you to localize content for international users\. | Amazon Translate le permite localizar contenido para usuarios internacionales\. | Amazon Translate 允许您为国际用户本地化内容。 | - -The first row of the table provides the language codes\. The first language, English \(en\), is the source language\. Spanish \(es\) and Chinese \(zh\) are the target languages\. The first column provides examples of source text\. The other columns contain examples of translations\. When this parallel data customizes a batch job, Amazon Translate adapts the translation to reflect the examples\. - -## Input file formats - -Amazon Translate supports the following formats for parallel data input files: -+ Translation Memory eXchange \(TMX\) -+ Comma\-separated values \(CSV\) -+ Tab\-separated values \(TSV\) - ------- -#### [ TMX ] - - - -**Example TMX input file** -The following example TMX file defines parallel data in a format that Amazon Translate accepts\. In this file, English \(`en`\) is the source language\. Spanish \(`es`\) and Chinese \(`zh`\) are the target languages\. As an input file for parallel data, it provides several examples that Amazon Translate can use to tailor the output of a batch job\. - -``` - - -
- - - - Amazon Translate is a neural machine translation service. - - - Amazon Translate es un servicio de traducción automática basado en redes neuronales. - - - Amazon Translate 是一项神经机器翻译服务。 - - - - - Neural machine translation is a form of language translation automation that uses deep learning models. - - - La traducción automática neuronal es una forma de automatizar la traducción de lenguajes utilizando modelos de aprendizaje profundo. - - - 神经机器翻译使用深度学习模型,是一种语言翻译自动化的形式。 - - - - - Amazon Translate allows you to localize content for international users. - - - Amazon Translate le permite localizar contenido para usuarios internacionales. - - - Amazon Translate 允许您为国际用户本地化内容。 - - - - -``` - -**TMX requirements** - -Remember the following requirements from Amazon Translate when you define your parallel data in a TMX file: -+ Amazon Translate supports TMX 1\.4b\. For more information, see the [TMX 1\.4b specification](https://www.gala-global.org/tmx-14b#SectionReferences) on the Globalization and Localization Association website\. -+ The `header` element must include the `srclang` attribute\. The value of this attribute determines the source language of the parallel data\. -+ The `body` element must contain at least one translation unit \(`tu`\) element\. -+ Each `tu` element must contain at least two translation unit variant \(`tuv`\) elements\. One of these `tuv` elements must have an `xml:lang` attribute that has the same value as the one assigned to the `srclang` attribute in the `header` element\. -+ All `tuv` elements must have the `xml:lang` attribute\. -+ All `tuv` elements must have a segment \(`seg`\) element\. -+ While processing your input file, Amazon Translate skips certain `tu` or `tuv` elements if it encounters `seg` elements that are empty or contain only white space: - + If the `seg` element corresponds to the source language, Amazon Translate skips the `tu` element that the `seg` element occupies\. - + If the `seg` element corresponds to a target language, Amazon Translate skips only the `tuv` element that the `seg` element occupies\. -+ While processing your input file, Amazon Translate skips certain `tu` or `tuv` elements if it encounters `seg` elements that exceed 1000 bytes: - + If the `seg` element corresponds to the source language, Amazon Translate skips the `tu` element that the `seg` element occupies\. - + If the `seg` element corresponds to a target language, Amazon Translate skips only the `tuv` element that the `seg` element occupies\. -+ If the input file contains multiple `tu` elements with the same source text, Amazon Translate does one of the following: - + If the `tu` elements have the `changedate` attribute, it uses the element with the most recent date\. - + Otherwise, it uses the element that occurs closest to the end of the file\. - ------- -#### [ CSV ] - -The following example CSV file defines parallel data in a format that Amazon Translate accepts\. In this file, English \(`en`\) is the source language\. Spanish \(`es`\) and Chinese \(`zh`\) are the target languages\. As an input file for parallel data, it provides several examples that Amazon Translate can use to tailor the output of a batch job\. - -**Example CSV input file** - -``` -en,es,zh -Amazon Translate is a neural machine translation service.,Amazon Translate es un servicio de traducción automática basado en redes neuronales.,Amazon Translate 是一项神经机器翻译服务。 -Neural machine translation is a form of language translation automation that uses deep learning models.,La traducción automática neuronal es una forma de automatizar la traducción de lenguajes utilizando modelos de aprendizaje profundo.,神经机器翻译使用深度学习模型,是一种语言翻译自动化的形式。 -Amazon Translate allows you to localize content for international users.,Amazon Translate le permite localizar contenido para usuarios internacionales.,Amazon Translate 允许您为国际用户本地化内容。 -``` - -**CSV requirements** - -Remember the following requirements from Amazon Translate when you define your parallel data in a CSV file: -+ The first row consists of the language codes\. The first code is the source language, and each subsequent code is a target language\. -+ Each field in the first column contains source text\. Each field in a subsequent column contains a target translation\. -+ If the text in any field contains a comma, the text must be enclosed in double quote \("\) characters\. -+ A text field cannot span multiple lines\. -+ Fields cannot start with the following characters: \+, \-, =, @\. This requirement applies whether or not the field is enclosed in double quotes \("\)\. -+ If the text in a field contains a double quote \("\), it must be escaped with a double quote\. For example, text such as: - - ``` - 34" monitor - ``` - - Must be written as: - - ``` - 34"" monitor - ``` -+ While processing your input file, Amazon Translate will skip certain lines or fields if it encounters fields that are empty or contain only white space: - + If a source text field is empty, Amazon Translate skips the line that it occupies\. - + If a target translation field is empty, Amazon Translate skips only that field\. -+ While processing your input file, Amazon Translate skips certain lines or fields if it encounters fields that exceed 1000 bytes: - + If a source text field exceeds the byte limit, Amazon Translate skips the line that it occupies\. - + If a target translation field exceeds the byte limit, Amazon Translate skips only that field\. -+ If the input file contains multiple records with the same source text, Amazon Translate uses the record that occurs closest to the end of the file\. - ------- -#### [ TSV ] - -The following example TSV file defines parallel data in a format that Amazon Translate accepts\. In this file, English \(`en`\) is the source language\. Spanish \(`es`\) and Chinese \(`zh`\) are the target languages\. As an input file for parallel data, it provides several examples that Amazon Translate can use to tailor the output of a batch job\. - -**Example TSV input file** - -``` -en es zh -Amazon Translate is a neural machine translation service. Amazon Translate es un servicio de traducción automática basado en redes neuronales. Amazon Translate 是一项神经机器翻译服务。 -Neural machine translation is a form of language translation automation that uses deep learning models. La traducción automática neuronal es una forma de automatizar la traducción de lenguajes utilizando modelos de aprendizaje profundo. 神经机器翻译使用深度学习模型,是一种语言翻译自动化的形式。 -Amazon Translate allows you to localize content for international users. Amazon Translate le permite localizar contenido para usuarios internacionales. Amazon Translate 允许您为国际用户本地化内容。 -``` - -**TSV requirements** - -Remember the following requirements from Amazon Translate when you define your parallel data in a TSV file: -+ The first row consists of the language codes\. The first code is the source language, and each subsequent code is a target language\. -+ Each field in the first column contains source text\. Each field in a subsequent column contains a target translation\. -+ If the text in any field contains a tab character, the text must be enclosed in double quote \("\) characters\. -+ A text field cannot span multiple lines\. -+ Fields cannot start with the following characters: \+, \-, =, @\. This requirement applies whether or not the field is enclosed in double quotes \("\)\. -+ If the text in a field contains a double quote \("\), it must be escaped with a double quote\. For example, text such as: - - ``` - 34" monitor - ``` - - Must be written as: - - ``` - 34"" monitor - ``` -+ While processing your input file, Amazon Translate skips certain lines or fields if it encounters fields that are empty or contain only white space: - + If a source text field is empty, Amazon Translate skips the line that it occupies\. - + If a target translation field is empty, Amazon Translate skips only that field\. -+ While processing your input file, Amazon Translate skips certain lines or fields if it encounters fields that exceed 1000 bytes: - + If a source text field exceeds the byte limit, Amazon Translate skips the line that it occupies\. - + If a target translation field exceeds the byte limit, Amazon Translate skips only that field\. -+ If the input file contains multiple records with the same source text, Amazon Translate uses the record that occurs closest to the end of the file\. - ------- \ No newline at end of file diff --git a/doc_source/customizing-translations-parallel-data-managing.md b/doc_source/customizing-translations-parallel-data-managing.md deleted file mode 100644 index 3e16419..0000000 --- a/doc_source/customizing-translations-parallel-data-managing.md +++ /dev/null @@ -1,143 +0,0 @@ -# Viewing and managing your parallel data in Amazon Translate - -You can view all of the parallel data resources that you have added to Amazon Translate, and you can access detailed summaries for each one\. As your translation requirements change, you can refine your translation output by updating your parallel data\. - -## Viewing and managing parallel data \(Amazon Translate console\) - -To view and manage your parallel data in the Amazon Translate console, use the **Parallel data** page: - -**To view a list of your of parallel data resources** - -1. Open the [Amazon Translate console](https://console.aws.amazon.com/translate/home)\. - -1. In the navigation menu on the left, choose **Customization**, and choose **Parallel data**\. The table on this page lists the parallel data resources that you have added to Amazon Translate\. - -**To view the details for a parallel data resource** -+ On the **Parallel data** page, choose the name of the parallel data resource in the **Name** column\. The console opens the details page, which includes information such as the status, last updated date, source language, and target languages\. - -**To update a parallel data resource** - -1. Upload the updated version of your parallel data as a new input file in an Amazon S3 bucket\. - -1. In the Amazon Translate console, go to the **Parallel data** page\. - -1. Select the parallel data that you want to update, and choose **Update**\. The console shows the **Update parallel data** page\. - -1. Provide the following: -**Description \- optional** -An updated description\. -**Parallel data location on S3** -The location of the updated parallel data input file in Amazon S3\. To provide the location by navigating to the file in Amazon S3, choose **Select file**\. -**Select parallel data file format** -The format of the parallel data input file\. Supported formats are Translation Memory eXchange \(TMX\), comma\-separated values \(CSV\), and tab\-separated values \(TSV\)\. - -1. Choose **Save**\. Amazon Translate replaces the old parallel data with the new input file\. - -## Viewing and managing parallel data \(AWS CLI\) - -You can use the AWS CLI to view and update your parallel data resources\. - -### To view a list of your parallel data resources - -To view a list of the parallel data resources that you have added to Amazon Translate, use the `list-parallel-data` command\. - -**Example list\-parallel\-data command** -The following example returns a list of parallel data resources and their properties\. - -``` -$ aws translate list-parallel-data -``` -If the command succeeds, Amazon Translate returns an array like the following: - -``` -{ - "ParallelDataPropertiesList": [ - { - "Name": "my-parallel-data", - "Arn": "arn:aws:translate:us-west-2:111122223333:parallel-data/my-parallel-data", - "Status": "ACTIVE", - "SourceLanguageCode": "en", - "TargetLanguageCodes": [ - "es", - "ja", - "zh" - ], - "ParallelDataConfig": { - "S3Uri": "s3://input-bucket/parallel-data-file.tsv", - "Format": "TSV" - }, - "ImportedDataSize": 2283, - "ImportedRecordCount": 3, - "FailedRecordCount": 0, - "CreatedAt": 1598597751.406, - "LastUpdatedAt": 1598597911.675 - } - ] -} -``` - -### To view the details for a parallel data object - -To look up the details for a single parallel data resource, use the `get-parallel-data` command\. This command returns the properties of the parallel data as well as a pre\-signed S3 URL where you can download the input file that was used to create it\. - -**Example get\-parallel\-data command** -The following example gets the properties and download location for the `my-parallel-data` object: - -``` -$ aws translate get-parallel-data \ -> --name my-parallel-data -``` -If the command succeeds, Amazon Translate returns the properties and download location: - -``` -{ - "ParallelDataProperties": { - "Name": "my-parallel-data", - "Arn": "arn:aws:translate:us-west-2:111122223333:parallel-data/my-parallel-data", - "Status": "ACTIVE", - "SourceLanguageCode": "en", - "TargetLanguageCodes": [ - "es", - "ja", - "zh" - ], - "ParallelDataConfig": { - "S3Uri": "s3://input-bucket/parallel-data-file.tsv", - "Format": "TSV" - }, - "ImportedDataSize": 2283, - "ImportedRecordCount": 3, - "FailedRecordCount": 0, - "CreatedAt": 1598597751.406, - "LastUpdatedAt": 1598597911.675 - }, - "DataLocation": { - "RepositoryType": "S3", - "Location": "pre-signed S3 URL" - } -} -``` - -### To update a parallel data resource - -To update a parallel data resource, first, upload a new input file to an Amazon S3 input bucket\. Then, use the `update-parallel-data` command and specify the parallel data resource that you want to update\. Amazon Translate replaces the old parallel data with the information that's in the new input file\. - -**Example update\-parallel\-data command** -The following command updates `my-parallel-data` with a new input file from Amazon S3: - -``` -$ aws translate update-parallel-data \ -> --name my-parallel-data \ -> --parallel-data-config S3Uri=s3://input-bucket/parallel-data-file.tsv,Format=TSV -``` -If the command succeeds, Amazon Translate provides a response like the following: - -``` -{ - "Name": "my-parallel-data", - "Status": "ACTIVE", - "LatestUpdateAttemptStatus": "UPDATING", - "LatestUpdateAttemptAt": 1598601455.844 -} -``` -In this response, the `Status` field provides the status of the preexisting parallel data object, and the `LatestUpdateAttemptStatus` field provides the status of the current update attempt\. \ No newline at end of file diff --git a/doc_source/customizing-translations-parallel-data.md b/doc_source/customizing-translations-parallel-data.md deleted file mode 100644 index 64a7796..0000000 --- a/doc_source/customizing-translations-parallel-data.md +++ /dev/null @@ -1,57 +0,0 @@ -# Customizing your translations with parallel data \(Active Custom Translation\) - -Add *parallel data* to Amazon Translate to customize the output of your batch translations jobs\. Parallel data consists of examples that show how you want segments of text to be translated\. It includes a collection of textual examples in a source language, and for each example, it contains the desired translation output in one or more target languages\. - -When you add parallel data to a batch translation job, you create an *Active Custom Translation* job\. When you run these jobs, Amazon Translate uses your parallel data at runtime to produce customized machine translation output\. It adapts the translation to reflect the style, tone, and word choices that it finds in your parallel data\. With parallel data, you can tailor your translations for terms or phrases that are unique to a specific domain, such as life sciences, law or finance\. - -**Note** -Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data\. For more information, see [Amazon Translate pricing](http://aws.amazon.com/translate/pricing/)\. - -For example, the following parallel data is defined in a CSV file: - -``` -"en","fr" -"How are you?","Comment ça va ?" -``` - -In this example, English \(`en`\) is the source language, and French \(`fr`\) is the target language\. The example shows how the source phrase "How are you?" should be translated into French\. After this example input file is imported into Amazon Translate, it can be applied to translation jobs to influence their output\. During such jobs, Amazon Translate translates "How are you?" into the informal “Comment ça va ?” as opposed to the formal “Comment allez\-vous ?” For example, the job might receive the following source text: - -``` -Hello, how are you? -How are you? -Hi, how are you? -How are you doing? -``` - -From this text, the job produces the following translation: - -``` -Bonjour, comment ça va ? -Comment ça va ? -Salut, comment ça va ? -Comment ça va ? -``` - -In contrast, if the job runs without the parallel data, the output might include the more formal "comment allez\-vous": - -``` -Bonjour, comment allez-vous ? -Comment allez-vous ? -Salut, comment allez-vous ? -Comment allez-vous ? -``` - -By customizing your batch translation jobs with parallel data, you influence the output in a way that's similar to using a custom translation model that you train with your translation examples\. With Active Custom Translation, training a custom model is unnecessary, and you avoid the time and expense that such training requires\. As your translation requirements change over time, you can refine your output by updating your parallel data, which is easier than retraining a custom model\. - -## Region availability - -Active Custom Translation is available in the following regions: -+ US East \(N\. Virginia\) -+ US West \(Oregon\) -+ Europe \(Ireland\) - -**Topics** -+ [Region availability](#customizing-translations-parallel-data-regions) -+ [Parallel data input files for Amazon Translate](customizing-translations-parallel-data-input-files.md) -+ [Adding your parallel data to Amazon Translate](customizing-translations-parallel-data-adding.md) -+ [Viewing and managing your parallel data in Amazon Translate](customizing-translations-parallel-data-managing.md) \ No newline at end of file diff --git a/doc_source/customizing-translations-profanity.md b/doc_source/customizing-translations-profanity.md deleted file mode 100644 index 87f79f9..0000000 --- a/doc_source/customizing-translations-profanity.md +++ /dev/null @@ -1,42 +0,0 @@ -# Masking profane words and phrases in Amazon Translate - -When you run translations with Amazon Translate, you can enable the *profanity* setting to mask profane words and phrases in your translation output\. - -To mask profane words and phrases, Amazon Translate replaces them with the grawlix string “?$\#@$“\. This 5\-character sequence is used for each profane word or phrase, regardless of the length or number of words\. - -Amazon Translate does not mask profanity in translation requests where the source language and target language are the same\. - -In some cases, a profane word in the source input might naturally become inoffensive in the translated output\. In such cases, no masking is applied\. - -Amazon Translate detects each profane word or phrase literally, not contextually\. This means that it might mask a profane word even if it’s inoffensive in context\. For example, if Amazon Translate detected “jerk” as a profane word, then it would write the phrase “jerk chicken” as “?$\#@$ chicken”, even though “jerk chicken” is inoffensive\. \(Here, “jerk” is used as an example only\. Amazon Translate does not detect that word as profanity\.\) - -**Topics** -+ [Using the profanity setting](#customizing-translations-profanity-using) -+ [Unsupported languages](#customizing-translations-profanity-languages) - -## Using the profanity setting - -You can use the profanity setting with both types of translation operations in Amazon Translate: real\-time translation and asynchronous batch processing\. - -To mask profanity in a real\-time translation request, do any of the following: -+ On the **Real\-time translation** page in the Amazon Translate console, under **Additional settings**, enable the **Profanity** setting\. -+ For `translate-text` command in the AWS CLI, set the `--settings` parameter to `Profanity=MASK`\. For more information, see [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) in the *AWS CLI Command Reference*\. -+ Use the Settings parameter in the [TranslateText](http://amazonaws.com/translate/latest/dg/API_TranslateText.html) action in the Amazon Translate API\. - -To mask profanity in an asynchronous batch operation, see [Running a batch translation job](async-start.md)\. - -## Unsupported languages - -You can mask profanity when you translate to any of the target languages that Amazon Translate supports, with the following exceptions: - - -| Language | Language code | -| --- | --- | -| Bengali | bn | -| Hindi | hi | -| Malayalam | ml | -| Punjabi | pa | -| Sinhala | si | -| Vietnamese | vi | - -For all of the languages that Amazon Translate supports, see [Supported languages and language codes](what-is-languages.md)\. \ No newline at end of file diff --git a/doc_source/customizing-translations-tags.md b/doc_source/customizing-translations-tags.md deleted file mode 100644 index 4294fd3..0000000 --- a/doc_source/customizing-translations-tags.md +++ /dev/null @@ -1,52 +0,0 @@ -# Using do\-not\-translate tags in Amazon Translate - -You can add tags in your input content to specify text that you do not want to translate\. This feature is available for the console and for API operations\. - -**Topics** -+ [Using do\-not\-translate with the console](#console-tags) -+ [Using do\-not\-translate with the API](#api-tags) - -## Using do\-not\-translate with the console - -In the source text, use span tags to surround any text that you do not want to translate\. For example, to translate the following text from English to Italian: - -``` -Musée du Louvre, that's how you say Louvre Museum in French. -``` - -The text “Musée du Louvre” needs to remain in French, so we use a span tag around this content to skip translation: - -``` -Musée du Louvre, that's how you say Louvre Museum in French. -``` - -This sentence has the resulting Italian translation: - -``` -Musée du Louvre, così si dice Museo del Louvre in francese. -``` - -## Using do\-not\-translate with the API - -You can use do\-not\-translate with the real\-time `TranslateText` and the asynchronous `TextTranslation` API operations\. In the source text that you provide for the API request, you can use any type of HTML element to specify content that needs to skip translation\. - -In the following example, we translate some text from English to Spanish, but leave some text in English: - -``` -aws translate translate-text \ - --source-language-code "en" \ - --target-language-code "es" \ - --region us-west-2 \ - --text "This can be translated to any language.

But do not translate this!

" -``` - -This API request returns the following Spanish translation: - -``` -{ - "TranslatedText": "Esto se puede traducir a cualquier idioma. -

But do not translate this!

", - "SourceLanguageCode": "en", - "TargetLanguageCode": "es" -} -``` \ No newline at end of file diff --git a/doc_source/customizing-translations.md b/doc_source/customizing-translations.md deleted file mode 100644 index 32f1278..0000000 --- a/doc_source/customizing-translations.md +++ /dev/null @@ -1,15 +0,0 @@ -# Customizing your translations with Amazon Translate - -You can use the following settings to customize the translations that you produce with Amazon Translate: -+ **Do\-not\-translate tags** – Use start and end tags to specify content that you do not want to translate\. -+ **Custom terminology** – Defines how you want Amazon Translate to translate specific terms, such as brand names\. -+ **Profanity** – Enable this option to mask profane words and phrases in your translation output\. -+ **Formality** – Enable this option to set the level of language formality in your translation output\. -+ **Parallel data** – Consists of segments of example source text and their translations\. When you customize a job with parallel data, Amazon Translate adapts the translation output to reflect the style, tone, and word choices that it finds in the example translations\. - -**Topics** -+ [Using do\-not\-translate tags in Amazon Translate](customizing-translations-tags.md) -+ [Customizing your translations with custom terminology](how-custom-terminology.md) -+ [Masking profane words and phrases in Amazon Translate](customizing-translations-profanity.md) -+ [Setting formality in Amazon Translate](customizing-translations-formality.md) -+ [Customizing your translations with parallel data \(Active Custom Translation\)](customizing-translations-parallel-data.md) \ No newline at end of file diff --git a/doc_source/data-protection.md b/doc_source/data-protection.md deleted file mode 100644 index 497dca5..0000000 --- a/doc_source/data-protection.md +++ /dev/null @@ -1,18 +0,0 @@ -# Data protection in Amazon Translate - -Amazon Translate conforms to the AWS [shared responsibility model](https://aws.amazon.com/compliance/shared-responsibility-model/), which includes regulations and guidelines for data protection\. AWS is responsible for protecting the global infrastructure that runs all of the AWS services\. AWS maintains control over data hosted on this infrastructure, including the security configuration controls for handling customer content and personal data\. AWS customers and APN partners, acting either as data controllers or data processors, are responsible for any personal data that they put in the AWS Cloud\. - -For data protection purposes, we recommend that you protect AWS account credentials and set up individual user accounts with AWS Identity and Access Management \(IAM\), so that each user is given only the permissions necessary to fulfill their job duties\. We also recommend that you secure your data in the following ways: -+ Use multi\-factor authentication \(MFA\) with each account\. -+ Use SSL/TLS to communicate with AWS resources\. -+ Set up API and user activity logging with AWS CloudTrail\. -+ Use AWS encryption solutions, along with all default security controls within AWS services\. -+ Use advanced managed security services such as Amazon Macie, which assists in discovering and securing personal data that is stored in Amazon Simple Storage Service \(Amazon S3\)\. - -We strongly recommend that you never put sensitive identifying information, such as your customers' account numbers, into free\-form fields such as a **Name** field\. This includes when you work with Amazon Translate or other AWS services using the console, API, AWS CLI, or AWS SDKs\. Any data that you enter into Amazon Translate or other services might get picked up for inclusion in diagnostic logs\. When you provide a URL to an external server, don't include credentials information in the URL to validate your request to that server\. - -For more information about data protection, see the [AWS Shared Responsibility Model and GDPR](https://aws.amazon.com/blogs/security/the-aws-shared-responsibility-model-and-gdpr/) blog post on the *AWS Security Blog*\. - -**Topics** -+ [Encryption at rest](encryption-at-rest.md) -+ [Encryption in transit](encryption-in-transit.md) \ No newline at end of file diff --git a/doc_source/disaster-recovery-resiliency.md b/doc_source/disaster-recovery-resiliency.md deleted file mode 100644 index 3eb6d32..0000000 --- a/doc_source/disaster-recovery-resiliency.md +++ /dev/null @@ -1,5 +0,0 @@ -# Resilience in Amazon Translate - -The AWS global infrastructure is built around AWS Regions and Availability Zones\. AWS Regions provide multiple physically separated and isolated Availability Zones, which are connected with low\-latency, high\-throughput, and highly redundant networking\. With Availability Zones, you can design and operate applications and databases that automatically fail over between Availability Zones without interruption\. Availability Zones are more highly available, fault tolerant, and scalable than traditional single or multiple data center infrastructures\. - -For more information about AWS Regions and Availability Zones, see [AWS Global Infrastructure](http://aws.amazon.com/about-aws/global-infrastructure/)\. \ No newline at end of file diff --git a/doc_source/doc-history.md b/doc_source/doc-history.md deleted file mode 100644 index f63c3bc..0000000 --- a/doc_source/doc-history.md +++ /dev/null @@ -1,45 +0,0 @@ -# Document history for Amazon Translate - -The following table describes the documentation for this release of Amazon Translate\. - -| Change | Description | Date | -| --- |--- |--- | -| [Support for nested input folders for batch mode](https://docs.aws.amazon.com/translate/latest/dg/async-start.html) | You can now provide nested input folders to batch translation jobs\. For more information, see [Running a batch translation job](https://docs.aws.amazon.com/translate/latest/dg/async-start.html) in Amazon Translate\. | November 18, 2022 | -| [Support for auto\-language detection for batch mode](https://docs.aws.amazon.com/translate/latest/dg/async-start.html) | You can now auto\-detect the source language in batch translation jobs\. As a result, you can now input documents with different source languages in batch translation jobs\. For more information, see [Running a batch translation job](https://docs.aws.amazon.com/translate/latest/dg/async-start.html) in Amazon Translate\. | November 18, 2022 | -| [Support for multiple target languages](https://docs.aws.amazon.com/translate/latest/dg/async-start.html) | You can now specify multiple target languages in batch translation jobs\. For more information, see [Running a batch translation job](https://docs.aws.amazon.com/translate/latest/dg/async-start.html) in Amazon Translate\. | October 10, 2022 | -| [Support for tags](https://docs.aws.amazon.com/translate/latest/dg/tagging.html) | You can now tag **ParallelData** and **Custom Terminology** resources in Amazon Translate\. For more information, see [Tagging your resources in Amazon Translate](https://docs.aws.amazon.com/translate/latest/dg/tagging.html)\. | October 6, 2022 | -| [Formality support for additional languages](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-formality.html) | You can now set the translation formality level for Dutch, Korean, and Mexican Spanish in Amazon Translate\. For more information, see [Setting formality in Amazon Translate](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-formality.html)\. | October 5, 2022 | -| [Separate API Reference](https://docs.aws.amazon.com/translate/latest/APIReference/Welcome.html) | The Amazon Translate API Reference is now a separate document from the Developer Guide\. For more information, see [Amazon Translate API Reference](https://docs.aws.amazon.com/translate/latest/APIReference/Welcome.html)\. | August 25, 2022 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-formality.html) | You can now set the formality level for your translation output\. For more information, see [Setting formality in Amazon Translate](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-formality.html)\. | February 22, 2022 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-profanity.html) | You can now mask profane words and phrases in your translation output\. For more information, see [Masking profane words and phrases in Amazon Translate](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-profanity.html)\. | November 24, 2021 | -| [AWS PrivateLink support](https://docs.aws.amazon.com/translate/latest/dg/vpc-interface-endpoints.html) | You can now establish a private connection between your VPC and Amazon Translate by using AWS PrivateLink\. For more information, see [Amazon Translate and interface VPC endpoints \(AWS PrivateLink\)](https://docs.aws.amazon.com/translate/latest/dg/vpc-interface-endpoints.html)\. | November 24, 2021 | -| [Parallel data update](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-parallel-data.html) | You can now create parallel data resources that use any of the languages that are supported by Amazon Translate\. You no longer need to use English as one of the languages\. For more information about parallel data, see [Customizing your translations with parallel data \(Active Custom Translation\)](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-parallel-data.html)\. | November 15, 2021 | -| [Custom terminology directionality](https://docs.aws.amazon.com/translate/latest/dg/creating-custom-terminology.html) | You can now create multi\-directional terminology, in which any language can be the source language or a target language\. For more information, see [Creating a custom terminology](https://docs.aws.amazon.com/translate/latest/dg/creating-custom-terminology.html)\. | November 11, 2021 | -| [New languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate now supports the following languages: Irish, Marathi, Portuguese \(Portugal\), and Punjabi\. For all of the languages that Amazon Translate supports, see [Supported languages and language codes](https://docs.aws.amazon.com/translate/latest/dg/what-is.html)\. | November 10, 2021 | -| [New custom encryption settings](https://docs.aws.amazon.com/translate/latest/dg/async-start.html) | You can now encrypt your translation output by using your own customer managed key that you manage in AWS Key Management Service\. For more information, see [Running a batch translation job](https://docs.aws.amazon.com/translate/latest/dg/async-start.html) | November 5, 2021 | -| [New file format support](https://docs.aws.amazon.com/translate/latest/dg/async-prereqs.html#async-prereqs-formats) | Amazon Translate now supports XML Localization Interchange File Format \(XLIFF\) files for asynchronous batch processing\. For all supported formats, see [Supported file formats](https://docs.aws.amazon.com/translate/latest/dg/async-prereqs.html#async-prereqs-formats)\. | June 9, 2021 | -| [EventBridge integration](https://docs.aws.amazon.com/translate/latest/dg/monitoring-with-eventbridge.html) | Amazon Translate now sends events to Amazon EventBridge to notify you about changes that affect your translation jobs and parallel data resources\. For more information, see [Monitoring Amazon Translate events with Amazon EventBridge](https://docs.aws.amazon.com/translate/latest/dg/monitoring-with-eventbridge.html)\. | June 4, 2021 | -| [New quota](https://docs.aws.amazon.com/translate/latest/dg/what-is-limits.html) | Amazon Translate now supports up to 1000 queued batch translation jobs\. For all Amazon Translate quotas, see [Guidelines and limits](https://docs.aws.amazon.com/translate/latest/dg/what-is-limits.html)\. | April 23, 2021 | -| [Quota increase](https://docs.aws.amazon.com/translate/latest/dg/what-is-limits.html) | The maximum size for a parallel data input file has increased from 1 MB to 5 MB\. For all Amazon Translate quotas, see [Guidelines and limits](https://docs.aws.amazon.com/translate/latest/dg/what-is-limits.html)\. | March 31, 2021 | -| [New languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate now supports the following languages: Armenian, Catalan, Farsi \(Persian\), Filipino Tagalog, Gujarati, Haitian Creole, Icelandic, Kannada, Kazakh, Lithuanian, Macedonian, Malayalam, Maltese, Mongolian, Sinhala, Telugu, Uzbek, and Welsh\. For all of the languages that Amazon Translate supports, see [Supported languages and language codes](https://docs.aws.amazon.com/translate/latest/dg/what-is.html)\. | November 23, 2020 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-parallel-data.html) | You can now customize batch translation jobs by using *parallel data*, which consists of examples of source text and their translations\. Jobs that use parallel data are called *Active Custom Translation* jobs\. During these jobs, Amazon Translate adapts the translation output to reflect the examples in the parallel data\. For more information, see [Customizing your translations with parallel data \(Active Custom Translation\)](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-parallel-data.html)\. | November 23, 2020 | -| [New file format support](https://docs.aws.amazon.com/translate/latest/dg/async.html#async-start) | Amazon Translate now supports the following Office Open XML file formats as input for asynchronous batch processing: Word document \(\.docx\), PowerPoint presentation \(\.pptx\), Excel workbook \(\.xlsx\)\. For more information, see [Starting a batch translation job](https://docs.aws.amazon.com/translate/latest/dg/async.html#async-start)\. | July 29, 2020 | -| [New language](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate now supports the Spanish \(Mexico\) language for translation\. For all supported languages, see [Supported languages and language codes](https://docs.aws.amazon.com/translate/latest/dg/what-is.html)\. | April 30, 2020 | -| [New region](https://docs.aws.amazon.com/translate/latest/dg/async.html#async-regions) | Amazon Translate supports asynchronous batch processing in the Europe \(London\) Region\. For all of the AWS regions where asynchronous batch processing is available, see [Region availability](https://docs.aws.amazon.com/translate/latest/dg/async.html#async-regions)\. | April 20, 2020 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/async.html) | Amazon Translate adds asynchronous batch translation functionality\. For more information, see [Asynchronous batch processing](https://docs.aws.amazon.com/translate/latest/dg/async.html)\. | December 23, 2019 | -| [New regions](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds support for the Asia Pacific \(Hong Kong\), Asia Pacific \(Sydney\), EU \(London\), EU \(Paris\), EU \(Stockholm\), and US West \(N\. California\) Regions\. For a complete list of the AWS Regions supported by Amazon Translate, see the [AWS Region Table](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) or [AWS Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#translate_region) in the *Amazon Web Services General Reference*\. | November 25, 2019 | -| [New languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds new language for translation: Afrikaans, Albanian, Amharic, Azerbaijani, Bengali, Bosnian, Bulgarian, Canadian\-French, Croatian, Dari, Estonian, Georgian, Hausa, Latvian, Pashto, Serbian, Slovak, Slovenian, Somali, Swahili, Tagalog, and Tamil\. For a list of the language combinations that Amazon Translate can translate directly, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html)\. | November 25, 2019 | -| [New languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds new languages for translation: Greek, Hungarian, Romanian, Thai, Ukrainian, Urdu, and Vietnamese\. For a list of the language combinations that Amazon Translate can translate directly, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html)\. | October 3, 2019 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds [FedRAMP compliance](https://www.fedramp.gov/)\. For more information, see [Compliance](https://docs.aws.amazon.com/translate/latest/dg/what-is-limits.html#what-is-compliance)\. | July 31, 2019 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds [SOC compliance](https://docs.aws.amazon.com/translate/latest/dg/what-is-limits.html#what-is-compliance)\. For more information, see [Compliance](https://docs.aws.amazon.com/translate/latest/dg/what-is-compliance.html)\. | May 30, 2019 | -| [New regions](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds support for the Asia Pacific \(Mumbai\), Asia Pacific \(Singapore\), Asia Pacific \(Tokyo\), and Canada \(Central\) Regions\. For a complete list of the AWS Regions supported by Amazon Translate, see the [AWS Region Table](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) or [AWS Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#translate_region) in the *Amazon Web Services General Reference*\. | May 8, 2019 | -| [New languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds new languages for translation: Hindi, Malay, Norwegian, and Persian\. For a list of the language combinations that Amazon Translate can translate directly, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html)\. | May 6, 2019 | -| [New region](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds support for the EU \(Frankfurt\) and Asia Pacific \(Seoul\) Regions\. For a complete list of the AWS Regions supported by Amazon Translate, see the [AWS Region Table](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) or [AWS Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#translate_region) in the *Amazon Web Services General Reference*\. | February 28, 2019 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds [PCI compliance](https://www.pcisecuritystandards.org/)\. For more information, see [Compliance](https://docs.aws.amazon.com/translate/latest/dg/what-is-limits.html#what-is-compliance)\. | December 12, 2018 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html) | Amazon Translate adds four new APIs and the custom terminology feature to give you more control over your translation\. By using a custom terminology with your translation requests, you can make sure that your brand names, character names, model names, and other unique content is translated exactly the way you want it, every time, regardless of the standard translation or context\. For more information, see [Custom terminology](https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html)\. | November 27, 2018 | -| [New languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate now translates documents in the following languages: Danish, Dutch, Finnish, Hebrew, Indonesian, Korean, Polish, and Swedish\. Amazon Translate continues to improve direct translation by significantly reducing the number of unsupported language pairs\. For the language combinations that Amazon Translate can translate directly, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html)\. | November 20, 2018 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds direct translation between supported languages other than English\. For the language combinations that Amazon Translate can translate directly, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html)\. | October 29, 2018 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds [HIPAA](https://www.hhs.gov/hipaa/for-professionals/privacy/index.html) compliance\. For more information, see [Compliance](https://docs.aws.amazon.com/translate/latest/dg/what-is-limits.html#what-is-compliance)\. | October 25, 2018 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) | Amazon Translate adds multiple new languages for translation: Chinese \(Tradition\), Czech, Italian, Japanese, Russian, and Turkish\. For a list of languages that Amazon Translate supports, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html)\. | July 17, 2018 | -| [New feature](https://docs.aws.amazon.com/translate/latest/dg/how-it-works.html) | Amazon Translate adds support for automatic source language detection\. For more information, see [ How Amazon Translate works](https://docs.aws.amazon.com/translate/latest/dg/how-it-works.html)\. | April 4, 2018 | -| [New guide](#doc-history) | This is the first release of the *Amazon Translate Developer Guide*\. | November 29, 2017 | \ No newline at end of file diff --git a/doc_source/encryption-at-rest.md b/doc_source/encryption-at-rest.md deleted file mode 100644 index 071e279..0000000 --- a/doc_source/encryption-at-rest.md +++ /dev/null @@ -1,29 +0,0 @@ -# Encryption at rest - -For the batch translation jobs that you run with Amazon Translate, your translation input and output are both encrypted at rest\. However, the encryption method is different for each\. - -Amazon Translate also uses an Amazon Elastic Block Store \(Amazon EBS\) volume encrypted with the default key\. - -## Translation input - -When you use Amazon Translate to translate documents in batch, you store a set of input documents in an Amazon S3 bucket\. To encrypt these documents at rest, you can use the SSE\-S3 server\-side encryption option that is provided by Amazon S3\. With this option, each object is encrypted with a unique key that is managed by Amazon S3\. - -For more information, see [Protecting data using server\-side encryption with Amazon S3\-managed encryption keys \(SSE\-S3\)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html) in the *Amazon Simple Storage Service User Guide*\. - -## Translation output - -When Amazon Translate completes a batch translation job, it puts the output in an Amazon S3 bucket in your AWS account\. To encrypt the output at rest, Amazon Translate uses the SSE\-KMS encryption option that is provided by Amazon S3\. With this option, your output is encrypted with a key that is stored in AWS Key Management Service \(AWS KMS\)\. - -For more information about SSE\-KMS, see [Protecting Data using server\-side encryption with AWS Key Management Service \(SSE\-KMS\)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) in the *Amazon Simple Storage Service User Guide*\. - -For more information about KMS keys, see [AWS KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys) in the *AWS Key Management Service Developer Guide*\. - -For this encryption, Amazon Translate can use either of the following types of keys: - -**AWS managed key** -By default, Amazon Translate uses an *AWS managed key*\. This type of KMS key is created by AWS and stored in your account\. However, you cannot manage this KMS key yourself\. It is managed and used on your behalf only by AWS\. - -**Customer managed key** -Optionally, you can choose to encrypt your output with a *customer managed key*, which is a KMS key that you create, own, and manage in your AWS account\. -Before you can use your own KMS key, you must add permissions to the IAM service role that Amazon Translate uses to access your output bucket in Amazon S3\. If you want to use a KMS key that's in a different AWS account, you must also update the key policy in AWS KMS\. For more information, see [Prerequisite permissions to customize encryption](async-prereqs.md#async-prereqs-permissions-custom-encryption)\. -You can choose to use your customer managed key when you run a batch translation job\. For more information, see [Running a batch translation job](async-start.md)\. \ No newline at end of file diff --git a/doc_source/encryption-in-transit.md b/doc_source/encryption-in-transit.md deleted file mode 100644 index f48698c..0000000 --- a/doc_source/encryption-in-transit.md +++ /dev/null @@ -1,3 +0,0 @@ -# Encryption in transit - -To encrypt data in transit, Amazon Translate uses TLS 1\.2 with AWS certificates\. \ No newline at end of file diff --git a/doc_source/examples-ddb.md b/doc_source/examples-ddb.md deleted file mode 100644 index b390364..0000000 --- a/doc_source/examples-ddb.md +++ /dev/null @@ -1,184 +0,0 @@ -# Using Amazon Translate with Amazon DynamoDB - -This example shows you how to translate a product review and store it in Amazon DynamoDB\. If you request the same review later, DynamoDB returns it without Amazon Translate needing to translate it again\. - -In this example, you: -+ Use AWS CloudFormation to create DynamoDB tables to store the translation and a Lambda function that calls the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation\. -+ Test the function using the AWS Lambda console\. - -**To run the example** - -1. Copy the contents of `example.py`, which you can find in [Python Lambda function](#examples-ddb-code-lambda), to a file named `example.py`\. `example.py` is a Lambda function that calls the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation\. Compress the file to a zip archive named `example.zip`\. Store it in an S3 bucket in the same AWS Region where you want to run the function\. - -1. Create a new file named `template.yaml`\. Copy the AWS CloudFormation template code, which you can find in [AWS CloudFormation template](#examples-ddb-code-yaml), into the file\. AWS CloudFormation uses the template to create resources for the sample application\. Change `BUCKET_NAME` to the name of the S3 bucket that contains `example.zip`\. Save the file in a local directory\. - -1. Sign in to the AWS Management Console and open the AWS CloudFormation console at [https://console\.aws\.amazon\.com/cloudformation](https://console.aws.amazon.com/cloudformation/)\. - -1. Choose **Create new stack**\. - -1. Choose **Upload a template to Amazon S3**, and then choose **Choose file**\. Choose `template.yaml`, that you created in Step 2, then **Next**\. - -1. Type a name for the stack, then choose **Next**\. - -1. On the **Options** page, choose **Next**\. - -1. Choose **I acknowledge that AWS CloudFormation might create IAM resources** and **I acknowledge that AWS CloudFormation might create IAM resources with custom names**\. For more information, see [Controlling Access with AWS Identity and Access Management](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html) in the *AWS CloudFormation User Guide*\. - -1. Choose **Create Change Set**\. - -1. After AWS CloudFormation creates the change set, choose **Execute**\. Wait until AWS CloudFormation creates the stack\. - -1. Sign in to the AWS Management Console and open the AWS Lambda console at [https://console\.aws\.amazon\.com/lambda/](https://console.aws.amazon.com/lambda/)\. - -1. Choose the new function\. Its name starts with `TestTranslate-ReviewTranslate`\. - -1. On the function detail page, choose **Test**\. - -1. For **Event name**, type **TestTranslate**\. For **Configure test event**, replace the JSON with the following: - - ``` - { - "review": "hello world", - "target_language": "es", - "source_language": "en", - "review_id": "1" - } - ``` - - Choose **Create**\. - -1. Make sure that **TestTranslate** is selected, then choose **Test**\. When the test finishes, you receive the following message: -![\[A panel showing the results of the operation, "Hello world" in Spanish.\]](http://docs.aws.amazon.com/translate/latest/dg/images/example-3-results.png) - -## Example code - -Use the following code to create the example\. - -### Python Lambda function - -The following is the contents of the Python Lambda function\. The Lambda function call the `TranslateText` operation and passes the review, the source language, and the target language to get the translated review\. Save this file as `example.py` and them compress it in a \.zip archive called `example.zip`\. Save the file in an S3 bucket in the same region that you are running the example\.\. - -``` -import logging -import json -import boto3 -import os - -translate = boto3.client('translate') -dynamodb = boto3.client('dynamodb') -firehose = boto3.client('firehose') - -TABLE_NAME = os.getenv('TABLE_NAME') - -logger = logging.getLogger() -logger.setLevel(logging.INFO) - -def lambda_handler(event, context): - - logger.info(event) - - if 'source_language' in event and 'target_language' in event and 'review' in event and 'review_id' in event: - review_id = event['review_id'] - source_language = event['source_language'] - target_language = event['target_language'] - review = event['review'] - - try: - # The Lambda function queries the Amazon DynamoDB table to check whether - # the review has already been translated. If the translated review - # is already stored in Amazon DynamoDB, the function returns it. - response = dynamodb.get_item( - TableName=TABLE_NAME, - Key={ - 'review_id': { - 'N': review_id, - }, - 'language': { - 'S': target_language, - }, - } - ) - logger.info(response) - if 'Item' in response: - return response['Item']['review']['S'] - except Exception as e: - logger.error(response) - raise Exception("[ErrorMessage]: " + str(e)) - - try: - # The Lambda function calls the TranslateText operation and passes the - # review, the source language, and the target language to get the - # translated review. - result = translate.translate_text(Text=review, SourceLanguageCode=source_language, TargetLanguageCode=target_language) - logging.info("Translation output: " + str(result)) - except Exception as e: - logger.error(response) - raise Exception("[ErrorMessage]: " + str(e)) - - try: - # After the review is translated, the function stores it using - # the Amazon DynamoDB putItem operation. Subsequent requests - # for this translated review are returned from Amazon DynamoDB. - response = dynamodb.put_item( - TableName=TABLE_NAME, - Item={ - 'review_id': { - 'N': review_id, - }, - 'language': { - 'S': target_language, - }, - 'review': { - 'S': result.get('TranslatedText') - } - } - ) - logger.info(response) - except Exception as e: - logger.error(e) - raise Exception("[ErrorMessage]: " + str(e)) - return result.get('TranslatedText') - else: - logger.error(e) - raise Exception("[ErrorMessage]: Invalid input ") -``` - -### AWS CloudFormation template - -The following is the template file that you use with AWS CloudFormation to create and configure the Lambda function and the DynamoDB tables\. Use this file when you create the AWS CloudFormation stack for the example\. Update `BUCKET_NAME` to the name of the S3 bucket that contains the `example.zip` file and then save it to a local directory as `template.yaml`\. - -``` -AWSTemplateFormatVersion: '2010-09-09' -Transform: 'AWS::Serverless-2016-10-31' -Resources: ReviewTranslate: - Type: 'AWS::Serverless::Function' - Properties: - Handler: example.lambda_handler - Runtime: python2.7 - CodeUri: - Bucket: BUCKET_NAME - Key: example.zip - Policies: - - AWSLambdaFullAccess - - TranslateReadOnly - Environment: - Variables: - TABLE_NAME: !Ref ReviewTable - Tracing: "Active" - ReviewTable: - Type: 'AWS::DynamoDB::Table' - Properties: - AttributeDefinitions: - - AttributeName: "review_id" - AttributeType: "N" - - AttributeName: "language" - AttributeType: "S" - KeySchema: - - AttributeName: "review_id" - KeyType: "HASH" - - AttributeName: "language" - KeyType: "RANGE" - ProvisionedThroughput: - ReadCapacityUnits: 5 - WriteCapacityUnits: 5 -``` \ No newline at end of file diff --git a/doc_source/examples-java.md b/doc_source/examples-java.md deleted file mode 100644 index aea3fb3..0000000 --- a/doc_source/examples-java.md +++ /dev/null @@ -1,38 +0,0 @@ -# Translating text using the AWS SDK for Java - -The following example demonstrates using the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation in Java\. To run this example, you need the AWS SDK for Java\. For instructions for installing the SDK for Java, see [ Set up the AWS SDK for Java](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-install.html)\. - -``` -import com.amazonaws.auth.AWSStaticCredentialsProvider; -import com.amazonaws.auth.BasicAWSCredentials; -import com.amazonaws.client.builder.AwsClientBuilder; -import com.amazonaws.services.translate.AmazonTranslate; -import com.amazonaws.services.translate.AmazonTranslateClient; -import com.amazonaws.services.translate.model.TranslateTextRequest; -import com.amazonaws.services.translate.model.TranslateTextResult; - -public class App { - private static final String REGION = "region"; - - public static void main( String[] args ) { - - // Create credentials using a provider chain. For more information, see - // https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html - AWSCredentialsProvider awsCreds = DefaultAWSCredentialsProviderChain.getInstance(); - - AmazonTranslate translate = AmazonTranslateClient.builder() - .withCredentials(new AWSStaticCredentialsProvider(awsCreds.getCredentials())) - .withRegion(REGION) - .build(); - - TranslateTextRequest request = new TranslateTextRequest() - .withText("Hello, world") - .withSourceLanguageCode("en") - .withTargetLanguageCode("es"); - TranslateTextResult result = translate.translateText(request); - System.out.println(result.getTranslatedText()); - } -} -``` - -For a list of supported languages and language codes, see [Supported languages and language codes](what-is-languages.md) \ No newline at end of file diff --git a/doc_source/examples-polly.md b/doc_source/examples-polly.md deleted file mode 100644 index 5f6eb5e..0000000 --- a/doc_source/examples-polly.md +++ /dev/null @@ -1,251 +0,0 @@ -# Using Amazon Polly with Amazon Translate - -To speak translated text, you can use Amazon Polly with Amazon Translate\. In this example you'll create a Web page where you can translate text using Amazon Translate and then speak that text using Amazon Polly\. The code can be summarized into the following: -+ CSS and HTML to create the Web page\. -+ Initialization code that creates controllers for Amazon Translate and Amazon Polly\. -+ A function that reads data from the Web page and calls Amazon Translate\. -+ A function that reads data from the Web page and calls Amazon Polly\. -+ Utility functions for managing the Web page\. - -**To configure the example** - -1. Install and Configure the AWS SDK for JavaScript\. For instructions for installing the SDK for JavaScript, see [Installing the SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/installing-jssdk.html)\. - -1. Copy the code for the example to an HTML file on your Web server\. - -1. Update the ` - - - -

Amazon Translate Demo

-
- - - - - - - - - - - - - -
-Source Language Code: - - -Target Language Code: - -
- - - -
- - - - - -
- - - - -``` \ No newline at end of file diff --git a/doc_source/examples-python.md b/doc_source/examples-python.md deleted file mode 100644 index d707635..0000000 --- a/doc_source/examples-python.md +++ /dev/null @@ -1,104 +0,0 @@ -# Translating text using the AWS SDK for Python \(Boto\) - -The following example demonstrates using the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation in Python\. To run it, you must first install Amazon Translate via the AWS CLI\. For instructions, see [Step 2: Set up the AWS Command Line Interface \(AWS CLI\)](setup-awscli.md)\. - -``` -import boto3 - -translate = boto3.client(service_name='translate', region_name='region', use_ssl=True) - -result = translate.translate_text(Text="Hello, World", - SourceLanguageCode="en", TargetLanguageCode="de") -print('TranslatedText: ' + result.get('TranslatedText')) -print('SourceLanguageCode: ' + result.get('SourceLanguageCode')) -print('TargetLanguageCode: ' + result.get('TargetLanguageCode')) -``` - -For a list of supported language codes, see [Supported languages and language codes](what-is-languages.md) - -**Custom Terminology** - -Another example, this one demonstrating using the Custom Terminology operations in Python: - -``` - #!/usr/bin/env python - # -*- coding: utf-8 -*- - - import boto3 - - translate = boto3.client(service_name='translate') - - # The terminology file 'my-first-terminology.csv' has the following contents: - ''' - en,fr - Amazon Family,Amazon Famille - ''' - - # Read the terminology from a local file - with open('/tmp/my-first-terminology.csv', 'rb') as f: - data = f.read() - - file_data = bytearray(data) - - print("Importing the terminology into Amazon Translate...") - response = translate.import_terminology(Name='my-first-terminology', MergeStrategy='OVERWRITE', TerminologyData={"File": file_data, "Format": 'CSV'}) - print("Terminology imported: "), - print(response.get('TerminologyProperties')) - print("\n") - - print("Getting the imported terminology...") - response = translate.get_terminology(Name='my-first-terminology', TerminologyDataFormat='CSV') - print("Received terminology: "), - print(response.get('TerminologyProperties')) - print("The terminology data file can be downloaded here: " + response.get('TerminologyDataLocation').get('Location')) - print("\n") - - print("Listing the first 10 terminologies for the account...") - response = translate.list_terminologies(MaxResults=10) - print("Received terminologies: "), - print(response.get('TerminologyPropertiesList')) - print("\n") - - print("Translating 'Amazon Family' from English to French with no terminology...") - response = translate.translate_text(Text="Amazon Family", SourceLanguageCode="en", TargetLanguageCode="fr") - print("Translated text: " + response.get('TranslatedText')) - print("\n") - - print("Translating 'Amazon Family' from English to French with the 'my-first-terminology' terminology...") - response = translate.translate_text(Text="Amazon Family", TerminologyNames=["my-first-terminology"], SourceLanguageCode="en", TargetLanguageCode="fr") - print("Translated text: " + response.get('TranslatedText')) - print("\n") - - # The terminology file 'my-updated-terminology.csv' has the following contents: - ''' - en,fr - Amazon Family,Amazon Famille - Prime Video, Prime Video - ''' - - # Read the terminology from a local file - with open('/tmp/my-updated-terminology.csv', 'rb') as f: - data = f.read() - - file_data = bytearray(data) - - print("Updating the imported terminology in Amazon Translate...") - response = translate.import_terminology(Name='my-first-terminology', MergeStrategy='OVERWRITE', TerminologyData={"File": file_data, "Format": 'CSV'}) - print("Terminology updated: "), - print(response.get('TerminologyProperties')) - print("\n") - - print("Translating 'Prime Video' from English to French with no terminology...") - response = translate.translate_text(Text="Prime Video", SourceLanguageCode="en", TargetLanguageCode="fr") - print("Translated text: " + response.get('TranslatedText')) - print("\n") - - print("Translating 'Prime Video' from English to French with the 'my-first-terminology' terminology...") - response = translate.translate_text(Text="Prime Video", TerminologyNames=["my-first-terminology"], SourceLanguageCode="en", TargetLanguageCode="fr") - print("Translated text: " + response.get('TranslatedText')) - print("\n") - - print("Cleaning up by deleting 'my-first-terminology'...") - translate.delete_terminology(Name="my-first-terminology") - print("Terminology deleted.") -``` \ No newline at end of file diff --git a/doc_source/examples-sigv4.md b/doc_source/examples-sigv4.md deleted file mode 100644 index a9d0c23..0000000 --- a/doc_source/examples-sigv4.md +++ /dev/null @@ -1,169 +0,0 @@ -# Using Signature Version 4 with Amazon Translate - -This example Python program shows how to use Signature Version 4 to add authentication information to Amazon Translate requests\. The example makes a POST request, creates a JSON structure that contains the text to be translated in the body \(payload\) of the request, and passes authentication information in an Authorization header\. For more information about using Signature Version 4, see [ Signature Version 4 Signing Process ](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) in the *Amazon Web Services General Reference*\. - -## Setting up - -To run the example, perform the following steps: - -1. Install the AWS Command Line Interface \(AWS CLI\)\. The AWS SDK for Python \(Boto\) is included when you install the AWS CLI\. For instructions, see [Step 2: Set up the AWS Command Line Interface \(AWS CLI\)](setup-awscli.md)\. - -1. Create an AWS Identity and Access Management \(IAM\) user with the minimum required permission policy to run this example\. For information about creating an IAM user, see [ Creating an IAM User in Your AWS Account ](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) in the *AWS Identity and Access Management User Guide*\. For the required permissions policies, see [Amazon Translate identity\-based policies](security_iam_service-with-iam.md#access-control-managing-permissions)\. Record the user access key ID and the secret access key\. - -1. Place the access key ID and secret access key in environment variables named `AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY`, respectively\. As a best practice, we recommend that you don't embed credentials in code\. - -1. Create a new file on your computer, copy the code for the example \(which you can find in the next section\), paste it into the file, and save the file with the extension `.py`\. - -1. In the code, replace `region` with the name of the AWS Region where you want to run the Amazon Translate [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation\. For a list of supported Regions, see [ AWS Regions and Endpoints ](https://docs.aws.amazon.com/general/latest/gr/rande.html#translate_region) in the *AWS General Reference*\. - -## Code - -The following is the complete code of the example Python program\. - -After creating request values such as the endpoint URL and the body of the request, the code does the following: - -1. Create a canonical request to the Amazon Translate [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation\. - -1. Create the string to that you hash to create the signature\. - -1. Calculate the signature\. - -1. Add the signature to the request header\. - -1. Send the request to the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation\. - -To run the example on your computer, copy the code to a Python file\. - -``` -# AWS Version 4 signing example - -# Translate API (TranslateText) - -# For more information about using Signature Version 4, see http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html. -# This example makes a POST request to Amazon Translate and -# passes the text to translate JSON in the body (payload) -# of the request. Authentication information is passed in an -# Authorization header. -import sys, os, base64, datetime, hashlib, hmac -import requests # pip install requests - -# ************* REQUEST VALUES ************* -method = 'POST' -service = 'translate' -region = 'region' -host = service + '.' + region + '.amazonaws.com' -endpoint = 'https://' + host + '/' - -# POST requests use a content type header. For Amazon Translate, -# the content is JSON. -content_type = 'application/x-amz-json-1.1' -# Amazon Translate requires an x-amz-target header that has this format: -# AWSShineFrontendService_20170701.. -amz_target = 'AWSShineFrontendService_20170701.TranslateText' - -# Pass request parameters for the TranslateText operation in a JSON block. -request_parameters = '{' -request_parameters += '"Text": "Hello world.",' -request_parameters += '"SourceLanguageCode": "en",' -request_parameters += '"TargetLanguageCode": "de"' -request_parameters += '}' - -# The following functions derive keys for the request. For more information, see -# http://docs.aws.amazon.com/general/latest/gr/signature-v4-examples.html#signature-v4-examples-python. -def sign(key, msg): - return hmac.new(key, msg.encode("utf-8"), hashlib.sha256).digest() - -def getSignatureKey(key, date_stamp, regionName, serviceName): - kDate = sign(('AWS4' + key).encode('utf-8'), date_stamp) - kRegion = sign(kDate, regionName) - kService = sign(kRegion, serviceName) - kSigning = sign(kService, 'aws4_request') - return kSigning - -# Python can read the AWS access key from environment variables or the configuration file. -# In this example, keys are stored in environment variables. As a best practice, do not -# embed credentials in code. -access_key = os.environ.get('AWS_ACCESS_KEY_ID') -secret_key = os.environ.get('AWS_SECRET_ACCESS_KEY') -if access_key is None or secret_key is None: - print 'No access key is available.' - sys.exit() - -# Create a timestamp for headers and the credential string. -t = datetime.datetime.utcnow() -amz_date = t.strftime('%Y%m%dT%H%M%SZ') -date_stamp = t.strftime('%Y%m%d') # The date without time is used in the credential scope. - - -# ************* TASK 1: CREATE A CANONICAL REQUEST ************* -# For information about creating a canonical request, see http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html. - -# Step 1: Define the verb (GET, POST, etc.), which you have already done. - -# Step 2: Create a canonical URI. A canonical URI is the part of the URI from domain to query. -# string (use '/' if no path) -canonical_uri = '/' - -## Step 3: Create the canonical query string. In this example, request -# parameters are passed in the body of the request and the query string -# is blank. -canonical_querystring = '' - -# Step 4: Create the canonical headers. Header names must be trimmed, -# lowercase, and sorted in code point order from low to high. -# Note the trailing \n. -canonical_headers = 'content-type:' + content_type + '\n' + 'host:' + host + '\n' + 'x-amz-date:' + amz_date + '\n' + 'x-amz-target:' + amz_target + '\n' - -# Step 5: Create the list of signed headers by listing the headers -# in the canonical_headers list, delimited with ";" and in alphabetical order. -# Note: The request can include any headers. Canonical_headers and -# signed_headers should contain headers to include in the hash of the -# request. "Host" and "x-amz-date" headers are always required. -# For Amazon Translate, content-type and x-amz-target are also required. -signed_headers = 'content-type;host;x-amz-date;x-amz-target' - -# Step 6: Create the payload hash. In this example, the request_parameters -# variable contains the JSON request parameters. -payload_hash = hashlib.sha256(request_parameters).hexdigest() - -# Step 7: Combine the elements to create a canonical request. -canonical_request = method + '\n' + canonical_uri + '\n' + canonical_querystring + '\n' + canonical_headers + '\n' + signed_headers + '\n' + payload_hash - - -# ************* TASK 2: CREATE THE STRING TO SIGN************* -# Set the algorithm variable to match the hashing algorithm that you use, either SHA-256 (recommended) or SHA-1. -# -algorithm = 'AWS4-HMAC-SHA256' -credential_scope = date_stamp + '/' + region + '/' + service + '/' + 'aws4_request' -string_to_sign = algorithm + '\n' + amz_date + '\n' + credential_scope + '\n' + hashlib.sha256(canonical_request).hexdigest() - - -# ************* TASK 3: CALCULATE THE SIGNATURE ************* -# Create the signing key using the getSignaturKey function defined above. -signing_key = getSignatureKey(secret_key, date_stamp, region, service) - -# Sign the string_to_sign using the signing_key. -signature = hmac.new(signing_key, (string_to_sign).encode('utf-8'), hashlib.sha256).hexdigest() - - -# ************* TASK 4: ADD SIGNING INFORMATION TO THE REQUEST ************* -# Put the signature information in a header named Authorization. -authorization_header = algorithm + ' ' + 'Credential=' + access_key + '/' + credential_scope + ', ' + 'SignedHeaders=' + signed_headers + ', ' + 'Signature=' + signature - -# For Amazon Translate, the request can include any headers, but it must include "host," "x-amz-date," -# "x-amz-target," "content-type," and "Authorization" headers. Except for the authorization -# header, the headers must be included in the canonical_headers and signed_headers values, as -# noted earlier. Header order is not significant. -# Note: The Python 'requests' library automatically adds the 'host' header. -headers = {'Content-Type':content_type, - 'X-Amz-Date':amz_date, - 'X-Amz-Target':amz_target, - 'Authorization':authorization_header} - - -# ************* TASK 5: SEND THE REQUEST ************* -print 'Request:\n\t' + request_parameters - -response = requests.post(endpoint, data=request_parameters, headers=headers) -print 'Response:\n\t' + response.text -``` \ No newline at end of file diff --git a/doc_source/examples-split.md b/doc_source/examples-split.md deleted file mode 100644 index a3d28ad..0000000 --- a/doc_source/examples-split.md +++ /dev/null @@ -1,104 +0,0 @@ -# Using Amazon Translate to translate large documents - -You can split large documents into smaller parts to keep the total document size below the document size limit\. For more information about document size limits, see [Service limits](what-is-limits.md#limits)\. The following Java program breaks long text documents into individual sentences and then translates each sentence from the source language to the target language\. The program contains two sections: -+ The `SentenceSegmenter` class that is responsible for breaking the source string into individual sentences\. The sample uses the Java `BreakIterator` class\. -+ The `main` function that calls the `Translate` operation for each sentence in the source string\. The `main` function also handles authentication with Amazon Translate\. - -**To configure the example** - -1. Install and configure the AWS SDK for Java\. For instructions for installing the SDK for Java, see [ Set up the AWS SDK for Java](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-install.html)\. - -1. Create an IAM user with the minimum required permissions to run this example\. For information about creating an IAM user, see [ Creating an IAM User in Your AWS Account ](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) in the *AWS Identity and Access Management User Guide*\. For the required permissions policies, see [Amazon Translate identity\-based policies](security_iam_service-with-iam.md#access-control-managing-permissions)\. - -1. Set up the credentials needed to run the sample\. For instructions, see [ Set up AWS Credentials and Region for Development ](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html) in the *AWS SDK for Java Developer Guide*\. - -1. Create a new project in your Java IDE and copy the source code\. - -1. Change the region to the region where you want to run the Amazon Translate operation\. For a list of supported regions for Amazon Translate, see [AWS Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#translate_region) in the *AWS General Reference*\. - -1. Change the source and target languages to the languages to translate between\. - -1. Run the sample to see the translated text on standard output\. - -``` -import com.amazonaws.auth.AWSCredentialsProviderChain; -import com.amazonaws.auth.EnvironmentVariableCredentialsProvider; -import com.amazonaws.auth.SystemPropertiesCredentialsProvider; -import com.amazonaws.auth.profile.ProfileCredentialsProvider; -import com.amazonaws.services.translate.AmazonTranslate; -import com.amazonaws.services.translate.AmazonTranslateClient; -import com.amazonaws.services.translate.model.TranslateTextRequest; -import com.amazonaws.services.translate.model.TranslateTextResult; -import java.text.BreakIterator; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -public class MultiSentenceTranslator { - - public static void main(String[] args) { - // Define the text to be translated here - String region = "region"; - String text = "Text to be translated"; - - String sourceLang = "source language"; - String targetLang = "target language"; - - // Break text into sentences - SentenceSegmenter sentenceSegmenter = new SentenceSegmenter(); - List sentences = new ArrayList<>(); - try { - sentences = sentenceSegmenter.segment(text, sourceLang); - } catch (Exception e) { - System.out.println(e); - System.exit(1); - } - - // Create credentials using a provider chain that will evaluate in order; - // a) Any Java system properties - // b) Any environment variables - // c) Any profile file - AWSCredentialsProviderChain DefaultAWSCredentialsProviderChain = new AWSCredentialsProviderChain( - new SystemPropertiesCredentialsProvider(), - new EnvironmentVariableCredentialsProvider(), - new ProfileCredentialsProvider() - ); - - // Create an Amazon Translate client - AmazonTranslate translate = AmazonTranslateClient.builder() - .withCredentials(DefaultAWSCredentialsProviderChain) - .withRegion(region) - .build(); - - // Translate sentences and print the results to stdout - for (String sentence : sentences) { - TranslateTextRequest request = new TranslateTextRequest() - .withText(sentence) - .withSourceLanguageCode(sourceLang) - .withTargetLanguageCode(targetLang); - TranslateTextResult result = translate.translateText(request); - System.out.println("Original text: " + sentence); - System.out.println("Translated text: " + result.getTranslatedText()); - } - } - -} - -class SentenceSegmenter { - public List segment(final String text, final String lang) throws Exception { - List res = new ArrayList<>(); - BreakIterator sentenceIterator = BreakIterator.getSentenceInstance(new Locale(lang)); - sentenceIterator.setText(text); - int prevBoundary = sentenceIterator.first(); - int curBoundary = sentenceIterator.next(); - while (curBoundary != BreakIterator.DONE) { - String sentence = text.substring(prevBoundary, curBoundary); - res.add(sentence); - prevBoundary = curBoundary; - curBoundary = sentenceIterator.next(); - } - return res; - } - -} -``` \ No newline at end of file diff --git a/doc_source/examples-twitch.md b/doc_source/examples-twitch.md deleted file mode 100644 index 32aaf1a..0000000 --- a/doc_source/examples-twitch.md +++ /dev/null @@ -1,448 +0,0 @@ -# Using Amazon Translate to translate a chat channel - -You can use Amazon Translate for real time translation of chat messages\. This example uses a Twitch channel, but you can use it as a starting point for other real\-time streaming text like other chat platforms, customer service interactions, message boards, and more\. - -This example uses a web page that shows real\-time messages in English and their real\-time translations side\-by\-side\. You can send the messages to Amazon Polly to speak the text\. To follow a person in the chat, type their user name\. The app will speak only messages from that user\. - -The code can be summarized as follows: -+ CSS and HTML to create the Web page\. -+ Initialization code that creates controllers for Amazon Translate and Amazon Polly\. -+ A call back function that gets executed when a chat message is received\. -+ A function that sends a chat message\. -+ A function that calls Amazon Translate to translate messages\. -+ A function that calls Amazon Polly to synthesize speech\. -+ Utility functions for managing the Web page\. - -**To configure the example** - -1. Install and configure the AWS SDK for JavaScript\. For instructions for installing the SDK for JavaScript, see [Installing the SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/installing-jssdk.html)\. - -1. Copy the code for the example to an HTML file on your Web server\. - -1. Update the ` - - - - - - - -``` \ No newline at end of file diff --git a/doc_source/examples-web.md b/doc_source/examples-web.md deleted file mode 100644 index d9695f1..0000000 --- a/doc_source/examples-web.md +++ /dev/null @@ -1,155 +0,0 @@ -# Using Amazon Translate to translate a web page - -You can use Amazon Translate to translate the contents of a Web page\. The following Java program translates a specified Web page from English to Spanish and creates an HTML file that contains the result of the translation\. There are two functions in the program: -+ A function that reads data from the source Web page, separates it into HTML elements, and then calls the second function to translate the element\. At the end of the document, it writes the results to an HTML file\. -+ A function that calls the Amazon Translate service to translate the contents of an HTML element\. - -This example works on simple HTML pages without nested elements\. - -**To configure the example** - -1. Install and configure the AWS SDK for Java\. For instructions for installing the SDK for Java, see [ Set up the AWS SDK for Java](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-install.html)\. - -1. Install the jsoup Java HTML parser\. For instructions, see [jsoup](https://jsoup.org/)\. - -1. Create an IAM user with the minimum required permissions to run this example\. For information about creating an IAM user, see [ Creating an IAM User in Your AWS Account ](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) in the *AWS Identity and Access Management User Guide*\. For the required permissions policies, see [Amazon Translate identity\-based policies](security_iam_service-with-iam.md#access-control-managing-permissions)\. - -1. Set up the credentials needed to run the sample\. For instructions, see [ Set up AWS Credentials and Region for Development ](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html) in the *AWS SDK for Java Developer Guide*\. - -1. Create a new project in your Java IDE and copy the source code\. - -1. Change the region and endpoint to the region where you want to run the Amazon Translate operation\. For a list of supported regions for Amazon Translate, see [AWS Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#translate_region) in the *AWS General Reference*\. - -``` -package com.amazonaws.translateweb; - -import com.amazonaws.auth.AWSCredentialsProviderChain; -import com.amazonaws.auth.EnvironmentVariableCredentialsProvider; -import com.amazonaws.auth.SystemPropertiesCredentialsProvider; -import com.amazonaws.auth.profile.ProfileCredentialsProvider; -import com.amazonaws.client.builder.AwsClientBuilder; -import com.amazonaws.services.translate.AmazonTranslate; -import com.amazonaws.services.translate.AmazonTranslateClient; -import com.amazonaws.services.translate.model.TranslateTextRequest; -import com.amazonaws.services.translate.model.TranslateTextResult; -import com.amazonaws.AmazonServiceException; - -import java.io.IOException; -import java.io.PrintWriter; - -import org.jsoup.Jsoup; -import org.jsoup.nodes.Document; -import org.jsoup.nodes.Element; - -import org.jsoup.select.Elements; - - -public class TranslateWebPage { - - public static void main(String[] args) throws InterruptedException { - - // Define the URL of the HTML content to translate - String url = "http://example.com/source.html"; - - // Create credentials using a provider chain that will evaluate in order; - // a) Any Java system properties - // b) Any environment variables - // c) Any profile file - AWSCredentialsProviderChain DefaultAWSCredentialsProviderChain = new AWSCredentialsProviderChain( - new SystemPropertiesCredentialsProvider(), - new EnvironmentVariableCredentialsProvider(), - new ProfileCredentialsProvider() - ); - - // Create an endpoint configuration for the Translate service - AwsClientBuilder.EndpointConfiguration endpointConfiguration = new AwsClientBuilder.EndpointConfiguration( - "endpoint", "region"); - - // Create a client for the Translate service - AmazonTranslate translate = AmazonTranslateClient.builder() - .withCredentials(DefaultAWSCredentialsProviderChain) - .withEndpointConfiguration(endpointConfiguration).build(); - - - // Record the beginning of translating the HTML content at the url - System.out.println("Translating URL: " + url); - - // Create an empty HTML document to store the parsed data - Document doc; - - try { - // Retrieve the HTML located at the URL - doc = Jsoup.connect(url).get(); - - // Select all of the elements in the HTML - Elements eles = doc.select("*"); - - // For each element - for (Element ele : eles) { - - // Translate the element - translateElement(ele, translate); - - // If you encounter service throttling when translating large web - // pages, you can request a service limit increase. For details, - // see https://aws.amazon.com/premiumsupport/knowledge-center/manage-service-limits/, - // or you can throttle your requests by inserting a sleep statement. - // Thread.sleep(1000); - } - - // Configure an output file for the translated HTML - String fname = "output HTML file name"; - PrintWriter pw = new PrintWriter(fname, "UTF-8"); - - // Write our translated HTML to the output file - pw.println(doc); - pw.close(); - - // Record that the file has been saved - System.out.println("Saved file "+fname); - - - // Catch any exceptions in retrieving the HTML - } catch (IOException e1) { - e1.printStackTrace(); - } -} - - // This function is used to translate each individual element - public static void translateElement(Element ele, AmazonTranslate translate) { - - // Check if the element has any text - if (!ele.ownText().isEmpty()) { - - // Retrieve the text of the HTML element - String text = ele.ownText(); - - // Now translate the element's text - try { - - // Translate from English to Spanish - TranslateTextRequest request = new TranslateTextRequest() - .withText(text) - .withSourceLanguageCode("en") - .withTargetLanguageCode("es"); - - // Retrieve the result - TranslateTextResult result = translate.translateText(request); - - // Record the original and translated text - System.out.println("Original text: " + text + " - Translated text: "+ result.getTranslatedText()); - - // Update the HTML element with the translated text - ele.text(result.getTranslatedText()); - - // Catch any translation errors - } catch (AmazonServiceException e) { - System.err.println(e.getErrorMessage()); - System.exit(1); - } - } else { - // We have found a non-text HTML element. No action required. - } - } -} -``` \ No newline at end of file diff --git a/doc_source/examples.md b/doc_source/examples.md deleted file mode 100644 index e51c5ec..0000000 --- a/doc_source/examples.md +++ /dev/null @@ -1,11 +0,0 @@ -# Examples - -The following examples show ways that you can use Amazon Translate\. - -**Topics** -+ [Using Amazon Polly with Amazon Translate](examples-polly.md) -+ [Using Amazon Translate to translate a chat channel](examples-twitch.md) -+ [Using Amazon Translate with Amazon DynamoDB](examples-ddb.md) -+ [Using Amazon Translate to translate a web page](examples-web.md) -+ [Using Amazon Translate to translate large documents](examples-split.md) -+ [Using Signature Version 4 with Amazon Translate](examples-sigv4.md) \ No newline at end of file diff --git a/doc_source/get-started-cli.md b/doc_source/get-started-cli.md deleted file mode 100644 index 9a1a549..0000000 --- a/doc_source/get-started-cli.md +++ /dev/null @@ -1,80 +0,0 @@ -# Step 4: Getting started \(AWS CLI\) - -In the following exercises, you use the AWS command line interface \(AWS CLI\) to translate text\. To complete these exercises, you need to be familiar with the CLI and have a text editor\. For more information, see [Step 2: Set up the AWS Command Line Interface \(AWS CLI\)](setup-awscli.md)\. - -There are two ways to use the CLI to translate text with Amazon Translate\. For short text, you can provide the text that you want to translate as a parameter of the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) command\. For longer text, you can provide the source language, target language, and text in a JSON file\. - -To use Amazon Translate from the command line, you need to know the endpoint and region for the service\. For a list of available endpoints and regions, see [Amazon Translate Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#translate_region) in the *AWS General Reference*\. - -## Translate text using the command line - -The following example shows how to use the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation from the command line to translate text\. The example is formatted for Unix, Linux, and macOS\. For Windows, replace the backslash \(\\\) Unix continuation character at the end of each line with a caret \(^\)\. At the command line, type the following\. - -``` -aws translate translate-text \ - --region region \ - --source-language-code "en" \ - --target-language-code "es" \ - --text "hello, world" -``` - -The response is the following JSON: - -``` -{ - "TargetLanguageCode": "es", - "Text": "Hola, mundo", - "SourceLanguageCode": "en" -} -``` - -## Translate text using a JSON file - -This example shows how to use the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation to translate a longer text block from a JSON file\. You can specify the source and target language on the command line, but in this example, you specify them in the JSON file\. - -**Note** -The JSON file is formatted for readability\. Reformat the `"Text"` field to remove line breaks\. -The example is formatted for Unix, Linux, and macOS\. For Windows, replace the backslash \(\\\) Unix continuation character at the end of each line with a caret \(^\)\. - -**To translate text using a JSON file** - -1. Copy the following text into a JSON file called `translate.json`: - - ``` - { - "Text": "Amazon Translate translates documents between languages in - real time. It uses advanced machine learning technologies - to provide high-quality real-time translation. Use it to - translate documents or to build applications that work in - multiple languages.", - "SourceLanguageCode": "en", - "TargetLanguageCode": "fr" - } - ``` - -1. In the AWS CLI, run the following command: - - ``` - aws translate translate-text \ - --region region \ - --cli-input-json file://translate.json > translated.json - ``` - - The command outputs a JSON file that contains the following JSON text: - - ``` - { - "TargetLanguageCode": "fr", - "Text": "Amazon Translate traduit les documents entre - les langue en temps réel. Il utilise des technologies - avancées d'apprentissage de la machine pour fournir - une traduction en temps réel de haute qualité. Utilisez-le - pour traduire des documents ou pour créer des applications - qui fonctionnent en plusieurs langues.", - "SourceLanguageCode": "en" - } - ``` - -## Next step - -To see other ways to use Amazon Translate see [Examples](examples.md)\. \ No newline at end of file diff --git a/doc_source/get-started-console.md b/doc_source/get-started-console.md deleted file mode 100644 index ab4630d..0000000 --- a/doc_source/get-started-console.md +++ /dev/null @@ -1,19 +0,0 @@ -# Step 3: Getting started \(console\) - -The easiest way to get started with Amazon Translate is to use the console to translate some text\. You can translate up to 5,000 characters using the console\. If you haven't reviewed the concepts and terminology in [How Amazon Translate works](how-it-works.md), we recommend that you do so before proceeding\. - -Open the [Amazon Translate console](https://console.aws.amazon.com/translate/home)\. - -If this is the first time that you've used Amazon Translate, choose **Launch real\-time translation**\. - -In **Real\-time translation**, choose the source and target languages\. Enter the text that you want to translate in the left\-hand text box\. The translated text appears in the right\-hand text box\. - -![\[The translate text page of the Amazon Translate API Explorer.\]](http://docs.aws.amazon.com/translate/latest/dg/images/gs-10.png) - -In the **JSON samples** section you can see the JSON input and output to the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation\. - -![\[JSON code samples for translating text.\]](http://docs.aws.amazon.com/translate/latest/dg/images/gs-20.png) - -## Next step - -[Step 4: Getting started \(AWS CLI\)](get-started-cli.md) \ No newline at end of file diff --git a/doc_source/get-started-sdk.md b/doc_source/get-started-sdk.md deleted file mode 100644 index 61b6cb0..0000000 --- a/doc_source/get-started-sdk.md +++ /dev/null @@ -1,11 +0,0 @@ -# Step 5: Getting started \(SDK\) - -AWS provides SDKs for various computer languages\. The SDK manages many of the API connection details for your client, such as signature calculation, request retry handling, and error handling\. For more information, see [AWS SDKs](http://aws.amazon.com/tools/#SDKs)\. - -The following examples demonstrate how to use Amazon Translate [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation using Java, Python and the mobile SDK\. Use the SDKs to learn about the Amazon Translate API and as building blocks for your own applications\. - -**Topics** -+ [Translating text using the AWS SDK for Java](examples-java.md) -+ [Translating text using the AWS SDK for Python \(Boto\)](examples-python.md) -+ [Translating text using the AWS Mobile SDK for Android](getting-started-android.md) -+ [Translating text using the AWS Mobile SDK for iOS](getting-started-ios.md) \ No newline at end of file diff --git a/doc_source/getting-started-android.md b/doc_source/getting-started-android.md deleted file mode 100644 index 655d576..0000000 --- a/doc_source/getting-started-android.md +++ /dev/null @@ -1,85 +0,0 @@ -# Translating text using the AWS Mobile SDK for Android - -You can use Amazon Translate in an Android application to translate text\. - -**To configure the example** - -1. Set up the AWS Mobile SDK for Android\. For instructions, see [ Android: Setup Options for the SDK](https://docs.aws.amazon.com/aws-mobile/latest/developerguide/how-to-android-sdk-setup.html) in the *AWS Mobile Developer Guide* - -1. Create an IAM user with the minimum required permissions to run this example\. For information about creating an IAM user, see [ Creating an IAM User in Your AWS Account ](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) in the *AWS Identity and Access Management User Guide*\. For the required permissions policies, see [Amazon Translate identity\-based policies](security_iam_service-with-iam.md#access-control-managing-permissions)\. After you create the user, download the credentials or record the access key and secret access key\. - -1. Create a new project with Android Studio\. - -1. Add the following to the dependencies section of your `build.gradle` file\. - - ``` - dependencies { - implementation 'com.amazonaws:aws-android-sdk-translate:2.6.20' - } - ``` - -1. Add the following permissions to the `AndroidManifest.xml` file\. - - ``` - - - ``` - -1. Copy the source code into your project - -1. Change the access key and secret access key to the keys that you recorded in step one\. - -## Code - -Use the following code to create the example\. - -``` -package com.amazonaws.amazontranslatetester; - -import android.app.Activity; -import android.util.Log; - -import com.amazonaws.auth.AWSCredentials; -import com.amazonaws.handlers.AsyncHandler; -import com.amazonaws.services.translate.AmazonTranslateAsyncClient; -import com.amazonaws.services.translate.model.TranslateTextRequest; -import com.amazonaws.services.translate.model.TranslateTextResult; - -public class MainActivity extends Activity { - - private static final String LOG_TAG = MainActivity.class.getSimpleName(); - - @Override - protected void onCreate(Bundle savedInstanceState) { - AWSCredentials awsCredentials = new AWSCredentials() { - @Override - public String getAWSAccessKeyId() { - return "access key"; - } - - @Override - public String getAWSSecretKey() { - return "secret key"; - } - }; - - AmazonTranslateAsyncClient translateAsyncClient = new AmazonTranslateAsyncClient(awsCredentials); - TranslateTextRequest translateTextRequest = new TranslateTextRequest() - .withText("Hello, world") - .withSourceLanguageCode("en") - .withTargetLanguageCode("es"); - translateAsyncClient.translateTextAsync(translateTextRequest, new AsyncHandler() { - @Override - public void onError(Exception e) { - Log.e(LOG_TAG, "Error occurred in translating the text: " + e.getLocalizedMessage()); - } - - @Override - public void onSuccess(TranslateTextRequest request, TranslateTextResult translateTextResult) { - Log.d(LOG_TAG, "Original Text: " + request.getText()); - Log.d(LOG_TAG, "Translated Text: " + translateTextResult.getTranslatedText()); - } - }); - } -} -``` \ No newline at end of file diff --git a/doc_source/getting-started-ios.md b/doc_source/getting-started-ios.md deleted file mode 100644 index 9b06b6a..0000000 --- a/doc_source/getting-started-ios.md +++ /dev/null @@ -1,81 +0,0 @@ -# Translating text using the AWS Mobile SDK for iOS - -You can use Amazon Translate in an iOS application to translate text\. - -**To configure the example** - -1. Create an IAM user with the minimum required permissions to run this example\. For information about creating an IAM user, see [ Creating an IAM User in Your AWS Account ](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) in the *AWS Identity and Access Management User Guide*\. For the required permissions policies, see [Amazon Translate identity\-based policies](security_iam_service-with-iam.md#access-control-managing-permissions)\. After you create the user, download the credentials or record the access key and secret access key\. - -1. Install Xcode version 8\.0 or later\. You can download the latest version of Xcode from the Apple website, [ https://developer\.apple\.com/xcode/](https://developer.apple.com/xcode/)\. - -1. Install Cocoapods\. In a terminal window, run the following command: - - ``` - sudo gem install cocoapods - ``` - -1. Create a project using Xcode\. Then, in a terminal window, navigate to the directory that contains your project's `.xcodeproj` file and run the following command: - - ``` - pod init - ``` - -1. Add the core Mobile SDK for iOS components to your pod file: - - ``` - platform :ios, '9.0' - target :'app name' do - use_frameworks! - pod 'AWSTranslate', '~> 2.6.19' - # other pods - end - ``` - -1. Install dependencies by running the following command in a terminal window: - - ``` - pod install --repo-update - ``` - -1. Running '`pod install`' creates a new workspace file\. Close your Xcode project and then open it using the \./*project\_name*\.xcworkspace file\. From now on you should only use this file to open your Xcode project - - Rebuild your app after you open it to resolve APIs from the new libraries called in your code\. - -1. Add the following import statement to your view controller: - - ``` - import AWSTranslate - ``` - -1. Copy the following code into your XCode project\. Update the access key and secret key to the values that you recorded in step 1\. - -## Code - -Use the following code to create the example\. - -``` -var credentialsProvider = AWSStaticCredentialsProvider(accessKey: "access key", secretKey: "secret key") - -var configuration = AWSServiceConfiguration(region: AWSRegionUSEast1, credentialsProvider: credentialsProvider) - -AWSServiceManager.default().defaultServiceConfiguration = configuration - -let translateClient = AWSTranslate.default() -let translateRequest = AWSTranslateTranslateTextRequest() -translateRequest?.sourceLanguageCode = "en" -translateRequest?.targetLanguageCode = "es" -translateRequest?.text = "Hello World" - -let callback: (AWSTranslateTranslateTextResponse?, Error?) -> Void = { (response, error) in - guard let response = response else { - print("Got error \(error)") - return - } - - if let translatedText = response.translatedText { - print(translatedText) - } -} - -translateClient.translateText(translateRequest!, completionHandler: callback) -``` \ No newline at end of file diff --git a/doc_source/getting-started.md b/doc_source/getting-started.md deleted file mode 100644 index 4ef30b3..0000000 --- a/doc_source/getting-started.md +++ /dev/null @@ -1,10 +0,0 @@ -# Getting started with Amazon Translate - -To get started using Amazon Translate, set up an AWS account and create an AWS Identity and Access Management \(IAM\) user\. To use the AWS Command Line Interface \(AWS CLI\), download and configure it\. - -**Topics** -+ [Step 1: Set up an AWS account and create an administrator user](setting-up.md) -+ [Step 2: Set up the AWS Command Line Interface \(AWS CLI\)](setup-awscli.md) -+ [Step 3: Getting started \(console\)](get-started-console.md) -+ [Step 4: Getting started \(AWS CLI\)](get-started-cli.md) -+ [Step 5: Getting started \(SDK\)](get-started-sdk.md) \ No newline at end of file diff --git a/doc_source/glossary.md b/doc_source/glossary.md deleted file mode 100644 index 0fccc48..0000000 --- a/doc_source/glossary.md +++ /dev/null @@ -1,3 +0,0 @@ -# AWS glossary - -For the latest AWS terminology, see the [AWS glossary](https://docs.aws.amazon.com/general/latest/gr/glos-chap.html) in the *AWS General Reference*\. \ No newline at end of file diff --git a/doc_source/how-custom-terminology.md b/doc_source/how-custom-terminology.md deleted file mode 100644 index c9efa2d..0000000 --- a/doc_source/how-custom-terminology.md +++ /dev/null @@ -1,20 +0,0 @@ -# Customizing your translations with custom terminology - -Using custom terminology with your translation requests enables you to make sure that your brand names, character names, model names, and other unique content is translated exactly the way you need it, regardless of its context and the Amazon Translate algorithm’s decision\. - -It's easy to set up a terminology file and attach it to your Amazon Translate account\. When you translate text, you simply choose to use the custom terminology as well, and any examples of your source word are translated as you want them\. - -For example, consider the following: *Amazon Family* is a collection of benefits that offers Amazon Prime members exclusive offers, such as up to 20% off subscriptions to diapers, baby food, and more\. In France, it's called *Amazon Famille*\. If you translate *Amazon Family* into French using Amazon Translate without any additional context, the result is *Famille Amazon* as the output\. While this is an accurate translation, it isn't what the Amazon team in France needs\. However, if you add context to this, as in: "Have you ever shopped with Amazon Family?", Amazon Translate determines that the program name does not need to be translated, and the result is "Avez\-vous déjà fait des achats avec Amazon Family?"\. This is a good translation, but still not what the Amazon team is looking for\. Custom terminologies can solve issues like this\. By adding an entry showing that the term *Amazon Family* should be translated as *Amazon Famille* to their custom terminology, the team can make sure that it is translated this way every time, regardless of context\. *Amazon Family* is now translated into *Amazon Famille* and "Have you ever shopped with Amazon Family?" is now translated into "Avez\-vous déjà fait des achats avec Amazon Famille?" - -**Topics** -+ [How does this work?](#how-does-ct-work) -+ [Creating a custom terminology](creating-custom-terminology.md) -+ [Using custom terminologies](using-ct.md) -+ [Encrypting your terminology](protect-terminology.md) -+ [Best practices](ct-best-practices.md) - -## How does this work? - -Generally speaking, when a translation request comes in, Amazon Translate reads the source sentence, creates a semantic representation of the content \(in other words, it understands it\), and generates a translation into the target language\. - -When a custom terminology is used as part of the translation request, the engine scans the terminology file before returning the final result\. When the engine identifies an exact match between a terminology entry and a string in the source text, it locates the appropriate string in the proposed translation and replaces it with the terminology entry\. In the Amazon Family example, it first generates the translation "Avez\-vous déjà fait des achats avec Amazon Family?" but stops and replaces *Amazon Family* with *Amazon Famille* before providing the response\. \ No newline at end of file diff --git a/doc_source/how-it-works.md b/doc_source/how-it-works.md deleted file mode 100644 index 3fcc4ae..0000000 --- a/doc_source/how-it-works.md +++ /dev/null @@ -1,29 +0,0 @@ -# How Amazon Translate works - -The Amazon Translate service is based on neural networks trained for language translation\. This enables you to translate between a source language \(the original language of the text being translated\) and a target language \(the language into which the text is being translated\)\. For more information, see [Supported languages and language codes](what-is-languages.md)\. - -When working with Amazon Translate, you will provide source text and get output text: -+ **Source text**—The text that you want to translate\. You provide the source text in UTF\-8 format\. -+ **Output text**—The text that Amazon Translate has translated into the target language\. Output text is also in UTF\-8 format\. Depending on the source and target languages, there might be more characters in the output text than in the input text\. - -The translation model has two components, the encoder and the decoder\. The *encoder* reads a source sentence one word at a time and constructs a semantic representation that captures its meaning\. The *decoder* uses the semantic representation to generate a translation one word at a time in the target language\. - -Amazon Translate uses attention mechanisms to understand context\. This helps it decide which words in the source text are most relevant for generating the next target word\. Attention mechanisms enable the decoder to focus on the most relevant parts of a source sentence\. This ensures that the decoder correctly translates ambiguous words or phrases\. - -The target word that the model generates becomes input to the decoder\. The network continues generating words until it reaches the end of the sentence\. - -## Automatic language detection - -Amazon Translate can automatically detect the language used in your source text\. To use automatic language detection, specify `auto` as the source language\. Amazon Translate calls Amazon Comprehend on your behalf to determine the language used in the source text\. By choosing automatic language detection, you agree to the service terms and agreements for Amazon Comprehend\. For information about pricing for Amazon Comprehend, see [ Amazon Comprehend Pricing](https://aws.amazon.com/comprehend/pricing/)\. - -## Exception handling - -If you specify a source or target language that isn't supported, Amazon Translate returns the following exceptions: -+ **UnsupportedLanguagePairException** – Amazon Translate supports translation between all supported languages\. This exception is returned if either the source language or target language is unsupported\. For more information, see [Supported languages](what-is-languages.md)\. -+ **DetectedLanguageLowConfidenceException** – If you use automatic language detection, and Amazon Translate has low confidence that it detected the correct source language, it returns this exception\. If a low confidence level is acceptable, you can use the source language returned in the exception\. - -## Next steps - -Now that you've learned how Amazon Translate works, you can explore the following sections to learn about creating a solution\. -+ [Getting started with Amazon Translate](getting-started.md) -+ [Examples](examples.md) \ No newline at end of file diff --git a/doc_source/identity-and-access-management.md b/doc_source/identity-and-access-management.md deleted file mode 100644 index aefe2b8..0000000 --- a/doc_source/identity-and-access-management.md +++ /dev/null @@ -1,141 +0,0 @@ -# Identity and access management for Amazon Translate - -AWS Identity and Access Management \(IAM\) is an AWS service that helps an administrator securely control access to AWS resources\. IAM administrators control who can be *authenticated* \(signed in\) and *authorized* \(have permissions\) to use Amazon Translate resources\. IAM is an AWS service that you can use with no additional charge\. - -**Topics** -+ [Audience](#security_iam_audience) -+ [Authenticating with identities](#security_iam_authentication) -+ [Managing access using policies](#security_iam_access-manage) -+ [Allow users to view their own permissions](#security_iam_id-based-policy-examples-view-own-permissions) -+ [How Amazon Translate works with IAM](security_iam_service-with-iam.md) -+ [Amazon Translate identity\-based policy examples](security_iam_id-based-policy-examples.md) -+ [Troubleshooting Amazon Translate identity and access](security_iam_troubleshoot.md) -+ [Amazon Translate API permissions: Actions, resources, and conditions reference](translate-api-permissions-ref.md) - -## Audience - -How you use AWS Identity and Access Management \(IAM\) differs, depending on the work that you do in Amazon Translate\. - -**Service user** – If you use the Amazon Translate service to do your job, then your administrator provides you with the credentials and permissions that you need\. As you use more Amazon Translate features to do your work, you might need additional permissions\. Understanding how access is managed can help you request the right permissions from your administrator\. If you cannot access a feature in Amazon Translate, see [Troubleshooting Amazon Translate identity and access](security_iam_troubleshoot.md)\. - -**Service administrator** – If you're in charge of Amazon Translate resources at your company, you probably have full access to Amazon Translate\. It's your job to determine which Amazon Translate features and resources your service users should access\. You must then submit requests to your IAM administrator to change the permissions of your service users\. Review the information on this page to understand the basic concepts of IAM\. To learn more about how your company can use IAM with Amazon Translate, see [How Amazon Translate works with IAM](security_iam_service-with-iam.md)\. - -**IAM administrator** – If you're an IAM administrator, you might want to learn details about how you can write policies to manage access to Amazon Translate\. To view example Amazon Translate identity\-based policies that you can use in IAM, see [Amazon Translate identity\-based policy examples](security_iam_id-based-policy-examples.md)\. - -## Authenticating with identities - -Authentication is how you sign in to AWS using your identity credentials\. You must be *authenticated* \(signed in to AWS\) as the AWS account root user, as an IAM user, or by assuming an IAM role\. - -You can sign in to AWS as a federated identity by using credentials provided through an identity source\. AWS IAM Identity Center \(successor to AWS Single Sign\-On\) \(IAM Identity Center\) users, your company's single sign\-on authentication, and your Google or Facebook credentials are examples of federated identities\. When you sign in as a federated identity, your administrator previously set up identity federation using IAM roles\. When you access AWS by using federation, you are indirectly assuming a role\. - -Depending on the type of user you are, you can sign in to the AWS Management Console or the AWS access portal\. For more information about signing in to AWS, see [How to sign in to your AWS account](https://docs.aws.amazon.com/signin/latest/userguide/how-to-sign-in.html) in the *AWS Sign\-In User Guide*\. - -If you access AWS programmatically, AWS provides a software development kit \(SDK\) and a command line interface \(CLI\) to cryptographically sign your requests using your credentials\. If you don't use AWS tools, you must sign requests yourself\. For more information about using the recommended method to sign requests yourself, see [Signature Version 4 signing process](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) in the *AWS General Reference*\. - -Regardless of the authentication method that you use, you might be required to provide additional security information\. For example, AWS recommends that you use multi\-factor authentication \(MFA\) to increase the security of your account\. To learn more, see [Multi\-factor authentication](https://docs.aws.amazon.com/singlesignon/latest/userguide/enable-mfa.html) in the *AWS IAM Identity Center \(successor to AWS Single Sign\-On\) User Guide* and [Using multi\-factor authentication \(MFA\) in AWS](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa.html) in the *IAM User Guide*\. - -### AWS account root user - - When you create an AWS account, you begin with one sign\-in identity that has complete access to all AWS services and resources in the account\. This identity is called the AWS account *root user* and is accessed by signing in with the email address and password that you used to create the account\. We strongly recommend that you don't use the root user for your everyday tasks\. Safeguard your root user credentials and use them to perform the tasks that only the root user can perform\. For the complete list of tasks that require you to sign in as the root user, see [Tasks that require root user credentials](https://docs.aws.amazon.com/accounts/latest/reference/root-user-tasks.html) in the *AWS Account Management Reference Guide*\. - -### IAM users and groups - -An *[IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)* is an identity within your AWS account that has specific permissions for a single person or application\. Where possible, we recommend relying on temporary credentials instead of creating IAM users who have long\-term credentials such as passwords and access keys\. However, if you have specific use cases that require long\-term credentials with IAM users, we recommend that you rotate access keys\. For more information, see [Rotate access keys regularly for use cases that require long\-term credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#rotate-credentials) in the *IAM User Guide*\. - -An [https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html) is an identity that specifies a collection of IAM users\. You can't sign in as a group\. You can use groups to specify permissions for multiple users at a time\. Groups make permissions easier to manage for large sets of users\. For example, you could have a group named *IAMAdmins* and give that group permissions to administer IAM resources\. - -Users are different from roles\. A user is uniquely associated with one person or application, but a role is intended to be assumable by anyone who needs it\. Users have permanent long\-term credentials, but roles provide temporary credentials\. To learn more, see [When to create an IAM user \(instead of a role\)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id.html#id_which-to-choose) in the *IAM User Guide*\. - -### IAM roles - -An *[IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)* is an identity within your AWS account that has specific permissions\. It is similar to an IAM user, but is not associated with a specific person\. You can temporarily assume an IAM role in the AWS Management Console by [switching roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-console.html)\. You can assume a role by calling an AWS CLI or AWS API operation or by using a custom URL\. For more information about methods for using roles, see [Using IAM roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) in the *IAM User Guide*\. - -IAM roles with temporary credentials are useful in the following situations: -+ **Federated user access** – To assign permissions to a federated identity, you create a role and define permissions for the role\. When a federated identity authenticates, the identity is associated with the role and is granted the permissions that are defined by the role\. For information about roles for federation, see [ Creating a role for a third\-party Identity Provider](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp.html) in the *IAM User Guide*\. If you use IAM Identity Center, you configure a permission set\. To control what your identities can access after they authenticate, IAM Identity Center correlates the permission set to a role in IAM\. For information about permissions sets, see [ Permission sets](https://docs.aws.amazon.com/singlesignon/latest/userguide/permissionsetsconcept.html) in the *AWS IAM Identity Center \(successor to AWS Single Sign\-On\) User Guide*\. -+ **Temporary IAM user permissions** – An IAM user or role can assume an IAM role to temporarily take on different permissions for a specific task\. -+ **Cross\-account access** – You can use an IAM role to allow someone \(a trusted principal\) in a different account to access resources in your account\. Roles are the primary way to grant cross\-account access\. However, with some AWS services, you can attach a policy directly to a resource \(instead of using a role as a proxy\)\. To learn the difference between roles and resource\-based policies for cross\-account access, see [How IAM roles differ from resource\-based policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_compare-resource-policies.html) in the *IAM User Guide*\. -+ **Cross\-service access** – Some AWS services use features in other AWS services\. For example, when you make a call in a service, it's common for that service to run applications in Amazon EC2 or store objects in Amazon S3\. A service might do this using the calling principal's permissions, using a service role, or using a service\-linked role\. - + **Principal permissions** – When you use an IAM user or role to perform actions in AWS, you are considered a principal\. Policies grant permissions to a principal\. When you use some services, you might perform an action that then triggers another action in a different service\. In this case, you must have permissions to perform both actions\. To see whether an action requires additional dependent actions in a policy, see [Actions, Resources, and Condition Keys for Amazon Translate](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazontranslate.html) in the *Service Authorization Reference*\. - + **Service role** – A service role is an [IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) that a service assumes to perform actions on your behalf\. An IAM administrator can create, modify, and delete a service role from within IAM\. For more information, see [Creating a role to delegate permissions to an AWS service](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html) in the *IAM User Guide*\. - + **Service\-linked role** – A service\-linked role is a type of service role that is linked to an AWS service\. The service can assume the role to perform an action on your behalf\. Service\-linked roles appear in your IAM account and are owned by the service\. An IAM administrator can view, but not edit the permissions for service\-linked roles\. -+ **Applications running on Amazon EC2** – You can use an IAM role to manage temporary credentials for applications that are running on an EC2 instance and making AWS CLI or AWS API requests\. This is preferable to storing access keys within the EC2 instance\. To assign an AWS role to an EC2 instance and make it available to all of its applications, you create an instance profile that is attached to the instance\. An instance profile contains the role and enables programs that are running on the EC2 instance to get temporary credentials\. For more information, see [Using an IAM role to grant permissions to applications running on Amazon EC2 instances](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html) in the *IAM User Guide*\. - -To learn whether to use IAM roles or IAM users, see [When to create an IAM role \(instead of a user\)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id.html#id_which-to-choose_role) in the *IAM User Guide*\. - -## Managing access using policies - -You control access in AWS by creating policies and attaching them to AWS identities or resources\. A policy is an object in AWS that, when associated with an identity or resource, defines their permissions\. AWS evaluates these policies when a principal \(user, root user, or role session\) makes a request\. Permissions in the policies determine whether the request is allowed or denied\. Most policies are stored in AWS as JSON documents\. For more information about the structure and contents of JSON policy documents, see [Overview of JSON policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json) in the *IAM User Guide*\. - -Administrators can use AWS JSON policies to specify who has access to what\. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**\. - -Every IAM entity \(user or role\) starts with no permissions\. By default, users can do nothing, not even change their own password\. To give a user permission to do something, an administrator must attach a permissions policy to a user\. Or the administrator can add the user to a group that has the intended permissions\. When an administrator gives permissions to a group, all users in that group are granted those permissions\. - -IAM policies define permissions for an action regardless of the method that you use to perform the operation\. For example, suppose that you have a policy that allows the `iam:GetRole` action\. A user with that policy can get role information from the AWS Management Console, the AWS CLI, or the AWS API\. - -### Identity\-based policies - -Identity\-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role\. These policies control what actions users and roles can perform, on which resources, and under what conditions\. To learn how to create an identity\-based policy, see [Creating IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the *IAM User Guide*\. - -Identity\-based policies can be further categorized as *inline policies* or *managed policies*\. Inline policies are embedded directly into a single user, group, or role\. Managed policies are standalone policies that you can attach to multiple users, groups, and roles in your AWS account\. Managed policies include AWS managed policies and customer managed policies\. To learn how to choose between a managed policy or an inline policy, see [Choosing between managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#choosing-managed-or-inline) in the *IAM User Guide*\. - -### Resource\-based policies - -Resource\-based policies are JSON policy documents that you attach to a resource\. Examples of resource\-based policies are IAM *role trust policies* and Amazon S3 *bucket policies*\. In services that support resource\-based policies, service administrators can use them to control access to a specific resource\. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions\. You must [specify a principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) in a resource\-based policy\. Principals can include accounts, users, roles, federated users, or AWS services\. - -Resource\-based policies are inline policies that are located in that service\. You can't use AWS managed policies from IAM in a resource\-based policy\. - -### Access control lists \(ACLs\) - -Access control lists \(ACLs\) control which principals \(account members, users, or roles\) have permissions to access a resource\. ACLs are similar to resource\-based policies, although they do not use the JSON policy document format\. - -Amazon S3, AWS WAF, and Amazon VPC are examples of services that support ACLs\. To learn more about ACLs, see [Access control list \(ACL\) overview](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) in the *Amazon Simple Storage Service Developer Guide*\. - -### Other policy types - -AWS supports additional, less\-common policy types\. These policy types can set the maximum permissions granted to you by the more common policy types\. -+ **Permissions boundaries** – A permissions boundary is an advanced feature in which you set the maximum permissions that an identity\-based policy can grant to an IAM entity \(IAM user or role\)\. You can set a permissions boundary for an entity\. The resulting permissions are the intersection of entity's identity\-based policies and its permissions boundaries\. Resource\-based policies that specify the user or role in the `Principal` field are not limited by the permissions boundary\. An explicit deny in any of these policies overrides the allow\. For more information about permissions boundaries, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide*\. -+ **Service control policies \(SCPs\)** – SCPs are JSON policies that specify the maximum permissions for an organization or organizational unit \(OU\) in AWS Organizations\. AWS Organizations is a service for grouping and centrally managing multiple AWS accounts that your business owns\. If you enable all features in an organization, then you can apply service control policies \(SCPs\) to any or all of your accounts\. The SCP limits permissions for entities in member accounts, including each AWS account root user\. For more information about Organizations and SCPs, see [How SCPs work](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html) in the *AWS Organizations User Guide*\. -+ **Session policies** – Session policies are advanced policies that you pass as a parameter when you programmatically create a temporary session for a role or federated user\. The resulting session's permissions are the intersection of the user or role's identity\-based policies and the session policies\. Permissions can also come from a resource\-based policy\. An explicit deny in any of these policies overrides the allow\. For more information, see [Session policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) in the *IAM User Guide*\. - -### Multiple policy types - -When multiple types of policies apply to a request, the resulting permissions are more complicated to understand\. To learn how AWS determines whether to allow a request when multiple policy types are involved, see [Policy evaluation logic](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) in the *IAM User Guide*\. - -## Allow users to view their own permissions - -This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity\. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API\. - -``` -{ - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "ViewOwnUserInfo", - "Effect": "Allow", - "Action": [ - "iam:GetUserPolicy", - "iam:ListGroupsForUser", - "iam:ListAttachedUserPolicies", - "iam:ListUserPolicies", - "iam:GetUser" - ], - "Resource": ["arn:aws:iam::*:user/${aws:username}"] - }, - { - "Sid": "NavigateInConsole", - "Effect": "Allow", - "Action": [ - "iam:GetGroupPolicy", - "iam:GetPolicyVersion", - "iam:GetPolicy", - "iam:ListAttachedGroupPolicies", - "iam:ListGroupPolicies", - "iam:ListPolicyVersions", - "iam:ListPolicies", - "iam:ListUsers" - ], - "Resource": "*" - } - ] -} -``` \ No newline at end of file diff --git a/doc_source/index.md b/doc_source/index.md deleted file mode 100644 index 89f60c7..0000000 --- a/doc_source/index.md +++ /dev/null @@ -1,81 +0,0 @@ -# Amazon Translate Developer Guide - ------ -*****Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.***** - ------ -Amazon's trademarks and trade dress may not be used in -connection with any product or service that is not Amazon's, -in any manner that is likely to cause confusion among customers, -or in any manner that disparages or discredits Amazon. All other -trademarks not owned by Amazon are the property of their respective -owners, who may or may not be affiliated with, connected to, or -sponsored by Amazon. - ------ -## Contents -+ [What is Amazon Translate?](what-is.md) -+ [Supported languages and language codes](what-is-languages.md) -+ [How Amazon Translate works](how-it-works.md) -+ [Getting started with Amazon Translate](getting-started.md) - + [Step 1: Set up an AWS account and create an administrator user](setting-up.md) - + [Step 2: Set up the AWS Command Line Interface (AWS CLI)](setup-awscli.md) - + [Step 3: Getting started (console)](get-started-console.md) - + [Step 4: Getting started (AWS CLI)](get-started-cli.md) - + [Step 5: Getting started (SDK)](get-started-sdk.md) - + [Translating text using the AWS SDK for Java](examples-java.md) - + [Translating text using the AWS SDK for Python (Boto)](examples-python.md) - + [Translating text using the AWS Mobile SDK for Android](getting-started-android.md) - + [Translating text using the AWS Mobile SDK for iOS](getting-started-ios.md) -+ [Translation processing modes](processing.md) - + [Real-time translation](sync.md) - + [Asynchronous batch processing with Amazon Translate](async.md) - + [Prerequisites for batch translation jobs](async-prereqs.md) - + [Running a batch translation job](async-start.md) - + [Monitoring and analyzing batch translation jobs](async-monitor.md) - + [Getting batch translation results](async-results.md) -+ [Customizing your translations with Amazon Translate](customizing-translations.md) - + [Using do-not-translate tags in Amazon Translate](customizing-translations-tags.md) - + [Customizing your translations with custom terminology](how-custom-terminology.md) - + [Creating a custom terminology](creating-custom-terminology.md) - + [Compatible languages](permissible-language-pairs.md) - + [Using custom terminologies](using-ct.md) - + [Encrypting your terminology](protect-terminology.md) - + [Best practices](ct-best-practices.md) - + [Masking profane words and phrases in Amazon Translate](customizing-translations-profanity.md) - + [Setting formality in Amazon Translate](customizing-translations-formality.md) - + [Customizing your translations with parallel data (Active Custom Translation)](customizing-translations-parallel-data.md) - + [Parallel data input files for Amazon Translate](customizing-translations-parallel-data-input-files.md) - + [Adding your parallel data to Amazon Translate](customizing-translations-parallel-data-adding.md) - + [Viewing and managing your parallel data in Amazon Translate](customizing-translations-parallel-data-managing.md) -+ [Examples](examples.md) - + [Using Amazon Polly with Amazon Translate](examples-polly.md) - + [Using Amazon Translate to translate a chat channel](examples-twitch.md) - + [Using Amazon Translate with Amazon DynamoDB](examples-ddb.md) - + [Using Amazon Translate to translate a web page](examples-web.md) - + [Using Amazon Translate to translate large documents](examples-split.md) - + [Using Signature Version 4 with Amazon Translate](examples-sigv4.md) -+ [Tagging your resources](tagging.md) - + [Tagging a new resource](tagging-newtags.md) - + [Viewing, updating, and deleting tags associated with a resource](tagging-existingtags.md) -+ [Security in Amazon Translate](security.md) - + [Data protection in Amazon Translate](data-protection.md) - + [Encryption at rest](encryption-at-rest.md) - + [Encryption in transit](encryption-in-transit.md) - + [Identity and access management for Amazon Translate](identity-and-access-management.md) - + [How Amazon Translate works with IAM](security_iam_service-with-iam.md) - + [Amazon Translate identity-based policy examples](security_iam_id-based-policy-examples.md) - + [Troubleshooting Amazon Translate identity and access](security_iam_troubleshoot.md) - + [Amazon Translate API permissions: Actions, resources, and conditions reference](translate-api-permissions-ref.md) - + [Monitoring Amazon Translate](monitoring-translate.md) - + [Logging Amazon Translate API calls with AWS CloudTrail](logging-using-cloudtrail.md) - + [CloudWatch metrics and dimensions for Amazon Translate](translate-cloudwatch.md) - + [Monitoring Amazon Translate events with Amazon EventBridge](monitoring-with-eventbridge.md) - + [Compliance validation for Amazon Translate](compliance.md) - + [Resilience in Amazon Translate](disaster-recovery-resiliency.md) - + [Infrastructure security in Amazon Translate](infrastructure-security.md) - + [Amazon Translate and interface VPC endpoints (AWS PrivateLink)](vpc-interface-endpoints.md) -+ [Guidelines and limits](what-is-limits.md) -+ [Document history for Amazon Translate](doc-history.md) -+ [API reference](api_reference.md) -+ [AWS glossary](glossary.md) \ No newline at end of file diff --git a/doc_source/infrastructure-security.md b/doc_source/infrastructure-security.md deleted file mode 100644 index de5b360..0000000 --- a/doc_source/infrastructure-security.md +++ /dev/null @@ -1,7 +0,0 @@ -# Infrastructure security in Amazon Translate - -As a managed service, Amazon Translate is protected by the AWS global network security procedures that are described in the [Amazon Web Services: Overview of Security Processes](https://d0.awsstatic.com/whitepapers/Security/AWS_Security_Whitepaper.pdf) whitepaper\. - -To access Amazon Translate through the network, you use AWS published API calls\. Clients must support Transport Layer Security \(TLS\) 1\.0 or later\. We recommend TLS 1\.2 or later\. Clients must also support cipher suites with perfect forward secrecy \(PFS\), such as Ephemeral Diffie\-Hellman \(DHE\) or Elliptic Curve Ephemeral Diffie\-Hellman \(ECDHE\)\. Most modern systems, such as Java 7 and later, support these modes\. - -Additionally, requests must be signed by using an access key ID and a secret access key that is associated with an AWS Identity and Access Management \(IAM\) principal\. Or you can use the [AWS Security Token Service](https://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html) \(AWS STS\) to generate temporary security credentials to sign requests\. \ No newline at end of file diff --git a/doc_source/logging-using-cloudtrail.md b/doc_source/logging-using-cloudtrail.md deleted file mode 100644 index 1aea76d..0000000 --- a/doc_source/logging-using-cloudtrail.md +++ /dev/null @@ -1,68 +0,0 @@ -# Logging Amazon Translate API calls with AWS CloudTrail - -Amazon Translate is integrated with AWS CloudTrail, a service that provides a record of actions taken by an IAM user, IAM role, or AWS service in Amazon Translate\. CloudTrail captures all API calls for Amazon Translate as events\. This includes calls from the Amazon Translate console and code calls to the Amazon Translate API operations\. If you create a CloudTrail trail, you can enable continuous delivery of CloudTrail events, including events for Amazon Translate, to an Amazon Simple Storage Service \(Amazon S3\) bucket\. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in **Event history**\. You can use the information collected by CloudTrail to determine the request that was made to Amazon Translate, the IP address from which the request was made, who made the request, when it was made, and additional details\. - -To learn more about CloudTrail, see the [AWS CloudTrail User Guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)\. - -**Topics** -+ [Amazon Translate information in CloudTrail](#translate-info-in-cloudtrail) -+ [Understanding Amazon Translate log file entries](#understanding-translate-entries) - -## Amazon Translate information in CloudTrail - -CloudTrail is enabled on your AWS account when you create the account\. When activity occurs in Amazon Translate, that activity is recorded in a CloudTrail event along with other AWS service events in **Event history**\. You can view, search, and download recent events in your AWS account\. For more information, see [Viewing Events with CloudTrail Event History](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)\. - -For an ongoing record of events in your AWS account, including events for Amazon Translate, create a trail\. A *trail* enables CloudTrail to deliver log files to an Amazon S3 bucket\. By default, when you create a trail with the console, the trail applies to all AWS Regions\. The trail logs events from all Regions in the AWS partition and delivers the log files to the S3 bucket that you specify\. You can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs\. For more information, see the following: -+ [Overview for creating a trail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html) -+ [ CloudTrail Supported services and integrations](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-integrations) -+ [Configuring Amazon SNS notifications for CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/getting_notifications_top_level.html) -+ [Receiving CloudTrail log files from multiple tegions](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html) and [Receiving CloudTrail log files from multiple accounts](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html) - -All Amazon Translate actions are logged by CloudTrail and are documented in the [API reference section](https://docs.aws.amazon.com/translate/latest/dg/API_Operations.html)\. For example, calls to the `DeleteTerminology`, `ImportTerminology` and `TranslateText` actions generate entries in the CloudTrail log files\. - -Every event or log entry contains information about who generated the request\. This information helps you determine the following: -+ Whether the request was made with root or AWS Identity and Access Management \(IAM\) user credentials -+ Whether the request was made with temporary security credentials for a role or federated user -+ Whether the request was made by another AWS service - -For more information, see the [CloudTrail userIdentity element](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html)\. - -## Understanding Amazon Translate log file entries - -A *trail* is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify\. CloudTrail log files contain one or more log entries\. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on\. CloudTrail log files aren't an ordered stack trace of the public API calls, so they don't appear in any specific order\. - -The following example shows a CloudTrail log entry that demonstrates the `TranslateText` action\. - -``` -{ - "eventVersion": "1.05", - "userIdentity": { - "type": "IAMUser", - "principalId": "AIDACKCEVSQ6C2EXAMPLE", - "arn": "arn:aws:iam::111122223333:user/Administrator", - "accountId": "111122223333", - "accessKeyId": "AKIAIOSFODNN7EXAMPLE", - "userName": "Administrator" - }, - "eventTime": "2019-09-03T20:32:50Z", - "eventSource": "translate.amazonaws.com", - "eventName": "TranslateText", - "awsRegion": "us-west-2", - "sourceIPAddress": "192.0.2.0", - "userAgent": "aws-cli/1.16.207 Python/3.4.7 Linux/4.9.184-0.1.ac.235.83.329.metal1.x86_64 botocore/1.12.197", - "requestParameters": { - "text": "HIDDEN_DUE_TO_SECURITY_REASONS", - "sourceLanguageCode": "en", - "targetLanguageCode": "fr" - }, - "responseElements": { - "translatedText": "HIDDEN_DUE_TO_SECURITY_REASONS", - "sourceLanguageCode": "en", - "targetLanguageCode": "fr" - }, - "requestID": "f56da956-284e-4983-b6fc-59befa20e2bf", - "eventID": "1dc75278-84d7-4bb2-861a-493d08d67391", - "eventType": "AwsApiCall", - "recipientAccountId": "111122223333" -} -``` \ No newline at end of file diff --git a/doc_source/monitoring-translate.md b/doc_source/monitoring-translate.md deleted file mode 100644 index 12e8b31..0000000 --- a/doc_source/monitoring-translate.md +++ /dev/null @@ -1,60 +0,0 @@ -# Monitoring Amazon Translate - -Monitoring is an important part of maintaining the reliability, availability, and performance of Amazon Translate and your solutions\. AWS provides various tools that you can use to monitor Amazon Translate\. You can configure some of these tools to monitor your solutions for you\. We recommend that you automate monitoring tasks as much as possible\. - -Amazon Translate provides preconfigured graphs that show you the most important metrics for your solution\. Each graph offers a window into your solution's performance\. To get different views of how your solution is performing over time, you can change the time range that the graphs show\. - -You can also use Amazon CloudWatch to monitor Amazon Translate\. With CloudWatch, you can automate monitoring specific metrics for your solutions\. You receive a notice whenever a metric is outside of the thresholds that you set\. You can also use the CloudWatch API to create a custom monitoring application that is suitable for your needs\. For more information, see [What is Amazon CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatch.html) in the *Amazon CloudWatch User Guide*\. - -The following table describes each of the preconfigured graphs provided by Amazon Translate\. - - -| Graph | Description | -| --- | --- | -| ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/translate/latest/dg/images/metric-successful-request-count.png) | Successful request count The number of successful requests made to Amazon Translate during the specified time period\. | -| ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/translate/latest/dg/images/metric-throttled-request-count.png) | Throttled request countThe number of requests to Amazon Translate that were throttled during the specified time period\. Use this information to determine if your application is sending requests to Amazon Translate too quickly\. | -| ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/translate/latest/dg/images/metric-average-response-time.png) | Average response time The average length of time that it took Amazon Translate to process your request during the specified time period\. | -| ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/translate/latest/dg/images/metric-character-count.png) | Character countThe total number of characters that you sent to Amazon Translate during the specified time period\. This is the number of characters that you will be billed for\. | -| ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/translate/latest/dg/images/metric-user-error-count.png) | User error countThe number of user errors that occurred during the specified time period\. User errors are in the HTTP error code range 400\-499\. | -| ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/translate/latest/dg/images/metric-system-error-count.png) | System error countThe number of system errors that occurred during the specified time period\. System errors are in the HTTP error code range 500\-599\. | - -## Monitoring Amazon Translate - -With Amazon CloudWatch, you can get metrics for individual Amazon Translate operations or global Amazon Translate metrics for your account\. Use metrics to track the health of your Amazon Translate solutions and to set up alarms to notify you when one or more metrics fall outside a defined threshold\. For example, you can monitor the number of requests made to Amazon Translate in a particular time period, see the latency of requests, or raise an alarm when errors exceed a threshold\. - -### Understanding CloudWatch metrics for Amazon Translate - -To get metrics for your Amazon Translate operations, you specify the following information: -+ The metric dimension\. A *dimension* is a set of name\-value pairs that you use to identify a metric\. Amazon Translate has two dimensions: - + `Operation` - + `Language pair` -+ The metric name, such as `SuccessfulRequestCount` or `RequestCharacters`\. For a complete list of metrics, see [CloudWatch Metrics for Amazon Translate](translate-cloudwatch.md#translate-cloudwatch-metrics)\. - -You can get metrics for Amazon Translate with the AWS Management Console, the AWS CLI, or the CloudWatch API\. You can use the CloudWatch API through one of the Amazon AWS Software Development Kits \(SDKs\) or the CloudWatch API tools\. - -The following table lists some common uses for CloudWatch metrics\. These are suggestions to get you started, not a comprehensive list\. - - -| How do I? | Monitor this metric | -| --- | --- | -| Track the number of successful requests | The sum statistic of the SuccessfulRequestCount metric | -| Know if my application has reached its maximum throughput | The sum statistic of the ThrottledCount metric | -| Find the response time for my application | The average statistic of the ResponseTime metric | -| Find the number of errors for my application | The sum statistic of the ServerErrorCount and UserErrorCount metrics | -| Find the number of billable characters | The sum statistic of the CharacterCount metric | - -You must have the appropriate CloudWatch permissions to monitor Amazon Translate with CloudWatch For more information, see [ Authentication and Access Control for Amazon CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/auth-and-access-control-cw.html) in the *Amazon CloudWatch User Guide*\. - -### Viewing Amazon Translate metrics - -View Amazon Translate metrics in the CloudWatch console\. - -**To view metrics \(CloudWatch console\)** - -1. Sign in to the AWS Management Console and open the CloudWatch console at [https://console\.aws\.amazon\.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/)\. - -1. Choose **Metrics**, choose **All Metrics**, and then choose **AWS/Translate**\. - -1. Choose the dimension, choose a metric name, and choose **Add to graph**\. - -1. Choose a value for the date range\. The metric count for the specified date range is displayed in the graph\. \ No newline at end of file diff --git a/doc_source/monitoring-with-eventbridge.md b/doc_source/monitoring-with-eventbridge.md deleted file mode 100644 index 34ab54d..0000000 --- a/doc_source/monitoring-with-eventbridge.md +++ /dev/null @@ -1,99 +0,0 @@ -# Monitoring Amazon Translate events with Amazon EventBridge - -Amazon Translate integrates with Amazon EventBridge to notify you about changes that affect your translation jobs and parallel data resources\. Events from AWS services are delivered to EventBridge in near real time\. You can write simple rules to indicate which events are of interest to you, and what automated actions to take when an event matches a rule\. For example, actions that can be automatically started include: -+ Invoking an AWS Lambda function -+ Invoking AWS Systems Manager Run Command -+ Relaying the event to Amazon Kinesis Data Streams -+ Activating an AWS Step Functions state machine -+ Notifying an Amazon SNS topic or an Amazon SQS queue - -For more information, see [Creating Amazon EventBridge rules that react to events](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule.html) in the *Amazon EventBridge User Guide*\. - -## Amazon Translate events - -The following are example events from Amazon Translate\. - -### Events for batch translation jobs - -You run batch translation jobs by using the Amazon Translate console or the [StartTextTranslationJob](https://docs.aws.amazon.com/translate/latest/APIReference/API_StartTextTranslationJob.html) operation\. Amazon Translate sends events when these jobs are complete, either successfully or unsuccessfully\. These events resemble the following example\. - -``` -{ - "version": "0", - "id": "CWE-event-id", - "detail-type": "Translate TextTranslationJob State Change", - "source": "aws.translate", - "account": "111122223333", - "time": "2017-04-22T03:31:47Z", - "region": "us-east-1", - "resources": [], - "detail": { - "jobId": "01234567-0123-0123-0123-012345678901", - "jobStatus": "STATUS" - } -} -``` - -The value for the `jobStatus` attribute depends on the job state that Amazon Translate sent the event for\. The `jobStatus` values are: -+ `COMPLETED` – The job has successfully completed and the output is available\. -+ `COMPLETED_WITH_ERROR` – The job has completed with errors\. The errors can be analyzed in the job's output\. -+ `STOPPED` – The job has been stopped\. -+ `FAILED` – The job did not complete\. To get details, use the [DescribeTextTranslationJob](https://docs.aws.amazon.com/translate/latest/APIReference/API_DescribeTextTranslationJob.html) operation\. - -### Events for parallel data resources - -When you use Amazon Translate to create or update a parallel data resource, it sends an event to indicate whether the operation succeeded or failed\. - -You create parallel data resources by using the Amazon Translate console or the [CreateParallelData](https://docs.aws.amazon.com/translate/latest/APIReference/API_CreateParallelData.html) operation\. When you do this, Amazon Translate sends an event like the following\. - -``` -{ - "version": "0", - "id": "CWE-event-id", - "detail-type": "Translate Parallel Data State Change", - "source": "aws.translate", - "account": "111122223333", - "time": "2017-04-22T03:31:47Z", - "region": "us-east-1", - "resources": [arn:aws:translate:us-east-1:111122223333:parallel-data/ExampleParallelData], - "detail": { - "operation": "CreateParallelData", - "name": "ExampleParallelData", - "status": "STATUS" - } -} -``` - -Values for the `status` attribute are: -+ `ACTIVE` – The `CreateParallelData `operation succeeded, and the resource is ready for you to use\. -+ `FAILED` – The `CreateParallelData` operation failed\. - -You update parallel data resources by using the Amazon Translate console or the [UpdateParallelData](https://docs.aws.amazon.com/translate/latest/APIReference/API_UpdateParallelData.html) operation\. When you do this, Amazon Translate sends an event like the following\. - -``` -{ - "version": "0", - "id": "CWE-event-id", - "detail-type": "Translate Parallel Data State Change", - "source": "aws.translate", - "account": "111122223333", - "time": "2017-04-22T03:31:47Z", - "region": "us-east-1", - "resources": [arn:aws:translate:us-east-1:111122223333:parallel-data/ExampleParallelData], - "detail": { - "operation": "UpdateParallelData", - "name": "ExampleParallelData", - "status": "STATUS", - "latestUpdateAttemptStatus": "STATUS", - "latestUpdateAttemptAt": "2017-04-22T03:31:47Z" - } -} -``` - -The `status` attribute provides the status of the prior version of the parallel data resource, which is being replaced by the update\. Values are: -+ `ACTIVE` – The prior version was created or updated successfully\. -+ `FAILED` – The prior version failed to be created or updated\. - -The `latestUpdateAttemptStatus` attribute provides the status of the new version of the parallel data resource, which is being created by the update\. Values are: -+ `ACTIVE` – The `UpdateParallelData` operation succeeded, and the updated resource is ready for you to use\. -+ `FAILED` – The `UpdateParallelData` operation failed\. \ No newline at end of file diff --git a/doc_source/permissible-language-pairs.md b/doc_source/permissible-language-pairs.md deleted file mode 100644 index 4f795da..0000000 --- a/doc_source/permissible-language-pairs.md +++ /dev/null @@ -1,26 +0,0 @@ -# Compatible languages - -Some languages do not change the shape of a word based on sentence context\. With these languages, applying a custom terminology is most likely to improve overall translation quality\. However, some languages do have extensive word shape changes\. We do not recommend applying the custom terminology feature to those languages, but we do not restrict you from doing so\. - -## Recommended - -We recommend the following languages for use with custom terminology: -+ Germanic languages \(Danish, Dutch, English, German, Norwegian, Swedish\) -+ Indo\-Iranian languages \(Hindi, Persian, Urdu\) -+ Romance languages \(French, Italian, Romanian, Spanish, Portuguese\) -+ Chinese -+ Greek -+ Indonesian -+ Japanese -+ Malay -+ Thai -+ Vietnamese - -## Not recommended - -We do not recommend the following languages for use with custom terminology: -+ Balto\-Slavic languages \(Czech, Polish, Russian, Ukrainian\) -+ Semitic languages \(Arabic, Hebrew\) -+ Uralic languages \(Finnish, Hungarian\) -+ Korean -+ Turkish \ No newline at end of file diff --git a/doc_source/processing.md b/doc_source/processing.md deleted file mode 100644 index 8ceb953..0000000 --- a/doc_source/processing.md +++ /dev/null @@ -1,5 +0,0 @@ -# Translation processing modes - -When translating documents, you can use two different translation processing modes: real\-time translation or asynchronous batch processing\. The mode you use is based on the size and type of the target documents and affects how you submit the translation job and view its results\. -+ [Real\-time translation](sync.md) – You call Amazon Translate on a small field of text and a synchronous response is immediately sent to your application\. -+ [Asynchronous batch processing](async.md) – You put a collection of documents in an Amazon Simple Storage Service \(Amazon S3\) bucket and start an asynchronous processing job to translate them\. Amazon Translate sends the translated output document to a specified Amazon S3 bucket\. \ No newline at end of file diff --git a/doc_source/protect-terminology.md b/doc_source/protect-terminology.md deleted file mode 100644 index 0eb771c..0000000 --- a/doc_source/protect-terminology.md +++ /dev/null @@ -1,8 +0,0 @@ -# Encrypting your terminology - -Amazon Translate endeavors to protect all of your data and your custom terminologies are no different\. When created, each custom terminology is encrypted so it accessible only by you\. - -Three encryption options are available: -+ Using AWS encryption\. This is the default option and is used to safeguard your information if you don't choose another method\. -+ Using an encryption key associated with your account\. If this is chosen, a menu in the console provides you with a choice of associated encryption keys to use\. -+ Using an encryption key not associated with your account\. If you choose this option, a box is displayed in the console for you to enter the Amazon Resource Name \(ARN\) of the encryption key\. \ No newline at end of file diff --git a/doc_source/security.md b/doc_source/security.md deleted file mode 100644 index 86b042c..0000000 --- a/doc_source/security.md +++ /dev/null @@ -1,18 +0,0 @@ -# Security in Amazon Translate - -Cloud security at AWS is the highest priority\. As an AWS customer, you benefit from a data center and network architecture that is built to meet the requirements of the most security\-sensitive organizations\. - -Security is a shared responsibility between AWS and you\. The [shared responsibility model](http://aws.amazon.com/compliance/shared-responsibility-model/) describes this as security *of* the cloud and security *in* the cloud: -+ **Security of the cloud** – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud\. AWS also provides you with services that you can use securely\. Third\-party auditors regularly test and verify the effectiveness of our security as part of the [AWS compliance programs](http://aws.amazon.com/compliance/programs/)\. To learn about the compliance programs that apply to Amazon Translate, see [AWS Services in Scope by Compliance Program](http://aws.amazon.com/compliance/services-in-scope/)\. -+ **Security in the cloud** – Your responsibility is determined by the AWS service that you use\. You are also responsible for other factors, including the sensitivity of your data, your company’s requirements, and applicable laws and regulations\. - -This topic helps you understand how to apply the shared responsibility model when using AWS\. The following topics show you how to configure AWS to meet your security and compliance objectives\. You also learn how to use other AWS services that help you to monitor and secure your AWS resources\. - -**Topics** -+ [Data protection in Amazon Translate](data-protection.md) -+ [Identity and access management for Amazon Translate](identity-and-access-management.md) -+ [Monitoring Amazon Translate](monitoring-translate.md) -+ [Compliance validation for Amazon Translate](compliance.md) -+ [Resilience in Amazon Translate](disaster-recovery-resiliency.md) -+ [Infrastructure security in Amazon Translate](infrastructure-security.md) -+ [Amazon Translate and interface VPC endpoints \(AWS PrivateLink\)](vpc-interface-endpoints.md) \ No newline at end of file diff --git a/doc_source/security_iam_id-based-policy-examples.md b/doc_source/security_iam_id-based-policy-examples.md deleted file mode 100644 index 904f859..0000000 --- a/doc_source/security_iam_id-based-policy-examples.md +++ /dev/null @@ -1,138 +0,0 @@ -# Amazon Translate identity\-based policy examples - -By default, IAM users and roles don't have permission to create or modify Amazon Translate resources\. They also can't perform tasks using the AWS Management Console, AWS CLI, or AWS API\. An IAM administrator must create IAM policies that grant users and roles permission to perform specific API operations on the specific resources that they need\. The administrator must then attach those policies to the IAM users or groups that require those permissions\. - -To learn how to create an IAM identity\-based policy using the following example JSON policy documents, see [Creating Policies on the JSON Tab](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html#access_policies_create-json-editor) in the *IAM User Guide*\. - -**Topics** -+ [Identity\-based policy best practices](#security_iam_service-with-iam-policy-best-practices) -+ [Using the Amazon Translate console](#security_iam_id-based-policy-examples-console) -+ [Permissions for using customer managed keys with custom terminologies](#kms-permissions) - -## Identity\-based policy best practices - -Identity\-based policies determine whether someone can create, access, or delete Amazon Translate resources in your account\. These actions can incur costs for your AWS account\. When you create or edit identity\-based policies, follow these guidelines and recommendations: -+ **Get started with AWS managed policies and move toward least\-privilege permissions** – To get started granting permissions to your users and workloads, use the *AWS managed policies* that grant permissions for many common use cases\. They are available in your AWS account\. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases\. For more information, see [AWS managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) or [AWS managed policies for job functions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html) in the *IAM User Guide*\. -+ **Apply least\-privilege permissions** – When you set permissions with IAM policies, grant only the permissions required to perform a task\. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as *least\-privilege permissions*\. For more information about using IAM to apply permissions, see [ Policies and permissions in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) in the *IAM User Guide*\. -+ **Use conditions in IAM policies to further restrict access** – You can add a condition to your policies to limit access to actions and resources\. For example, you can write a policy condition to specify that all requests must be sent using SSL\. You can also use conditions to grant access to service actions if they are used through a specific AWS service, such as AWS CloudFormation\. For more information, see [ IAM JSON policy elements: Condition](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) in the *IAM User Guide*\. -+ **Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions** – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language \(JSON\) and IAM best practices\. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies\. For more information, see [IAM Access Analyzer policy validation](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-validation.html) in the *IAM User Guide*\. -+ **Require multi\-factor authentication \(MFA\)** – If you have a scenario that requires IAM users or root users in your account, turn on MFA for additional security\. To require MFA when API operations are called, add MFA conditions to your policies\. For more information, see [ Configuring MFA\-protected API access](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html) in the *IAM User Guide*\. - -For more information about best practices in IAM, see [Security best practices in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) in the *IAM User Guide*\. - -## Using the Amazon Translate console - -To access the Amazon Translate console, you must have a minimum set of permissions\. These permissions must allow you to list and view details about the Amazon Translate resources in your AWS account\. If you create an identity\-based policy that is more restrictive than the minimum required permissions, the console won't function as intended for entities \(IAM users or roles\) with that policy\. - -To ensure that those entities can still use the Amazon Translate console, also attach the following AWS managed policy to the entities\. - -``` -{ - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "translate:*", - "comprehend:DetectDominantLanguage", - "cloudwatch:GetMetricStatistics", - "cloudwatch:ListMetrics" - ], - "Resource": "*" - - } - ] -} -``` - -The policy has four statements\. The first grants permissions to use the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation\. The second grants permissions to the Amazon Comprehend `DetectDominantLanguage` operation to enable automatic language detection\. The final two permissions grant permissions to Amazon CloudWatch to provide metrics support\. - -You don't need to allow minimum console permissions for users that are making calls only to the AWS CLI or the AWS API\. Instead, allow access to only the actions that match the API operation that they're trying to perform\. For more information, see [Adding Permissions to a User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console) in the *IAM User Guide*\. - -## Permissions for using customer managed keys with custom terminologies - -If you use AWS Key Management Service \(AWS KMS\) customer managed keys with Amazon Translate custom terminologies, you might need additional permissions in your KMS key policy\. - -To call the `ImportTerminology` operation with a customer managed key, add the following permissions to your existing KMS key policy\. - -``` -{ - "Id": "key-consolepolicy-3", - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "Allow access for use with Amazon Translate", - "Effect": "Allow", - "Principal": { - "AWS": "IAM USER OR ROLE ARN" - }, - "Action": [ - "kms:CreateAlias", - "kms:CreateGrant", - "kms:DescribeKey", - "kms:GenerateDataKey", - "kms:GetKeyPolicy", - "kms:PutKeyPolicy", - "kms:RetireGrant" - ], - "Resource": "*" - } - ] -} -``` - -To call the `GetTerminology` operation for a custom terminology that was imported with a KMS customer managed key, add the following permissions in the KMS key policy\. - -``` -{ - "Id": "key-consolepolicy-3", - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "Allow access for use with Amazon Translate", - "Effect": "Allow", - "Principal": { - "AWS": "IAM USER OR ROLE ARN" - }, - "Action": [ - "kms:Decrypt", - "kms:GetKeyPolicy", - "kms:PutKeyPolicy" - ], - "Resource": "*" - } - ] -} -``` - -To call the `ListTerminologies` or `DeleteTermionlogy` operations for a custom terminology that was imported with a customer managed key, you don't need to have any special AWS KMS permissions\. - -To use customer managed keys with all custom terminologies operations, add the following permissions in the KMS key policy\. - -``` -{ - "Id": "key-consolepolicy-3", - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "Allow access for use with Amazon Translate", - "Effect": "Allow", - "Principal": { - "AWS": "IAM USER OR ROLE ARN" - }, - "Action": [ - "kms:CreateGrant", - "kms:Decrypt", - "kms:DescribeKey", - "kms:GenerateDataKey", - "kms:GetKeyPolicy", - "kms:PutKeyPolicy", - "kms:RetireGrant" - ], - "Resource": "*" - } - ] -} -``` - -For the Amazon Translate API actions and the resources that they apply to, see [Amazon Translate API permissions: Actions, resources, and conditions reference](translate-api-permissions-ref.md)\. \ No newline at end of file diff --git a/doc_source/security_iam_service-with-iam.md b/doc_source/security_iam_service-with-iam.md deleted file mode 100644 index 9f33d5e..0000000 --- a/doc_source/security_iam_service-with-iam.md +++ /dev/null @@ -1,85 +0,0 @@ -# How Amazon Translate works with IAM - -You can manage access to Amazon Translate operations and resources with AWS Identity and Access Management\. Before you use AWS Identity and Access Management \(IAM\) to manage access to Amazon Translate, you should understand which IAM features are available to use with Amazon Translate\. To get a high\-level view of how Amazon Translate and other AWS services work with IAM, see [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) in the *IAM User Guide*\. - -**Topics** -+ [Amazon Translate identity\-based policies](#access-control-managing-permissions) -+ [Amazon Translate resource\-based policies](#security_iam_service-with-iam-resource-based-policies) -+ [Authorization based on Amazon Translate tags](#security_iam_service-with-iam-tags) -+ [Amazon Translate IAM roles](#security_iam_service-with-iam-roles) - -## Amazon Translate identity\-based policies - -With IAM identity\-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied\. Amazon Translate supports specific actions, resources, and condition keys\. To learn about all of the elements that you use in a JSON policy, see [IAM JSON policy elements reference](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html) in the *IAM User Guide*\. - -### Actions - -Administrators can use AWS JSON policies to specify who has access to what\. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**\. - -The `Action` element of a JSON policy describes the actions that you can use to allow or deny access in a policy\. Policy actions usually have the same name as the associated AWS API operation\. There are some exceptions, such as *permission\-only actions* that don't have a matching API operation\. There are also some operations that require multiple actions in a policy\. These additional actions are called *dependent actions*\. - -Include actions in a policy to grant permissions to perform the associated operation\. - - - -Policy actions in Amazon Translate use the following prefix before the action: `translate:`\. For example, to grant someone permission to perform a translation with the Amazon Translate `TranslateText` API operation, log in as an admin and include the `translate:TranslateText` action in their policy\. Policy statements must include either an `Action` or `NotAction` element\. Amazon Translate defines its own set of actions that describe tasks that you can perform with this service\. To see a list of Amazon Translate actions, see [Actions defined by Amazon Translate](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazontranslate.html#amazontranslate-actions-as-permissions) in the *IAM User Guide*\. - -To specify multiple actions in a single statement, separate them with commas as follows: - -``` -"Action": [ - "translate:action1", - "translate:action2" -``` - -### Resources - -Amazon Translate doesn't support specifying resource Amazon Resource Names \(ARNs\) in a policy\. - -### Condition keys - -Amazon Translate doesn't provide any service\-specific condition keys, but it does support using some global condition keys\. To see all AWS global condition keys, see [AWS Global condition context keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html) in the *IAM User Guide*\. - -Administrators can use AWS JSON policies to specify who has access to what\. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**\. - -The `Condition` element \(or `Condition` *block*\) lets you specify conditions in which a statement is in effect\. The `Condition` element is optional\. You can create conditional expressions that use [condition operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html), such as equals or less than, to match the condition in the policy with values in the request\. - -If you specify multiple `Condition` elements in a statement, or multiple keys in a single `Condition` element, AWS evaluates them using a logical `AND` operation\. If you specify multiple values for a single condition key, AWS evaluates the condition using a logical `OR` operation\. All of the conditions must be met before the statement's permissions are granted\. - - You can also use placeholder variables when you specify conditions\. For example, you can grant an IAM user permission to access a resource only if it is tagged with their IAM user name\. For more information, see [IAM policy elements: variables and tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html) in the *IAM User Guide*\. - -AWS supports global condition keys and service\-specific condition keys\. To see all AWS global condition keys, see [AWS global condition context keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html) in the *IAM User Guide*\. - -### Examples - - - -To see examples of Amazon Translate identity\-based policies, see [Amazon Translate identity\-based policy examples](security_iam_id-based-policy-examples.md)\. - -## Amazon Translate resource\-based policies - -Amazon Translate doesn't support resource\-based policies\. - -## Authorization based on Amazon Translate tags - -Amazon Translate supports tags for **Parallel Data** and **Import Terminology**\. - -You can use the tags to provide tag\-based access control\. You add tags to a resource and then create IAM policies to allow or restrict access to the resource based on its tags\. For more information on using tags with IAM, see [Controlling access using tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) in the *IAM User Guide*\. - -For details about the Amazon Translate resource types, see [ Actions, resources, and condition keys for Amazon Translate ](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazontranslate.html) in the *Service Authorization Reference*\. - -## Amazon Translate IAM roles - -An [IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) is an entity within your AWS account that has specific permissions\. - -### Using temporary credentials with Amazon Translate - -You can use temporary credentials to sign in with federation, assume an IAM role, or to assume a cross\-account role\. You obtain temporary security credentials by calling AWS Security Token Service \(AWS STS\) API operations such as [AssumeRole](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) or [GetFederationToken](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetFederationToken.html)\. - -Amazon Translate supports using temporary credentials\. - -### Service\-linked roles - -[Service\-linked roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role) allow AWS services to access resources in other services to complete an action on your behalf\. Service\-linked roles appear in your IAM account and are owned by the service\. An IAM administrator can view, but not edit\. the permissions for service\-linked roles\. - -Amazon Translate doesn't support service\-linked roles\. \ No newline at end of file diff --git a/doc_source/security_iam_troubleshoot.md b/doc_source/security_iam_troubleshoot.md deleted file mode 100644 index dcd399f..0000000 --- a/doc_source/security_iam_troubleshoot.md +++ /dev/null @@ -1,66 +0,0 @@ -# Troubleshooting Amazon Translate identity and access - -Use the following information to help you diagnose and fix common issues that you might encounter when working with Amazon Translate and AWS Identity and Access Management \(IAM\)\. - -**Topics** -+ [I Am not authorized to perform an action in Amazon Translate](#security_iam_troubleshoot-no-permissions) -+ [I Am not authorized to perform iam:PassRole](#security_iam_troubleshoot-passrole) -+ [I want to view my access keys](#security_iam_troubleshoot-access-keys) -+ [I'm an administrator and want to allow others to access Amazon Translate](#security_iam_troubleshoot-admin-delegate) -+ [I want to allow people outside of my AWS account to access my Amazon Translate resources](#security_iam_troubleshoot-cross-account-access) - -## I Am not authorized to perform an action in Amazon Translate - -If the AWS Management Console tells you that you're not authorized to perform an action, contact your administrator for assistance\. Your administrator is the person that provided you with your user name and password\. - -For example, the following error occurs when the `mateojackson` IAM user tries to use the console to translate text but doesn't have the `translate:TranslateText` permission\. - -``` -User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: translate:TranslateText -``` - -Mateo would ask his administrator to update his policies to allow him to use the `translate:TranslateText` action\. - -## I Am not authorized to perform iam:PassRole - -If you receive an error that you're not authorized to perform the `iam:PassRole` action, your policies must be updated to allow you to pass a role to Amazon Translate\. - -Some AWS services allow you to pass an existing role to that service instead of creating a new service role or service\-linked role\. To do this, you must have permissions to pass the role to the service\. - -The following example error occurs when an IAM user named `marymajor` tries to use the console to perform an action in Amazon Translate\. However, the action requires the service to have permissions that are granted by a service role\. Mary does not have permissions to pass the role to the service\. - -``` -User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole -``` - -In this case, Mary's policies must be updated to allow her to perform the `iam:PassRole` action\. - -If you need help, contact your AWS administrator\. Your administrator is the person who provided you with your sign\-in credentials\. - -## I want to view my access keys - -After you create your IAM user access keys, you can view your access key ID at any time\. However, you can't view your secret access key again\. If you lose your secret key, you must create a new access key pair\. - -Access keys consist of two parts: an access key ID \(for example, `AKIAIOSFODNN7EXAMPLE`\) and a secret access key \(for example, `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`\)\. Like a user name and password, you must use both the access key ID and secret access key together to authenticate your requests\. Manage your access keys as securely as you do your user name and password\. - -**Important** - Do not provide your access keys to a third party, even to help [find your canonical user ID](https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html#FindingCanonicalId)\. By doing this, you might give someone permanent access to your account\. - -When you create an access key pair, you are prompted to save the access key ID and secret access key in a secure location\. The secret access key is available only at the time you create it\. If you lose your secret access key, you must add new access keys to your IAM user\. You can have a maximum of two access keys\. If you already have two, you must delete one key pair before creating a new one\. To view instructions, see [Managing access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) in the *IAM User Guide*\. - -## I'm an administrator and want to allow others to access Amazon Translate - -To allow others to access Amazon Translate, you must create an IAM entity \(user or role\) for the person or application that needs access\. They will use the credentials for that entity to access AWS\. You must then attach a policy to the entity that grants them the correct permissions in Amazon Translate\. - -To get started right away, see [Creating your first IAM delegated user and group](https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started_create-delegated-user.html) in the *IAM User Guide*\. - -## I want to allow people outside of my AWS account to access my Amazon Translate resources - -You can create a role that users in other accounts or people outside of your organization can use to access your resources\. You can specify who is trusted to assume the role\. For services that support resource\-based policies or access control lists \(ACLs\), you can use those policies to grant people access to your resources\. - -To learn more, consult the following: -+ To learn whether Amazon Translate supports these features, see [How Amazon Translate works with IAM](security_iam_service-with-iam.md)\. -+ To learn how to provide access to your resources across AWS accounts that you own, see [Providing access to an IAM user in another AWS account that you own](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html) in the *IAM User Guide*\. -+ To learn how to provide access to your resources to third\-party AWS accounts, see [Providing access to AWS accounts owned by third parties](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html) in the *IAM User Guide*\. -+ To learn how to provide access through identity federation, see [Providing access to externally authenticated users \(identity federation\)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_federated-users.html) in the *IAM User Guide*\. -+ To learn the difference between using roles and resource\-based policies for cross\-account access, see [How IAM roles differ from resource\-based policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_compare-resource-policies.html) in the *IAM User Guide*\. \ No newline at end of file diff --git a/doc_source/setting-up.md b/doc_source/setting-up.md deleted file mode 100644 index 43608ff..0000000 --- a/doc_source/setting-up.md +++ /dev/null @@ -1,47 +0,0 @@ -# Step 1: Set up an AWS account and create an administrator user - -Before you use Amazon Translate for the first time, complete the following tasks: - -1. [Sign up for AWS](#setting-up-signup) - -1. [Create an IAM user](#setting-up-iam) - -## Sign up for AWS - -When you sign up for Amazon Web Services \(AWS\), your AWS account is automatically signed up for all AWS services, including Amazon Translate\. You are charged only for the services that you use\. - -With Amazon Translate, you pay only for the resources that you use\. If you are a new AWS customer, you can get started with Amazon Translate for free\. For more information, see [AWS Free Usage Tier](https://aws.amazon.com/free/)\. - -If you already have an AWS account, skip to the next section\. - -**To create an AWS account** - -1. Open [https://portal\.aws\.amazon\.com/billing/signup](https://portal.aws.amazon.com/billing/signup)\. - -1. Follow the online instructions\. - - Part of the sign\-up procedure involves receiving a phone call and entering a verification code on the phone keypad\. - - When you sign up for an AWS account, an *AWS account root user* is created\. The root user has access to all AWS services and resources in the account\. As a security best practice, [assign administrative access to an administrative user](https://docs.aws.amazon.com/singlesignon/latest/userguide/getting-started.html), and use only the root user to perform [tasks that require root user access](https://docs.aws.amazon.com/accounts/latest/reference/root-user-tasks.html)\. - -Record your AWS account ID because you'll need it for the next task\. - -## Create an IAM user - -AWS services, such as Amazon Translate, require that you provide credentials when you access them\. This allows the service to determine whether you have permissions to access the service's resources\. - -We strongly recommend that you access AWS using AWS Identity and Access Management \(IAM\), not the credentials for your AWS account\. To use IAM to access AWS, create an IAM user, add the user to an IAM group with administrative permissions, and then grant administrative permissions to the IAM user\. You can then access AWS using a special URL and the IAM user's credentials\. - -Exercises in this guide assume that you have an IAM user with administrator privileges called `adminuser`\. - -**To create an administrator user** -+ In your AWS account, create an administrator user called `adminuser`\. For instructions, see [Creating Your First IAM User and Administrators Group](https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started_create-admin-group.html) in the *IAM User Guide*\. - -For more information about IAM, see the following: -+ [AWS Identity and Access Management \(IAM\)](https://aws.amazon.com/iam/) -+ [Getting started](https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started.html) -+ [IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/) - -## Next step - -[Step 2: Set up the AWS Command Line Interface \(AWS CLI\)](setup-awscli.md) \ No newline at end of file diff --git a/doc_source/setup-awscli.md b/doc_source/setup-awscli.md deleted file mode 100644 index a5440b9..0000000 --- a/doc_source/setup-awscli.md +++ /dev/null @@ -1,32 +0,0 @@ -# Step 2: Set up the AWS Command Line Interface \(AWS CLI\) - -You use the AWS CLI to make interactive calls to Amazon Translate\. - -**To set up the AWS CLI** - -1. Download and configure the AWS CLI\. For instructions, see the following topics in the *AWS Command Line Interface User Guide*: - + [Getting Set Up with the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html) - + [Configuring the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) - -1. In the AWS CLI `config` file, add a named profile for the administrator user: - - ``` - [profile adminuser] - aws_access_key_id = adminuser access key ID - aws_secret_access_key = adminuser secret access key - region = aws-region - ``` - - You use this profile when executing AWS CLI commands\. For more information about named profiles, see [Named Profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-multiple-profiles) in the *AWS Command Line Interface User Guide*\. For a list of AWS Regions, see [Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html) in the *Amazon Web Services General Reference*\. - -1. Verify the setup by typing the following help command at the command prompt: - - ``` - aws translate help - ``` - - You should see a brief description of Amazon Translate and a list of the available commands\. - -## Next step - -[Step 3: Getting started \(console\)](get-started-console.md) \ No newline at end of file diff --git a/doc_source/sync.md b/doc_source/sync.md deleted file mode 100644 index 7ac5a58..0000000 --- a/doc_source/sync.md +++ /dev/null @@ -1,5 +0,0 @@ -# Real\-time translation - -To translate a single text document and return the results of that translation directly to your application, use the Amazon Translate real\-time translation operation, [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html)\. Use this translation mode for interactive applications that work on one document at a time\. - -For an example of a real\-time translation workflow, see [Translate text using the command line](get-started-cli.md#cli-command-line)\. \ No newline at end of file diff --git a/doc_source/tagging-existingtags.md b/doc_source/tagging-existingtags.md deleted file mode 100644 index f9236f9..0000000 --- a/doc_source/tagging-existingtags.md +++ /dev/null @@ -1,22 +0,0 @@ -# Viewing, updating, and deleting tags associated with a resource - -You can view, update or delete the tags associated with a `Parallel data` or `Custom terminology` resource\. - -**To update tags for an existing resource \(console\)** - -1. Sign in to the [Amazon Translate console](https://console.aws.amazon.com/translate/)\. - -1. From the left navigation pane, select `Parallel data` or `Custom terminology`\. - -1. Select the resource that contains the tags you want to view, update, or delete\. The console opens the details page for the resource\. - -1. Scroll down until you see the **Tags** panel\. Here, you can see all the tags associated with your selected resource\. -![\[Image NOT FOUND\]](http://docs.aws.amazon.com/translate/latest/dg/images/modify-tags-2.png) - - Select **Manage tags** to edit or remove tags from your resource\. - -1. Choose the text you want to modify, then edit your tag\. You can also remove the tag by selecting **Remove**\. - -1. To add a new tag, select **Add new tag**, then enter the key and value in the blank fields\. - -1. When you're finished modifying your tags, select **Save**\. \ No newline at end of file diff --git a/doc_source/tagging-newtags.md b/doc_source/tagging-newtags.md deleted file mode 100644 index 7890f22..0000000 --- a/doc_source/tagging-newtags.md +++ /dev/null @@ -1,30 +0,0 @@ -# Tagging a new resource - -You can add tags to a **ParallelData** or **Custom Terminology** resource when you create it\. - -**To add tags to a new resource \(console\)** - -1. Sign in to the [Amazon Translate console](https://console.aws.amazon.com/translate/)\. - -1. From the left navigation pane, select the resource \(`Parallel data` or `Custom terminology`\) that you want to create\. - -1. Chose **Create parallel data** or **Create terminology**\. The console displays the main 'create' page for your resource\. At the end of this page, you see a '**Tags \-** *optional*' panel\. -![\[Image NOT FOUND\]](http://docs.aws.amazon.com/translate/latest/dg/images/add-tags-1.png) - -1. Choose **Add new tag** to add a tag for the resource\. Enter a tag key and, optionally, a tag value\. -![\[Image NOT FOUND\]](http://docs.aws.amazon.com/translate/latest/dg/images/add-tags-2.png) - -1. Repeat step 4 until you have added all your tags\. Each key must be unique for this resource\. -![\[Image NOT FOUND\]](http://docs.aws.amazon.com/translate/latest/dg/images/add-tags-3.png) - -1. Choose **Create parallel data** or **Create terminology** to create the resource\. - -You can also add tags using the Amazon Translate [CreateParallelData](https://docs.aws.amazon.com/translate/latest/APIReference/API_CreateParallelData.html) API operation\. The following example shows how to add tags with the create\-parallel\-data CLI command\. - -``` -aws translate create-parallel-data \ ---name "myTest" \ ---parallel-data-config "{\"format\": \"CSV\", \ - "S3Uri\": \"s3://test-input/TEST.csv\"}" \ ---tags "[{\"Key\": \"color\",\"Value\": \"orange\"}]" -``` \ No newline at end of file diff --git a/doc_source/tagging.md b/doc_source/tagging.md deleted file mode 100644 index c7b0dc9..0000000 --- a/doc_source/tagging.md +++ /dev/null @@ -1,23 +0,0 @@ -# Tagging your resources - -A tag is metadata that you can associate with an Amazon Translate resource\. A tag consists of a key\-value pair\. You can add tags to **Parallel Data** and **Custom Terminology** resources\. - -Tags have two major functions: organizing your resources and providing tag\-based access control\. You can add tags to a resource and then create IAM policies to allow or restrict access to the resource based on its tags\. - -A policy can allow or disallow an operation based on the tags provided in your request \(request\-tags\) or tags associated with the resource you're calling \(resource\-tags\)\. For more information on using tags with IAM, see [Controlling access using tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) in the *IAM User Guide*\. - -Considerations for using tags with Amazon Translate: -+ You can add up to 50 user tags per resource\. -+ You can add tags when you create the resource, or any time after you create it\. -+ A tag *key* is a required field but a tag *value* is optional\. -+ Tags don't have to be unique between resources, but the tags for a given resource must have unique keys\. -+ Tag keys and values are case sensitive\. -+ A tag key can have a maximum of 128 characters; a tag value can have a maximum of 256 characters\. -+ AWS system tags start with prefix `aws:` in the tag key or value\. You can't add, edit, or delete tag names or values with this prefix\. System tags are not included in your tags quota per resource\. - -**Note** -If you plan to use your tagging schema across multiple AWS services and resources, remember that other services may have different requirements for allowed characters\. - -**Topics** -+ [Tagging a new resource](tagging-newtags.md) -+ [Viewing, updating, and deleting tags associated with a resource](tagging-existingtags.md) \ No newline at end of file diff --git a/doc_source/translate-api-permissions-ref.md b/doc_source/translate-api-permissions-ref.md deleted file mode 100644 index 9eb654f..0000000 --- a/doc_source/translate-api-permissions-ref.md +++ /dev/null @@ -1,9 +0,0 @@ -# Amazon Translate API permissions: Actions, resources, and conditions reference - -You can specify permitted Amazon Translate operations in the pemission policies that you attach to an IAM identity \(identity\-based policies\)\. You specify the actions in the policy's `Action` field, and you specify the resource value in the policy's `Resource` field\. - -To specify an action, use the `translate:` prefix followed by the API operation name, such as `translate:TranslateText`\. - -You can also use AWS\-wide condition keys in your Amazon Translate policies\. For a complete list of AWS\-wide keys, see [Available Keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#AvailableKeys) in the *IAM User Guide*\. - -For details about the Amazon Translate operations and resources, see [ Actions, resources, and condition keys for Amazon Translate ](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazontranslate.html) in the *Service Authorization Reference*\. \ No newline at end of file diff --git a/doc_source/translate-cloudwatch.md b/doc_source/translate-cloudwatch.md deleted file mode 100644 index cfd2fc4..0000000 --- a/doc_source/translate-cloudwatch.md +++ /dev/null @@ -1,25 +0,0 @@ -# CloudWatch metrics and dimensions for Amazon Translate - -To monitor your solution's performance, use the Amazon CloudWatch metrics and dimensions for Amazon Translate\. - -## CloudWatch Metrics for Amazon Translate - - -| Metric | Description | -| --- | --- | -| CharacterCount | The number of billable characters in requests\. Valid dimensions: Language pair, Operation Valid statistics: Average, Maximum, Minimum, Sum Unit: Count | -| ResponseTime | The time that it took to respond to a request\. Valid dimensions: Language pair, Operation Valid statistics: Data samples, Average Unit: For Data samples, count\. For Average statistics, milliseconds\. | -| ServerErrorCount | The number of server errors\. The HTTP response code range for a server error is 500 to 599\. Valid dimension: Operation Valid statistics: Average, Sum Unit: Count | -| SuccessfulRequestCount | The number of successful translation requests\. The response code for a successful request is 200 to 299\. Valid dimension: Operation Valid statistics: Average, Sum Unit: Count | -| ThrottledCount | The number of requests subject to throttling\. Use `ThrottledCount` to determine if your application is sending requests to Amazon Translate faster than your account is configured to accept them\. For more information, see [Amazon Translate Limits](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_amazon_translate) in the *Amazon Web Services General Reference*\. Valid dimension: Operation Valid statistics: Average, Sum Unit: Count | -| UserErrorCount | The number of user errors that occurred\. The HTTP response code range for a user error is 400 to 499\. Valid dimension: Operation Valid statistics: Average, Sum Unit: Count | - -## CloudWatch Dimensions for Amazon Translate - -Use the following dimensions to filter Amazon Translate metrics\. Metrics are grouped by the source language and the target language\. - - -| Dimension | Description | -| --- | --- | -| LanguagePair | Restricts the metrics to only those that contain the specified languages\. | -| Operation | Restricts the metrics to only those with the specified operation\. | \ No newline at end of file diff --git a/doc_source/using-ct.md b/doc_source/using-ct.md deleted file mode 100644 index 449c424..0000000 --- a/doc_source/using-ct.md +++ /dev/null @@ -1,41 +0,0 @@ -# Using custom terminologies - - When using a Custom Terminology when translating text using the [TranslateText](https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html) operation, the process is similar to when you translate text without one\. The difference is that when you call the operation with the Custom Terminology, you also include the optional `TerminologyNames` parameter\. - -For example, if you have the following terminology file called `Amazon_Family.csv` attached to your account: - -``` - en,fr - Amazon Family,Amazon Famille -``` - -You can use the following to call the Custom Terminology to translate your text using the CLI: - -**Note** -This example is formatted for Unix, Linux, and macOS\. For Windows, replace the backslash \(\\\) Unix continuation character at the end of each line with a caret \(^\)\. - -``` -aws translate translate-text \ - --region region \ - --source-language-code "en" \ - --target-language-code "fr" \ - --terminology-names "Amazon_Family" \ - --text "Have you ever shopped with Amazon Family?" -``` - -This uses the selected Custom Terminology to translate this text as "Avez\-vous déjà fait des achats avec Amazon Famille?" instead of the direct \(but undesirable\) translation "Avez\-vous déjà fait des achats avec Famille Amazon?" - -Using Python, the same task can be seen with the following: - -``` -import boto3 - -translate = boto3.client(service_name='translate') - -print("Translating 'Have you ever shopped with Amazon Family?' from English to French with the 'Amazon_Family' custom terminology...") -response = translate.translate_text(Text="Have you ever shopped with Amazon Family?", TerminologyNames=["Amazon_Family"], SourceLanguageCode="en", TargetLanguageCode="fr") -print("Translated text: " + response.get('TranslatedText')) -print("\n") -``` - -For more information on using the Amazon Translate operations with Custom Terminologies, see [API Operations](https://docs.aws.amazon.com/translate/latest/APIReference/API_Operations.html)\. \ No newline at end of file diff --git a/doc_source/vpc-interface-endpoints.md b/doc_source/vpc-interface-endpoints.md deleted file mode 100644 index 171b3e7..0000000 --- a/doc_source/vpc-interface-endpoints.md +++ /dev/null @@ -1,70 +0,0 @@ -# Amazon Translate and interface VPC endpoints \(AWS PrivateLink\) - -You can establish a private connection between your VPC and Amazon Translate by creating an *interface VPC endpoint*\. Interface endpoints are powered by [AWS PrivateLink](http://aws.amazon.com/privatelink), a technology that enables you to privately access Amazon Translate APIs without an internet gateway, NAT device, VPN connection, or AWS Direct Connect connection\. Instances in your VPC don't need public IP addresses to communicate with Amazon Translate APIs\. Traffic between your VPC and Amazon Translate does not leave the Amazon network\. - -Each interface endpoint is represented by one or more [Elastic Network Interfaces](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) in your subnets\. - -For more information, see [Interface VPC endpoints \(AWS PrivateLink\)](https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html) in the *Amazon VPC User Guide*\. - -## Considerations for Amazon Translate VPC endpoints - -Before you set up an interface VPC endpoint for Amazon Translate, ensure that you review [Interface endpoint properties and limitations](https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html#vpce-interface-limitations) in the *Amazon VPC User Guide*\. - -Amazon Translate supports making calls to all of its API actions from your VPC\. - -## Creating an interface VPC endpoint for Amazon Translate - -You can create a VPC endpoint for the Amazon Translate service using either the Amazon VPC console or the AWS Command Line Interface \(AWS CLI\)\. For more information, see [Creating an interface endpoint](https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html#create-interface-endpoint) in the *Amazon VPC User Guide*\. - -Create a VPC endpoint for Amazon Translate using the following service name: -+ com\.amazonaws\.*region*\.translate - -If you enable private DNS for the endpoint, you can make API requests to Amazon Translate using its default DNS name for the Region, for example, `translate.us-east-1.amazonaws.com`\. - -For more information, see [Accessing a service through an interface endpoint](https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html#access-service-though-endpoint) in the *Amazon VPC User Guide*\. - -## Creating a VPC endpoint policy for Amazon Translate - -You can attach an endpoint policy to your VPC endpoint that controls access to Amazon Translate\. The policy specifies the following information: -+ The principal that can perform actions\. -+ The actions that can be performed\. -+ The resources on which actions can be performed\. - -For more information, see [Controlling access to services with VPC endpoints](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) in the *Amazon VPC User Guide*\. - -**Example: VPC endpoint policy for Amazon Translate real\-time translation actions** -The following is an example of an endpoint policy for real\-time translation in Amazon Translate\. When attached to an endpoint, this policy grants access to the listed Amazon Translate actions for all principals on all resources\. - -``` -{ - "Statement":[ - { - "Principal":"*", - "Effect":"Allow", - "Action":[ - "translate:TranslateText", - ], - "Resource":"*" - } - ] - } -``` - -**Example: VPC endpoint policy for Amazon Translate batch translation actions** -The following is an example of an endpoint policy for batch translation in Amazon Translate\. When attached to an endpoint, this policy grants access to the listed Amazon Translate actions for all principals on all resources\. - -``` -{ - "Statement":[ - { - "Principal":"*", - "Effect":"Allow", - "Action":[ - "translate:StartTextTranslationJob", - "iam:PassRole" - ], - "Resource":"*" - } - ] - } -``` \ No newline at end of file diff --git a/doc_source/what-is-languages.md b/doc_source/what-is-languages.md deleted file mode 100644 index 52b1c85..0000000 --- a/doc_source/what-is-languages.md +++ /dev/null @@ -1,93 +0,0 @@ -# Supported languages and language codes - -Amazon Translate provides translation between a source language \(the input language\) and a target language \(the output language\)\. A source language\-target language combination is known as a *language pair*\. - -**Note** -Amazon Translate does not charge you for translations if you specify the same language for the source language and the target language\. If you set the source language to auto, you may be charged for using auto detection\. For more information, see [Automatic language detection](how-it-works.md#how-to-auto)\. - -Amazon Translate supports text translation between the languages listed in the following table\. The language code column uses [ ISO 639\-1]( https://www.loc.gov/standards/iso639-2/php/code_list.php) two\-digit language codes\. For a country variant of a language, the table follows the [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646.html) format of appending a dash followed by an [ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) 2\-digit country code\. For example, the language code for the Mexican variant of Spanish is `es-MX`\. - - -| Language | Language code | -| --- | --- | -| Afrikaans | af | -| Albanian | sq | -| Amharic | am | -| Arabic | ar | -| Armenian | hy | -| Azerbaijani | az | -| Bengali | bn | -| Bosnian | bs | -| Bulgarian | bg | -| Catalan | ca | -| Chinese \(Simplified\) | zh | -| Chinese \(Traditional\) | zh\-TW | -| Croatian | hr | -| Czech | cs | -| Danish | da | -| Dari | fa\-AF | -| Dutch | nl | -| English | en | -| Estonian | et | -| Farsi \(Persian\) | fa | -| Filipino, Tagalog | tl | -| Finnish | fi | -| French | fr | -| French \(Canada\) | fr\-CA | -| Georgian | ka | -| German | de | -| Greek | el | -| Gujarati | gu | -| Haitian Creole | ht | -| Hausa | ha | -| Hebrew | he | -| Hindi | hi | -| Hungarian | hu | -| Icelandic | is | -| Indonesian | id | -| Irish | ga | -| Italian | it | -| Japanese | ja | -| Kannada | kn | -| Kazakh | kk | -| Korean | ko | -| Latvian | lv | -| Lithuanian | lt | -| Macedonian | mk | -| Malay | ms | -| Malayalam | ml | -| Maltese | mt | -| Marathi | mr | -| Mongolian | mn | -| Norwegian \(Bokmål\) | no | -| Pashto | ps | -| Polish | pl | -| Portuguese \(Brazil\) | pt | -| Portuguese \(Portugal\) | pt\-PT | -| Punjabi | pa | -| Romanian | ro | -| Russian | ru | -| Serbian | sr | -| Sinhala | si | -| Slovak | sk | -| Slovenian | sl | -| Somali | so | -| Spanish | es | -| Spanish \(Mexico\) | es\-MX | -| Swahili | sw | -| Swedish | sv | -| Tamil | ta | -| Telugu | te | -| Thai | th | -| Turkish | tr | -| Ukrainian | uk | -| Urdu | ur | -| Uzbek | uz | -| Vietnamese | vi | -| Welsh | cy | - -## Limitations in language support - -The following features in Amazon Translate have limitations in the languages that they support\. -+ Profanity masking – For the languages supported by this feature, see [Masking profane words and phrases in Amazon Translate](customizing-translations-profanity.md)\. -+ Formality – For the languages supported by this feature, see [Setting formality in Amazon Translate](customizing-translations-formality.md)\. \ No newline at end of file diff --git a/doc_source/what-is-limits.md b/doc_source/what-is-limits.md deleted file mode 100644 index 7b166df..0000000 --- a/doc_source/what-is-limits.md +++ /dev/null @@ -1,90 +0,0 @@ -# Guidelines and limits - -The following sections contain information about Amazon Translate guidelines and limits\. - -**Topics** -+ [Supported AWS Regions](#what-is-regions) -+ [Compliance](#what-is-compliance) -+ [Throttling](#limits-throttling) -+ [Guidelines](#guidelines) -+ [Service limits](#limits) - -## Supported AWS Regions - -For a list of AWS Regions that support Amazon Translate, see the [AWS Region Table](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) or [AWS Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#translate_region) in the *Amazon Web Services General Reference*\. - -## Compliance - -For more information about Amazon Translate compliance programs, see [AWS Compliance](https://aws.amazon.com/compliance/), [AWS Compliance Programs](https://aws.amazon.com/compliance/programs/), and [AWS Services in Scope by Compliance Program](https://aws.amazon.com/compliance/services-in-scope)\. - -## Throttling - -Amazon Translate scales to serve customer operational traffic\. If you encounter sustained throttling, contact [AWS Support](https://console.aws.amazon.com/support/home#/)\. - -## Guidelines - -To continuously improve the quality of its analysis models, Amazon Translate might store your data\. To learn more, see the [Amazon Translate FAQ](https://aws.amazon.com/translate/faqs/)\. - -You can request that we delete your data and that future data associated with your account isn't stored by contacting [AWS Support](https://console.aws.amazon.com/support/home#/)\. However, because deleting your data can also delete unique training data that is helpful in improving translation, doing so might reduce the quality of your translations\. - -## Service limits - -Amazon Translate has the following service limitations\. - - -**Synchronous real\-time translation limits** - -| Description | Limit | -| --- | --- | -| Character encoding | UTF\-8 | -| Maximum document size \(UTF\-8 characters\) | 5,000 bytes | - - -**Asynchronous batch translation limits** - -| Description | Limit | -| --- | --- | -| Character encoding | UTF\-8 | -| Maximum number of characters per document | 1,000,000 | -| Maximum size per document | 20 MB | -| Maximum size of translatable text in a single document | 1 MB | -| Maximum number of target languages in a batch job request | 10 | -| Maximum number of documents in batch | 1,000,000 | -| Maximum size of total documents in batch | 5 GB | -| Maximum number of concurrent batch translation jobs | 10 | -| Maximum number of queued batch translation jobs | 1000 | -| Transactions per second for the StartTextTranslationJob API action | 5 | -| Transactions per second for the DescribeTextTranslationJob API action | 10 | -| Transactions per second for the ListTextTranslationJobs API action | 10 | -| Transactions per second for the StopTextTranslationJob API action | 5 | - - -**Custom terminology limits** - -| Description | Limit | -| --- | --- | -| Maximum custom terminology file size | 10 MB | -| Maximum number of custom terminology files per AWS account per AWS Region | 100 | -| Maximum number of target languages per custom terminology file | 10 | -| Maximum source and target text length per custom terminology term | 200 bytes | -| Maximum number of terminology files per TranslateText or StartTextTranslationJob request\. | 1 | -| Transactions per second for the ImportTerminology API action | 5 | -| Transactions per second for the GetTerminology API action | 10 | -| Transactions per second for the ListTerminologies API action | 10 | -| Transactions per second for the DeleteTerminology API action | 5 | - - -**Parallel data limits** - -| Description | Limit | -| --- | --- | -| Maximum number of parallel data resources per AWS account per AWS Region | 1000 | -| Maximum parallel data input file size | 5 GB | -| Maximum number of source languages in a parallel data resource | 1 | -| Maximum size of a single segment or record in a parallel data input file | 1000 bytes | -| Maximum number of concurrent create or update operations for parallel data resources | 1 | -| Transactions per second for the CreateParallelData API action | 5 | -| Transactions per second for the GetParallelData API action | 10 | -| Transactions per second for the ListParallelData API action | 10 | -| Transactions per second for the UpdateParallelData API action | 5 | -| Transactions per second for the DeleteParallelData API action | 5 | \ No newline at end of file diff --git a/doc_source/what-is.md b/doc_source/what-is.md deleted file mode 100644 index bcf6fd6..0000000 --- a/doc_source/what-is.md +++ /dev/null @@ -1,53 +0,0 @@ -# What is Amazon Translate? - -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\. See [Supported languages and language codes](what-is-languages.md) for information about the languages that Amazon Translate supports\. - - - -**Topics** -+ [Use cases](#what-is-use-cases) -+ [Are you a first\-time user of Amazon Translate?](#first-time-user) -+ [Amazon Translate pricing](#what-is-pricing) -+ [Amazon Translate API Reference](#what-is-api) - -## Use cases - -Use Amazon Translate to do the following: - -**Enable multilingual user experiences in your applications by integrating Amazon Translate: ** -+ Translate company\-authored content, such as meeting minutes, technician reports, knowledge\-base articles, posts, and more\. -+ Translate interpersonal communications, such as email, in\-game chat, customer service chat, so that customers and employees can connect in their preferred language\. - -**Process and manage your company's incoming data:** -+ Analyze text, such as social media and news feeds, in many languages\. -+ Search for information, such as for eDiscovery cases, in many languages\. - -**Enable language\-independent processing by integrating Amazon Translate with other AWS services:** -+ Extract named entities, sentiment, and key phrases from unstructured text, such as social media streams with [Amazon Comprehend](https://docs.aws.amazon.com/comprehend/latest/dg/comphrened-general.html)\. -+ Make subtitles and live captioning available in many languages with [Amazon Transcribe](https://docs.aws.amazon.com/transcribe/latest/dg/what-is-transcribe.html)\. -+ Speak translated content with [Amazon Polly](https://docs.aws.amazon.com/polly/latest/dg/what-is.html)\. -+ Translate document repositories stored in [Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/Welcome.html) \. -+ Translate text stored in the following databases: [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html), [Amazon Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html), and [Amazon Redshift](https://docs.aws.amazon.com/redshift/latest/dg/welcome.html)\. -+ Seamlessly integrate workflows with [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) or [AWS Glue](https://docs.aws.amazon.com/glue/latest/dg/what-is-glue.html)\. - -## Are you a first\-time user of Amazon Translate? - -If you are a first\-time user of Amazon Translate, we recommend that you start with the following topics: - -1. [How Amazon Translate works](how-it-works.md) – Introduces Amazon Translate\. - -1. [Getting started with Amazon Translate](getting-started.md) – Explains how to set up your AWS account and start using Amazon Translate\. - -1. [Examples](examples.md) – Provides code examples in Java and Python\. Use the examples to explore how Amazon Translate works\. - -You can also use the following resources to learn about the Amazon Translate service: -+ The [AWS Machine Learning Blog](http://aws.amazon.com/blogs/machine-learning/ ) includes useful articles about Amazon Translate\. -+ [Amazon Translate Deep Dive Video Series](https://www.youtube.com/playlist?list=PLhr1KZpdzukePPoSt1BZUNYQ6r5BdNm-1) provides introductory videos about Amazon Translate\. - -## Amazon Translate pricing - -As with other AWS products, there are no contracts or minimum commitments for using Amazon Translate\. For more information about the cost of using Amazon Translate, see [Amazon Translate Pricing](https://aws.amazon.com/translate/pricing/)\. - -## Amazon Translate API Reference - -The Amazon Translate API Reference is now a separate document\. For more information, see [Amazon Translate API Reference](https://docs.aws.amazon.com/translate/latest/APIReference/Welcome.html)\. \ No newline at end of file