id
stringlengths 8
78
| source
stringclasses 743
values | chunk_id
int64 1
5.05k
| text
stringlengths 593
49.7k
|
---|---|---|---|
transferfamily-ug-178 | transferfamily-ug.pdf | 178 | trailing slash. For example, /amzn-s3-demo-bucket/images is acceptable, but amzn-s3-demo- bucket/images and /amzn-s3-demo-bucket/images/ are not. Troubleshoot Amazon API Gateway issues This section describes possible solutions for the following API Gateway issues. Topics • Too many authentication failures • Connection closed Too many authentication failures Description When you try to connect to your server using Secure Shell (SSH) File Transfer Protocol (SFTP), you get the following error: Received disconnect from 3.15.127.197 port 22:2: Too many authentication failures Authentication failed. Couldn't read packet: Connection reset by peer Cause You might have entered an incorrect password for your user. Try again to enter the correct password. If the password is correct, the issue might be caused by a role Amazon Resource Name (ARN) that is not valid. To confirm that this is the issue, test the identity provider for your server. If you see a response similar to the following, the role ARN is a placeholder only, as indicated by the role ID value of all zeros: { "Response": "{\"Role\": \"arn:aws:iam::000000000000:role/MyUserS3AccessRole\", \"HomeDirectory\": \"/\"}", "StatusCode": 200, "Message": "", Troubleshoot Amazon API Gateway issues 619 AWS Transfer Family User Guide "Url": "https://api-gateway-ID.execute-api.us-east-1.amazonaws.com/prod/ servers/transfer-server-ID/users/myuser/config" } Solution Replace the placeholder role ARN with an actual role that has permission to access the server. To update the role 1. 2. 3. Open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation. In the left navigation pane, choose Stacks. In the Stacks list, choose your stack, and then choose the Parameters tab. 4. Choose Update. On the Update stack page, choose Use current template, and then choose Next. 5. Replace UserRoleArn with a role ARN that has sufficient permissions for accessing your Transfer Family server. Note To grant the necessary permissions, you can add the AmazonAPIGatewayAdministrator and the AmazonS3FullAccess managed policies to your role. 6. Choose Next, and then choose Next again. On the Review stack page, select I acknowledge that AWS CloudFormation might create IAM resources, and then choose Update stack. Connection closed Description When you try to connect to your server using Secure Shell (SSH) File Transfer Protocol (SFTP), you get the following error: Connection closed Cause Troubleshoot Amazon API Gateway issues 620 AWS Transfer Family User Guide One possible cause for this issue is that your Amazon CloudWatch logging role does not have a trust relationship with Transfer Family. Solution Make sure that the logging role for the server has a trust relationship with Transfer Family. For more information, see To establish a trust relationship. Troubleshoot testing your identity provider Description If you test your identity provider using the console or the TestIdentityProvider API operation, the Response field is empty. For example: { "Response": "{}", "StatusCode": 200, "Message": "" } Cause The most likely cause is that the authentication failed because of an incorrect user name or password. Solution Make sure that you are using the correct credentials for your user, and make updates to the username or password, if necessary. Troubleshoot SFTP connectivity and transfer issues This section describes possible solutions for SFTP connectivity and file transfer issues. Topics • Troubleshoot SFTP connectivity issues • Troubleshoot SFTP client issues • Troubleshoot file upload issues Troubleshoot testing your identity provider 621 AWS Transfer Family User Guide Troubleshoot SFTP connectivity issues Description Your SFTP client cannot initiate the connection. This issue can happen continuously or intermittently. For example, you might see the following sequence of events in your SFTP client debug logs: sftp -vvv [email protected] ................................. debug1: Local version string ........... kex_exchange_identification: read: Connection reset by peer Connection reset by 1.1.1.1 port 22 Connection closed. Cause There is an edge case where the zero-byte TCP ACK (ACK without data), also known as the three- way handshake, is either dropped or delayed. Solution As a workaround, Transfer Family offers a solution that uses a different configuration to solve this issue, but may cause compatibility issues with older clients. For that reason, this solution is available only on port 2223. In the procedure for creating a Transfer Family server in a VPC (Create a server in a virtual private cloud), when you specify a security group, configure SSH traffic to use port 2223. Troubleshoot SFTP client issues SFTP client side messages are described in SFTP messages. The best way to troubleshoot SFTP client issues is to check the SFTP client logs and, if necessary, reach out to your network administrator. Troubleshoot file upload issues This section describes possible solutions for the following file upload issues. Topics • Troubleshoot Amazon S3 file upload errors Troubleshoot SFTP connectivity issues 622 AWS Transfer Family User Guide • Troubleshoot unreadable file names Troubleshoot Amazon S3 file upload errors Description When you are attempting to upload a file to Amazon S3 storage using Transfer Family, you receive the following error message: AWS Transfer does not support random access writes to S3 objects. Cause When you're using Amazon S3 |
transferfamily-ug-179 | transferfamily-ug.pdf | 179 | issues is to check the SFTP client logs and, if necessary, reach out to your network administrator. Troubleshoot file upload issues This section describes possible solutions for the following file upload issues. Topics • Troubleshoot Amazon S3 file upload errors Troubleshoot SFTP connectivity issues 622 AWS Transfer Family User Guide • Troubleshoot unreadable file names Troubleshoot Amazon S3 file upload errors Description When you are attempting to upload a file to Amazon S3 storage using Transfer Family, you receive the following error message: AWS Transfer does not support random access writes to S3 objects. Cause When you're using Amazon S3 for your server's storage, Transfer Family does not support multiple connections for a single transfer. Solution If your Transfer Family server is using Amazon S3 for its storage, disable any options for your client software that mention using multiple connections for a single transfer. Troubleshoot unreadable file names Description You see corrupted file names in some of your uploaded files. Users sometimes encounter problems with FTP and SFTP transfers that garble certain characters in file names, such as umlauts, accented letters, or certain scripts, such as Chinese or Arabic. Cause Although the FTP and SFTP protocols can allow for character encoding of files names to be negotiated by clients, Amazon S3 and Amazon EFS do not. Instead, they require UTF-8 character encoding. As a result, certain characters are not rendered correctly. Solution To solve this problem, review your client application for file name character encoding and make sure it is set to UTF-8. Troubleshoot custom identity provider issues This section describes possible solutions for issues related to custom identity providers with Transfer Family. Custom identity provider issues 623 AWS Transfer Family Topics • Troubleshoot API Gateway integration errors • Troubleshoot Lambda function timeouts • Troubleshoot consistent Lambda timeout issues • Troubleshoot KeyError exceptions User Guide Troubleshoot API Gateway integration errors Description Users cannot authenticate with your Transfer Family server, and when testing your identity provider, you see errors such as: { "Response": "", "StatusCode": 500, "Message": "Internal server error" } Cause API Gateway integration errors can occur due to: • Incorrect API Gateway configuration • Lambda function errors not being properly handled • Permission issues between API Gateway and Lambda • Malformed responses from the Lambda function Solution To troubleshoot API Gateway integration errors: 1. Check your Lambda function logs for detailed error information: • In the CloudWatch console, navigate to Log groups > /aws/lambda/your-function-name • Look for error messages or stack traces that indicate the root cause 2. Verify that your Lambda function returns properly formatted responses: Troubleshoot API Gateway integration errors 624 AWS Transfer Family User Guide { "Role": "arn:aws:iam::123456789012:role/TransferUserRole", "HomeDirectory": "/mybucket/home/username" } 3. Enable detailed CloudWatch logging for API Gateway: • In the API Gateway console, select your API and choose Stages • Select your stage and under Logs/Tracing, enable CloudWatch Logs • Set the log level to ERROR or INFO 4. Test your API Gateway endpoint directly: curl -X POST https://your-api-id.execute-api.region.amazonaws.com/prod/servers/your- server-id/users/username/config \ -H "Content-Type: application/json" \ -d '{"Password": "password"}' 5. Verify permissions between API Gateway and Lambda: • Ensure API Gateway has permission to invoke your Lambda function • Check that the execution role for your Lambda function has necessary permissions Troubleshoot Lambda function timeouts Description When users attempt to authenticate with your Transfer Family server using a custom identity provider, they experience long delays followed by authentication failures. In your Lambda logs, you see timeout errors. Cause Lambda functions used for custom identity providers have a default timeout of 3 seconds. If your authentication logic takes longer than this timeout (for example, when querying external databases or making API calls to third-party identity providers), the function will time out and authentication will fail. Solution To resolve Lambda timeout issues: Troubleshoot Lambda function timeouts 625 AWS Transfer Family User Guide 1. Increase the Lambda function timeout: • In the Lambda console, navigate to your function and select the Configuration tab • Under General configuration, click Edit • Increase the timeout value (up to 15 seconds is recommended for authentication functions) 2. Optimize your Lambda function code: • Use connection pooling for database queries • Implement caching for frequently accessed data • Minimize external API calls during authentication 3. Consider using Lambda Provisioned Concurrency to eliminate cold starts: aws lambda put-provisioned-concurrency-config \ --function-name my-authentication-function \ --qualifier prod \ --provisioned-concurrent-executions 5 4. Monitor Lambda performance using CloudWatch metrics and set up alarms for duration thresholds Troubleshoot consistent Lambda timeout issues Description Users experience consistent timeouts when using a Lambda function for authentication. Cause Lambda can’t reach the corresponding AWS service used to authenticate (such as DynamoDB, Secrets Manager, or other identity provider). Solution Verify that subnets can reach AWS services. Or, if connecting to an internet identity provider (such as Okta), verify that the Lambda function’s subnet |
transferfamily-ug-180 | transferfamily-ug.pdf | 180 | during authentication 3. Consider using Lambda Provisioned Concurrency to eliminate cold starts: aws lambda put-provisioned-concurrency-config \ --function-name my-authentication-function \ --qualifier prod \ --provisioned-concurrent-executions 5 4. Monitor Lambda performance using CloudWatch metrics and set up alarms for duration thresholds Troubleshoot consistent Lambda timeout issues Description Users experience consistent timeouts when using a Lambda function for authentication. Cause Lambda can’t reach the corresponding AWS service used to authenticate (such as DynamoDB, Secrets Manager, or other identity provider). Solution Verify that subnets can reach AWS services. Or, if connecting to an internet identity provider (such as Okta), verify that the Lambda function’s subnet can reach the internet via a NAT Gateway Troubleshoot KeyError exceptions Description Troubleshoot consistent Lambda timeout issues 626 AWS Transfer Family User Guide In your Transfer Family log entries, you notice ‘KeyError’ exceptions. Cause The most likely cause is that user or identity_provider record is malformed or missing required fields. Solution Review the ERRORS log, located in /aws/transfer/your-server-id log group for clues. Troubleshoot workflow issues This section describes possible solutions for issues with managed workflows. Topics • Troubleshoot managed workflows issues • Troubleshoot workflow decryption issues Troubleshoot managed workflows issues This section describes possible solutions for the following workflow issues. Topics • Troubleshoot workflow-related errors using Amazon CloudWatch • Troubleshoot workflow copy errors Troubleshoot workflow-related errors using Amazon CloudWatch Description If you are having issues with your workflows, you can use Amazon CloudWatch to investigate the cause. Cause There can be several causes. Use Amazon CloudWatch Logs to investigate. Workflow issues 627 AWS Transfer Family Solution User Guide Transfer Family emits workflow execution status into CloudWatch Logs. The following types of workflow errors can appear in CloudWatch Logs: • "type": "StepErrored" • "type": "ExecutionErrored" • "type": "ExecutionThrottled" • "Service failure on starting workflow" You can filter your workflow's execution logs using different filter and pattern syntax. For example, you can create a log filter in your CloudWatch logs to capture workflow execution logs that contain the ExecutionErrored message. For details, see Real-time processing of log data with subscriptions and Filter and pattern syntax in the Amazon CloudWatch Logs User Guide. StepErrored 2021-10-29T12:57:26.272-05:00 {"type":"StepErrored","details": {"errorType":"BAD_REQUEST","errorMessage":"Cannot tag Efs file","stepType":"TAG","stepName":"successful_tag_step"}, "workflowId":"w- abcdef01234567890","executionId":"1234abcd-56ef-78gh-90ij-1234klmno567", "transferDetails": {"serverId":"s-1234567890abcdef0","username":"lhr","sessionId":"1234567890abcdef0"} Here, StepErrored indicates that a step within the workflow has generated an error. In a single workflow, you can have multiple steps configured. This error tells you in which step the error occurred and provides an error message. In this particular example, the step was configured to tag a file; however, tagging a file in an Amazon EFS file system is not supported, so the step generated an error. ExecutionErrored 2021-10-29T12:57:26.618-05:00 {"type":"ExecutionErrored","details":{},"workflowId":"w-w- abcdef01234567890", "executionId":"1234abcd-56ef-78gh-90ij-1234klmno567","transferDetails": {"serverId":"s-1234567890abcdef0", Troubleshoot managed workflows issues 628 AWS Transfer Family User Guide "username":"lhr","sessionId":"1234567890abcdef0"}} When a workflow is not able to execute any step, it generates an ExecutionErrored message. For example, if you have configured a single step in a given workflow, and if the step is not able to execute, the overall workflow fails. Executionthrottled Execution is throttled if a workflow is getting triggered at a rate that is faster than the system can support. This log message indicates that you must slow down your execution rate for workflows. If you are not able to scale down your workflow-execution rate, contact AWS Support at Contact AWS. Service failure on starting workflow Anytime you remove a workflow from a server and replace it with a new one, or update server configuration (which impacts a workflow's execution role), you must wait approximately 10 minutes before executing the new workflow. The Transfer Family server caches the workflow details, and it takes 10 minutes for the server to refresh its cache. Additionally, you must log out of any active SFTP sessions, and then log back in after the 10- minute waiting period to see the changes. Troubleshoot workflow copy errors Description If you're executing a workflow that contains a step to copy the uploaded file, you could encounter the following error: { "type": "StepErrored", "details": { "errorType": "BAD_REQUEST", "errorMessage": "Bad Request (Service: Amazon S3; Status Code: 400; Error Code: 400 Bad Request; Request ID: request-ID; S3 Extended Request ID: request-ID Proxy: null)", "stepType": "COPY", "stepName": "copy-step-name" }, "workflowId": "workflow-ID", "executionId": "execution-ID", "transferDetails": { "serverId": "server-ID", Troubleshoot managed workflows issues 629 AWS Transfer Family User Guide "username": "user-name", "sessionId": "session-ID" } } Cause The source file is in an Amazon S3 bucket that is in a different AWS Region than the destination bucket. Solution If you're executing a workflow that includes a copy step, make sure that the source and destination buckets are in the same AWS Region. Troubleshoot workflow decryption issues This section describes possible solutions for the following issues with encrypted workflows. Topics • Troubleshoot error for signed encryption file • Troubleshoot error for a FIPS algorithm Troubleshoot error for signed encryption file Description Your decrypt workflow fails and |
transferfamily-ug-181 | transferfamily-ug.pdf | 181 | AWS Transfer Family User Guide "username": "user-name", "sessionId": "session-ID" } } Cause The source file is in an Amazon S3 bucket that is in a different AWS Region than the destination bucket. Solution If you're executing a workflow that includes a copy step, make sure that the source and destination buckets are in the same AWS Region. Troubleshoot workflow decryption issues This section describes possible solutions for the following issues with encrypted workflows. Topics • Troubleshoot error for signed encryption file • Troubleshoot error for a FIPS algorithm Troubleshoot error for signed encryption file Description Your decrypt workflow fails and you receive the following error: "Encrypted file with signed message unsupported" Cause Transfer Family does not currently support signing for encrypted files. Solution In your PGP client, if there is an option to sign the encrypted file, make sure to clear the selection, as Transfer Family does not currently support signing for encrypted files. Troubleshoot workflow decryption issues 630 AWS Transfer Family User Guide Troubleshoot error for a FIPS algorithm Description Your decrypt workflow fails, and the log message resembles the following: { "type": "StepErrored", "details": { "errorType": "BAD_REQUEST", "errorMessage": "File encryption algorithm not supported with FIPS mode enabled.", "stepType": "DECRYPT", "stepName": "step-name" }, "workflowId": "workflow-ID", "executionId": "execution-ID", "transferDetails": { "serverId": "server-ID", "username": "user-name", "sessionId": "session-ID" } } Cause Your Transfer Family server has FIPS mode enabled and an associated Decrypt workflow step. When encrypting the files before uploading to your Transfer Family server, the encryption client might generate encrypted files that use non-FIPS approved symmetric encryption algorithms. In such a scenario, the workflow is unable to decrypt files. In the following example, GnuPG version 2.4.0 is using OCB (a non-FIPS block cipher mode) to encrypt files: this causes the workflow to fail. Solution You must edit the GPG key that you used to encrypt your files, and then re-encrypt them. The following procedure describes the steps you must take. To edit your PGP keys 1. Identify the key that you must edit by running gpg ‐‐list-keys This returns a list of keys. Each key has details similar to the following: Troubleshoot workflow decryption issues 631 AWS Transfer Family User Guide pub ed25519 2022-07-07 [SC] wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY uid [ultimate] Mary Major <[email protected]> sub cv25519 2022-07-07 [E] 2. Identify the key that you want to edit. In the example shown in the previous step, the ID is wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY. 3. Run gpg ‐‐edit-key wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY. The system responds with details about the GnuPG program and the specified key. 4. At the gpg> prompt, enter showpref. The following details are returned: [ultimate] (1). Mary Major <[email protected]> Cipher: AES256, AES192, AES, 3DES AEAD: OCB Digest: SHA512, SHA384, SHA256, SHA224, SHA1 Compression: ZLIB, BZIP2, ZIP, Uncompressed Features: MDC, AEAD, Keyserver no-modify Note that the preferred algorithms that are stored on the key are listed. 5. We want to edit the key to retain all algorithms except for OCB. Run the setpref command, specifying all the algorithms to retain: gpg> setpref AES256, AES192,AES,3DES,SHA512, SHA384, SHA256, SHA224, SHA1,ZLIB, BZIP2, ZIP, Uncompressed This returns the following details: Set preference list to: Cipher: AES256, AES192, AES, 3DES AEAD: Digest: SHA512, SHA384, SHA256, SHA224, SHA1 Compression: ZLIB, BZIP2, ZIP, Uncompressed Features: MDC, Keyserver no-modify Really update the preferences? (y/N) 6. 7. Enter y to update, then enter your password when prompted to confirm the change. Save the changes. Troubleshoot workflow decryption issues 632 AWS Transfer Family gpg> save User Guide Before re-running your decrypt workflow, you must re-encrypt your files, using the edited key. Troubleshoot SFTP connector issues This section describes possible solutions for issues with SFTP connectors. Topics • Troubleshoot adding trusted host keys for your SFTP connector • Key negotiation fails • SFTP connector throttling • Optimizing SFTP connector performance • Miscellaneous SFTP connector issues Troubleshoot adding trusted host keys for your SFTP connector Description When you are creating or editing an SFTP connector, and you are adding a trusted host key, you receive the following error: Failed to edit connector details (Invalid host key format.) Cause If you paste in a correct public key, the issue might be that you included the comment portion of the key. AWS Transfer Family does not currently accept the comment portion of the key. Solution Delete the comment portion of the key, when you paste it into the text field. For example, assume your key looks similar to the following: ssh-rsa AAAA...== [email protected] Remove the text that follows the == characters and only paste in the portion of the key up to and including the ==. SFTP connector issues 633 AWS Transfer Family ssh-rsa AAAA...== Key negotiation fails Description User Guide You receive an error where the key exchange negotiation fails. For example: Key exchange negotiation failed due to incompatible host key algorithms. Client offered: [ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, rsa-sha2-512, rsa-sha2-256] Server offered: [ssh-rsa] |
transferfamily-ug-182 | transferfamily-ug.pdf | 182 | key. Solution Delete the comment portion of the key, when you paste it into the text field. For example, assume your key looks similar to the following: ssh-rsa AAAA...== [email protected] Remove the text that follows the == characters and only paste in the portion of the key up to and including the ==. SFTP connector issues 633 AWS Transfer Family ssh-rsa AAAA...== Key negotiation fails Description User Guide You receive an error where the key exchange negotiation fails. For example: Key exchange negotiation failed due to incompatible host key algorithms. Client offered: [ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, rsa-sha2-512, rsa-sha2-256] Server offered: [ssh-rsa] Cause This error is because there's no overlap between the host key algorithms supported by the server and those supported by the connector. Solution Ensure that the remote server supports at least one of the Client host key algorithms listed in the error message. For the list of supported algorithms, see Security policies for AWS Transfer Family SFTP connectors. SFTP connector throttling Description When using SFTP connectors for file transfers, you encounter errors such as: {"type":"ExecutionThrottled","details":{},"connectorId":"c-1234567890abcdef0"} Or you notice that file transfers are being delayed or failing intermittently during high-volume operations. Cause SFTP connectors have service quotas that limit the number of concurrent file transfers and API operations. When these limits are exceeded, throttling occurs to protect the service and ensure fair usage across all customers. Solution Key negotiation fails 634 AWS Transfer Family User Guide To address SFTP connector issues, try the following solutions: 1. Implement exponential backoff and retry logic in your applications. For example, create a function that automatically retries failed operations with increasing wait times between attempts. 2. Implement rate limiting in your application: • Limit the number of concurrent transfers. • Add delays between batches of transfers. 3. Monitor your usage against service quotas: • Use CloudWatch metrics to track API usage. • Set up alarms to notify you when approaching quota limits. 4. For options to scale your SFTP connectors, see Scaling your SFTP connectors. 5. If throttling persists and impacts your business operations, request a quota increase through the Service Quotas console. Optimizing SFTP connector performance Description Your SFTP connector transfers are slower than expected or you experience inconsistent performance. Cause SFTP connector performance can be affected by various factors including network conditions, file sizes, remote server configuration, and concurrent transfer limits. Solution To optimize SFTP connector performance: • Configure your remote SFTP server for optimal performance: • Increase maximum sessions and transfers per session • Optimize TCP window sizes for high-latency connections • Use compression if supported by both ends • Consider network optimization, by placing your Transfer Family connector in a region close to your remote SFTP server. Optimizing SFTP connector performance 635 AWS Transfer Family User Guide • Implement a monitoring strategy to identify performance bottlenecks: • Monitor network throughput and latency • Analyze logs for patterns in slow transfers Miscellaneous SFTP connector issues Description You receive an error after you run StartFileTransfer, but do not know the cause of the issue, and only the connector ID is returned after the API call. Cause This error can have several causes. To troubleshoot, we recommend that you test your connector and search your CloudWatch logs. Solution • Test your connector: See Test an SFTP connector. If the test fails, the system provides an error message based on the reason the test failed. That section describes how to test your connector from either the console or by using the TestConnection API command. • View CloudWatch logs for your connector: See Example log entries for SFTP connectors. This topic provides examples for SFTP connector log entries, and the naming convention to help you find the appropriate logs. Troubleshoot EFS issues This section describes possible solutions for issues with Amazon EFS storage. Topics • Troubleshoot Amazon EFS issues Troubleshoot Amazon EFS issues This section describes possible solutions for the following Amazon EFS issues. Topics Miscellaneous SFTP connector issues 636 AWS Transfer Family User Guide • Troubleshoot Amazon EFS service-managed users • Troubleshoot missing POSIX profile • Troubleshoot logical directories with Amazon EFS Troubleshoot Amazon EFS service-managed users Description You run the sftp command and the prompt doesn't appear, and instead you see the following message: Couldn't canonicalize: Permission denied Need cwd Cause Your AWS Identity and Access Management (IAM) user's role does not have permission to access Amazon Elastic File System (Amazon EFS). Solution Increase the policy permissions for your user's role. You can add an AWS managed policy, such as AmazonElasticFileSystemClientFullAccess. Troubleshoot missing POSIX profile Description If you're using Amazon EFS storage for your server and you're using a custom identity provider, you must provide your AWS Lambda function with a POSIX profile. Cause One possible cause is that the templates that we provide for creating an AWS Lambda-backed Amazon API Gateway method |
transferfamily-ug-183 | transferfamily-ug.pdf | 183 | message: Couldn't canonicalize: Permission denied Need cwd Cause Your AWS Identity and Access Management (IAM) user's role does not have permission to access Amazon Elastic File System (Amazon EFS). Solution Increase the policy permissions for your user's role. You can add an AWS managed policy, such as AmazonElasticFileSystemClientFullAccess. Troubleshoot missing POSIX profile Description If you're using Amazon EFS storage for your server and you're using a custom identity provider, you must provide your AWS Lambda function with a POSIX profile. Cause One possible cause is that the templates that we provide for creating an AWS Lambda-backed Amazon API Gateway method do not currently contain POSIX information. If you did provide POSIX information, the format that you used for providing the POSIX information might not be getting parsed correctly by Transfer Family. Solution Troubleshoot Amazon EFS issues 637 AWS Transfer Family User Guide Make sure that you are providing a JSON element to Transfer Family for the PosixProfile parameter. For example, if you're using Python, you could add the following line where you parse the PosixProfile parameter: if PosixProfile: response_data["PosixProfile"] = json.loads(PosixProfile) Or, in JavaScript, you could add the following line, where the uid-value and gid-value are integers, 0 or greater, that represent the User ID (UID) and Group ID (GID) respectively: PosixProfile: {"Uid": uid-value, "Gid": gid-value}, These code examples send the PosixProfile parameter to Transfer Family as a JSON object, rather than as a string. Also, within AWS Secrets Manager, you must store the PosixProfile parameter as follows. Replace your-uid and your-gid with your actual values for the GID and UID. {"Uid": your-uid, "Gid": your-gid, "SecondaryGids": []} Troubleshoot logical directories with Amazon EFS Description If the user's home directory does not exist, and they run an ls command, the system responds as follows: sftp> ls remote readdir ("/"): No such file or directory Cause If your Transfer Family server uses Amazon EFS, the home directory for the user must be created with read and write access before the user can work in their logical home directory. The user cannot create this directory themselves, as they would lack permissions for mkdir on their logical home directory. Troubleshoot Amazon EFS issues 638 AWS Transfer Family Solution User Guide A user with administrative access to the parent directory needs to create the user's logical home directory. Troubleshoot storage and encryption issues This section describes possible solutions for issues with storage and encryption. Topics • Troubleshoot policies for encrypted Amazon S3 buckets • Troubleshoot ResourceNotFound exception Troubleshoot policies for encrypted Amazon S3 buckets Description You have an encrypted Amazon S3 bucket that you are using as storage for your Transfer Family server. If you try to upload a file to the server, you receive the error Couldn't close file: Permission denied. And if you view the server logs, you see the following errors: ERROR Message="Access denied" Operation=CLOSE Path=/bucket/user/test.txt BytesIn=13 ERROR Message="Access denied" Cause The policy for your IAM user does not have permission to access the encrypted bucket. Solution You must specify additional permissions in your policy to grant the required AWS Key Management Service (AWS KMS) permissions. For details, see Data protection and encryption. Troubleshoot ResourceNotFound exception Description Storage and encryption issues 639 AWS Transfer Family User Guide You receive an error where the resource cannot be found. For example, if you run UpdateServer, you might get the following error: An error occurred (ResourceNotFoundException) when calling the UpdateServer operation: Unknown server Cause There are several reasons for receiving a ResourceNotFoundException message. In most cases, the resource that you specified in your API command does not exist. If you did specify an existing resource, then the most probable cause is that your default region is different than the region for your resource. For example, if your default region is us-east-1, and your Transfer Family server is in us-east-2, you will receive an Unknown resource exception. For details about setting a default region, see Quick configuration with aws configure. Solution Add a region parameter to your API command to explicitly specify where to find a particular resource. aws transfer -describe-server --server-id server-id --region us-east-2 Troubleshoot monitoring and alerting issues This section provides information about troubleshooting monitoring and alerting issues with AWS Transfer Family, including missing or incomplete CloudWatch metrics and missing EventBridge events. Topics • Troubleshoot missing or incomplete CloudWatch metrics • Troubleshoot missing EventBridge events Troubleshoot missing or incomplete CloudWatch metrics Description CloudWatch metrics for your Transfer Family servers are missing, incomplete, or not updating as expected. Monitoring and alerting issues 640 AWS Transfer Family Cause User Guide Missing or incomplete metrics can be caused by several factors: • Logging configuration issues • Low activity levels that don't generate metrics within the expected timeframe • Viewing metrics with incorrect dimensions or time ranges Solution To resolve issues with missing or incomplete CloudWatch metrics: 1. |
transferfamily-ug-184 | transferfamily-ug.pdf | 184 | or incomplete CloudWatch metrics and missing EventBridge events. Topics • Troubleshoot missing or incomplete CloudWatch metrics • Troubleshoot missing EventBridge events Troubleshoot missing or incomplete CloudWatch metrics Description CloudWatch metrics for your Transfer Family servers are missing, incomplete, or not updating as expected. Monitoring and alerting issues 640 AWS Transfer Family Cause User Guide Missing or incomplete metrics can be caused by several factors: • Logging configuration issues • Low activity levels that don't generate metrics within the expected timeframe • Viewing metrics with incorrect dimensions or time ranges Solution To resolve issues with missing or incomplete CloudWatch metrics: 1. Ensure that logging is properly configured for your Transfer Familyserver: • In the Transfer Family console, check that logging is enabled under Server details > Additional details > Logging role. • Very that the logging role has the necessary permissions and trust relationships. 2. When viewing metrics in the CloudWatch console: • Use the correct dimensions, for example ServerId for server-level metrics • Adjust the time range to ensure it covers periods of activity • Check that you're in the correct AWS Region 3. Generate test activity on your Transfer Family server to ensure metrics are being produced. Troubleshoot missing EventBridge events Description You've configured Amazon EventBridge rules to capture Transfer Family events, but events are not being delivered to your target destinations or triggering expected actions. Cause Missing EventBridge events can be caused by: • Incorrectly configured event patterns • Permission issues with event targets • Service limits or throttling Troubleshoot missing EventBridge events 641 AWS Transfer Family User Guide • Events not being generated due to server configuration Solution To troubleshoot missing EventBridge events: 1. Verify your event pattern is correctly formatted to match Transfer Family events: { "source": ["aws.transfer"], "detail-type": ["Transfer State Change"], "detail": { "serverId": ["s-1234567890abcdef0"] } } 2. Check that your event target has the necessary permissions: • For Lambda targets, ensure the Lambda function's resource policy allows EventBridge to invoke it • For SQS targets, verify the queue policy allows EventBridge to send messages • For SNS targets, confirm the topic policy permits EventBridge to publish to it 3. Test your rule by generating sample events: • Use the EventBridge console to create a test event that matches your pattern • Perform actions on your Transfer Family server that should generate events 4. Enable EventBridge rule metrics to monitor rule invocations and failures: aws events put-rule --name "TransferStateChangeRule" --event-pattern '{...}' --state ENABLED --metrics-enabled 5. Check CloudWatch Logs for any error messages related to event delivery failures Troubleshoot cross-region transfer issues This section describes possible solutions for issues related to transferring files across AWS Regions. Topics • Troubleshoot cross-region transfer permission issues Cross-region transfer issues 642 AWS Transfer Family User Guide • Troubleshoot cross-region transfer performance issues Troubleshoot cross-region transfer permission issues Description When attempting to transfer files between Amazon S3 buckets in different regions using Transfer Family workflows, you encounter errors such as: { "type": "StepErrored", "details": { "errorType": "BAD_REQUEST", "errorMessage": "Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied)", "stepType": "COPY", "stepName": "cross_region_copy" } } Cause Cross-region transfers require specific IAM permissions for both the source and destination buckets. The IAM role used by your Transfer Family server or workflow may not have sufficient permissions to access buckets in other regions. Solution To resolve cross-region transfer permission issues: 1. Ensure your IAM role has permissions for both source and destination buckets: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetObjectVersion" ], Troubleshoot cross-region transfer permission issues 643 AWS Transfer Family User Guide "Resource": "arn:aws:s3:::source-bucket-name/*" }, { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:PutObjectAcl" ], "Resource": "arn:aws:s3:::destination-bucket-name/*" } ] } 2. If using KMS encryption, add permissions for both the source and destination KMS keys: { "Effect": "Allow", "Action": [ "kms:Decrypt", "kms:GenerateDataKey" ], "Resource": [ "arn:aws:kms:source-region:account-id:key/source-key-id", "arn:aws:kms:destination-region:account-id:key/destination-key-id" ] } 3. Verify that bucket policies in both regions allow access from your Transfer Family server's IAM role 4. For cross-account transfers, ensure proper cross-account permissions are configured Troubleshoot cross-region transfer performance issues Description Cross-region transfers are significantly slower than expected or time out during large file transfers. Cause Cross-region transfers inherently involve greater latency and may be affected by network conditions, file sizes, and service limits. Large files or high volumes of small files can experience performance degradation. Troubleshoot cross-region transfer performance issues 644 AWS Transfer Family Solution User Guide To improve cross-region transfer performance: • For large files, consider using Amazon S3 Transfer Acceleration: aws s3 cp --source-region us-east-1 --region us-west-2 \ s3://source-bucket/large-file.zip s3://destination-bucket/large-file.zip \ --acl bucket-owner-full-control --s3-accelerate • For multiple small files, batch them together before transfer: • Use compression to combine multiple files • Use Amazon S3 batch operations for large-scale transfers • Consider using Transfer Family SFTP connectors with appropriate timeout settings for large transfers • For |
transferfamily-ug-185 | transferfamily-ug.pdf | 185 | file sizes, and service limits. Large files or high volumes of small files can experience performance degradation. Troubleshoot cross-region transfer performance issues 644 AWS Transfer Family Solution User Guide To improve cross-region transfer performance: • For large files, consider using Amazon S3 Transfer Acceleration: aws s3 cp --source-region us-east-1 --region us-west-2 \ s3://source-bucket/large-file.zip s3://destination-bucket/large-file.zip \ --acl bucket-owner-full-control --s3-accelerate • For multiple small files, batch them together before transfer: • Use compression to combine multiple files • Use Amazon S3 batch operations for large-scale transfers • Consider using Transfer Family SFTP connectors with appropriate timeout settings for large transfers • For recurring transfers, consider replicating data using Amazon S3 Cross-Region Replication (CRR) instead of ad-hoc transfers • Monitor transfer performance using Amazon CloudWatch metrics to identify bottlenecks Troubleshoot Web Application Firewall integration issues This section describes possible solutions for issues related to integrating AWS WAF with Transfer Family. Topics • Troubleshoot WAF blocking legitimate traffic • Troubleshoot WAF integration with custom identity providers Troubleshoot WAF blocking legitimate traffic Description After configuring AWS WAF with your Transfer Family endpoint, legitimate users are unable to connect or experience intermittent connection failures. You may see HTTP 403 (Forbidden) responses in your logs. Cause WAF integration issues 645 AWS Transfer Family User Guide Your AWS WAF rules may be too restrictive or incorrectly configured, causing false positives that block legitimate traffic. Common causes include: • IP-based rules that inadvertently block corporate networks or VPNs • Rate-based rules with thresholds that are too low for your normal traffic patterns • Managed rule groups that are overly aggressive for your use case Solution To resolve false positive issues: 1. Enable AWS WAF logging to identify which rules are triggering the blocks. For instructions, see Logging AWS WAF web ACL traffic. 2. Review your logs to identify patterns in the blocked requests. 3. Adjust your rules by: • Adding IP addresses or ranges to an allowlist • Increasing rate limits for rate-based rules • Setting specific rules to Count mode instead of Block mode to monitor without blocking • Creating exceptions for specific rules using rule group exclusions 4. Test the updated configuration with a representative sample of legitimate traffic before fully deploying. Troubleshoot WAF integration with custom identity providers Description After configuring AWS WAF with your Transfer Family server that uses a custom identity provider, authentication fails or users experience intermittent authentication issues. Cause When using a custom identity provider with API Gateway, AWS WAF rules may interfere with the API calls between Transfer Family and your identity provider. This can happen because AWS WAF is inspecting and potentially blocking the API traffic based on its rule sets. Solution Troubleshoot WAF integration with custom identity providers 646 AWS Transfer Family User Guide To resolve issues with AWS WAF and custom identity providers: • Ensure that your AWS WAF configuration includes exceptions for the API Gateway endpoints used by your custom identity provider. • Add the Transfer Family service principal (transfer.amazonaws.com) to an allowlist in your AWS WAF rules. • If using managed rule groups, review them for rules that might affect API authentication flows and consider disabling those specific rules. • Test your identity provider directly using the TestIdentityProvider API operation to verify it works correctly without AWS WAF interference. Troubleshoot service-managed user issues This section describes possible solutions for issues with service-managed users. Topics • Troubleshoot service-managed users Troubleshoot service-managed users This section describes possible solutions for the following issues. Topics • Troubleshoot public key body too long • Troubleshoot failed to add SSH public key Troubleshoot public key body too long Description When you try to create a service-managed user, you receive the following error: Failed to create user (1 validation error detected: 'sshPublicKeyBody' failed to satisfy constraint: Member must have length less than or equal to 2048) Cause Service-managed user issues 647 AWS Transfer Family User Guide You might be entering a PGP key for the public key body, and AWS Transfer Family does not support PGP keys for service-managed users. Solution If the PGP key is RSA-based, you can convert it to PEM format. For example, Ubuntu provides a conversion tool here: https://manpages.ubuntu.com/manpages/xenial/man1/openpgp2ssh.1.html Troubleshoot failed to add SSH public key Description When you try to add a public key for a service-managed user, you receive the following error: Failed to add SSH public key (Unsupported or invalid SSH public key format) Cause You might be attempting to import an SSH2-formatted public key, and AWS Transfer Family does not support SSH2-formatted public keys for service-managed users. Solution You need to convert the key into OpenSSH format. This process is described in Converting an SSH2 key to SSH public key format. Troubleshoot AS2 issues This section describes possible solutions for issues with AS2 transfers. Topics • Troubleshoot AS2 issues • AS2 certificate issues • AS2 |
transferfamily-ug-186 | transferfamily-ug.pdf | 186 | try to add a public key for a service-managed user, you receive the following error: Failed to add SSH public key (Unsupported or invalid SSH public key format) Cause You might be attempting to import an SSH2-formatted public key, and AWS Transfer Family does not support SSH2-formatted public keys for service-managed users. Solution You need to convert the key into OpenSSH format. This process is described in Converting an SSH2 key to SSH public key format. Troubleshoot AS2 issues This section describes possible solutions for issues with AS2 transfers. Topics • Troubleshoot AS2 issues • AS2 certificate issues • AS2 MDN receipt issues Troubleshoot AS2 issues AS2 error codes, messages and troubleshooting tips for Applicability Statement 2 (AS2)-enabled servers are described in the AS2 failure codes section in this guide. AS2 issues 648 AWS Transfer Family AS2 certificate issues Description User Guide You're experiencing certificate-related errors with AS2 transfers. Cause Common causes include expired certificates, incorrect certificate formats, or mismatched certificate chains. Solution Try the following solutions: • Verify that your certificates are not expired • Ensure certificates are in the correct format (PEM for AWS Transfer Family) • Check that the certificate chain is complete and valid • Confirm that the signing and encryption certificates match between trading partners • Rotate certificates well before expiration to avoid interruptions AS2 MDN receipt issues Description You're not receiving expected Message Disposition Notifications (MDNs) for AS2 transfers. Cause MDN issues can occur due to network connectivity problems, incorrect endpoint configurations, or MDN format mismatches. Solution Consider these solutions: • Verify that the MDN URL is correctly configured and accessible • Check network connectivity between the AS2 server and the MDN endpoint • Ensure that both trading partners are configured for the same MDN type (synchronous or asynchronous) AS2 certificate issues 649 AWS Transfer Family User Guide • Review AS2 logs for any errors related to MDN processing • If using synchronous MDNs, verify that timeouts are set appropriately AS2 MDN receipt issues 650 AWS Transfer Family User Guide AWS Transfer Family API Reference The complete API Reference guide for Transfer Family is available at AWS Transfer Family API Reference. AWS Transfer Family is a secure transfer service that you can use to transfer files into and out of Amazon Simple Storage Service (Amazon S3) storage over the following protocols: • Secure Shell (SSH) File Transfer Protocol (SFTP) • File Transfer Protocol Secure (FTPS) • File Transfer Protocol (FTP) • Applicability Statement 2 (AS2) Servers, users, and roles are all identified by their Amazon Resource Name (ARN). You can assign tags, which are key-value pairs, to entities with an ARN. Tags are metadata that can be used to group or search for these entities. One example where tags are useful is for accounting purposes. The following conventions are observed in AWS Transfer Family ID formats: • ServerId values take the form s-01234567890abcdef. • SshPublicKeyId values take the form key-01234567890abcdef. Amazon Resource Name (ARN) formats take the following form: • For servers, ARNs take the form arn:aws:transfer:region:account-id:server/server- id. An example of a server ARN is: arn:aws:transfer:us-east-1:123456789012:server/ s-01234567890abcdef. • For users, ARNs take the form arn:aws:transfer:region:account-id:user/server- id/username. An example is arn:aws:transfer:us-east-1:123456789012:user/ s-01234567890abcdef/user1. DNS entries (endpoints) in use are as follows: 651 AWS Transfer Family User Guide • API endpoints take the form transfer.region.amazonaws.com. • Server endpoints take the form server.transfer.region.amazonaws.com. This API interface reference for AWS Transfer Family contains documentation for a programming interface that you can use to manage AWS Transfer Family. The reference structure is as follows: • For the alphabetical list of API actions, see Actions. • For the alphabetical list of data types, see Types. • For a list of common query parameters, see Common Parameters. • For descriptions of the error codes, see Common Errors. Tip Rather than actually running a command, you can use the --generate-cli-skeleton parameter with any API call to generate and display a parameter template. You can then use the generated template to customize and use as input on a later command. For details, see Generate and use a parameter skeleton file. 652 AWS Transfer Family User Guide Document history for AWS Transfer Family The following table describes the documentation for this release of AWS Transfer Family. • API version: transfer-2018-11-05 • Latest documentation update: April 9, 2025 Change Description Date Enhancements to the SFTP connectors user experience Ability for SFTP connectors to delete, rename, and move files on the remote SFTP server • Ability to self-serve April 9, 2025 concurrent connections setting for your connectors • Ability to provide SSH private key in OpenSSH format that is used for authenticating connections • Ability to discover the public host key of remote servers using their SFTP connectors For details, see Create an SFTP connector. You can now organize your files stored on remote SFTP servers by |
transferfamily-ug-187 | transferfamily-ug.pdf | 187 | Family. • API version: transfer-2018-11-05 • Latest documentation update: April 9, 2025 Change Description Date Enhancements to the SFTP connectors user experience Ability for SFTP connectors to delete, rename, and move files on the remote SFTP server • Ability to self-serve April 9, 2025 concurrent connections setting for your connectors • Ability to provide SSH private key in OpenSSH format that is used for authenticating connections • Ability to discover the public host key of remote servers using their SFTP connectors For details, see Create an SFTP connector. You can now organize your files stored on remote SFTP servers by deleting, renaming or moving source files to archive locations after they have been copied from the remote server. For details, see Move or rename files or directories on the remote SFTP server. April 7, 2025 653 AWS Transfer Family User Guide Change Description Date Support for AWS Transfer Family web apps AWS Transfer Family web apps are a new resource December 1, 2024 customers can use to create a simple interface for accessing their data in Amazon S3 through a web browser. For details, see Transfer Family web apps. Moved API Reference into a separate guide To improve the customer experience, the API Reference July 31, 2024 is now published separately from the user guide. For the separate API reference, see Welcome to the AWS Transfer Family API. Ability for SFTP connectors to list remote files and directori Transfer Family has added the ability for our customers April 23, 2024 es Ability to use a trading partner's self-signed TLS certificate with AS2 message exchange to use SFTP connectors to list files stored in remote SFTP servers. For details, see List contents of a remote directory AWS Transfer Family has added the option to import and use a trading partner's public, self-signed TLS certificate for sending Applicability Statement 2 (AS2) messages to their server over HTTPS . April 12, 2024 654 AWS Transfer Family User Guide Change Description Date Addition of security policies for SFTP connectors AWS Transfer Family has added security policies for April 5, 2024 Integrate with Amazon EventBridge Addition of new security policies use with SFTP connectors. For details, see Security policies for AWS Transfer Family SFTP connectors. AWS Transfer Family now automatically publishes events to Amazon EventBrid ge for all file transfer operations. For details, see Managing Transfer Family events using Amazon EventBridge. AWS Transfer Family has added new FIPS and non- FIPS security policies. Also, the default security policy assigned to servers is always the latest security policy. For details, see Security policies for AWS Transfer Family servers. February 8, 2024 February 5, 2024 655 AWS Transfer Family User Guide Change Description Date Support for static IP addresses for SFTP connector Transfer Family now provides static IP addresses for SFTP January 16, 2024 s and AS2 connectors and AS2. This enables connection with remote SFTP servers that are secured by IP allowlist ing controls. For AS2, we're introducing static IP addresses for asynchronous MDN responses from AS2 servers. The user guide has been reorganized to align more Transfer Family has added multiple features since the closely with the latest version guide originated, necessita of AWS Transfer Family. ting a restructuring of the guide. January 3, 2024 Logical directory mappings enhancements Transfer Family now supports logical directory mappings November 17, 2023 Amazon S3 list performance optimization up to 2.1 MB. You can also now declare whether a user mapping is to a file. For more information, see Rules for using logical directories. When creating or updating a server that uses Amazon S3 for storage, you can now optimize the performance of listing your S3 directories (or folders). For more informati on, see Configuring an SFTP, FTPS, or FTP server endpoint. 656 AWS Transfer Family User Guide Change Description Date Alternate port for SFTP servers with virtual private You can now enable an alternate nonstandard cloud (VPC) endpoints port for your SFTP Transfer November 17, 2023 Support for SFTP connectors Support for AS2 Basic authentication Support for structured JSON logging July 25, 2023 June 30, 2023 June 24, 2023 Family servers that have VPC endpoints. For more informati on, see Create a server in a virtual private cloud. SFTP Connectors extend the capabilities of AWS Transfer Family to communicate with remote servers both in the cloud and on-premises. For more information, see Using SFTP connectors. Transfer Family now supports using Basic authentication for servers that use the Applicabi lity Statement 2 (AS2) protocol. For more informati on, see Basic authentication for AS2 connectors. Transfer Family now supports delivering structured JSON logs to Amazon CloudWatc h, grouping log steams into custom log groups, and performing common log queries across protocols. For more information, see Amazon CloudWatch logging for AWS Transfer Family servers. 657 AWS Transfer Family User Guide Change |
transferfamily-ug-188 | transferfamily-ug.pdf | 188 | SFTP Connectors extend the capabilities of AWS Transfer Family to communicate with remote servers both in the cloud and on-premises. For more information, see Using SFTP connectors. Transfer Family now supports using Basic authentication for servers that use the Applicabi lity Statement 2 (AS2) protocol. For more informati on, see Basic authentication for AS2 connectors. Transfer Family now supports delivering structured JSON logs to Amazon CloudWatc h, grouping log steams into custom log groups, and performing common log queries across protocols. For more information, see Amazon CloudWatch logging for AWS Transfer Family servers. 657 AWS Transfer Family User Guide Change Description Date Support for multiple methods of authentication Transfer Family has support for authenticating by using May 17, 2023 a password, a public/pr ivate key pair, or both. This is available for servers that use the SFTP protocol and a custom identity provider. For more information, see Create an SFTP-enabled server. Support for Pretty Good Privacy (PGP) decryption with files that Transfer Family Transfer Family has built- in support for Pretty Good Privacy (PGP) decryption. You processes with workflows can use PGP decryption on December 21, 2022 files that are uploaded over SFTP, FTPS, or FTP to Amazon Simple Storage Service (Amazon S3) or Amazon Elastic File System (Amazon EFS). For more information, see Generate PGP keys and Use PGP decryption in your workflow. You can create servers that use the AS2 protocol for sending and receiving information to and from trading partners who are inside or outside the AWS environment. For more information, see Configuring AS2. July 25, 2022 Fully managed support for Applicability Statement 2 (AS2) file transfer protocol with Transfer Family servers 658 AWS Transfer Family User Guide Change Description Date Support for display banners when creating a server You can add customized messages when you create February 17, 2022 servers. You can display a pre- authentication message (all protocols), and a post-auth entication message (for FTP and FTPS servers). For more information, see Create an SFTP-enabled server, Create an FTPS-enabled server, or Create an FTP-enabled server. Support for AWS Lambda as an identity provider You can now connect to a custom identity provider November 16, 2021 Support for Managed File Transfer Workflows using AWS Lambda with their Transfer Family servers. Previously, you had to supply an Amazon API Gateway URL to integrate a custom identity provider. For more informati on, see Using AWS Lambda to integrate your identity provider. Managed File Transfer Workflows provide you with post-upload processing abstractions for the common tasks that you currently perform manually. For more information, see AWS Transfer Family managed workflows. September 2, 2021 659 AWS Transfer Family User Guide Change Description Date Support for AWS Directory Service for Microsoft Active In addition to service managed and custom identity May 24, 2021 Directory New AWS Regions New AWS Regions providers, you can now use AWS Directory Service for Microsoft Active Directory to manage user access for authentication and authoriza tion. For more information, see Using AWS Directory Service for Microsoft Active Directory. AWS Transfer Family is now available in the Africa (Cape Town) Region. For more information about Transfer Family endpoints, see AWS Transfer Family endpoints and quotas in the AWS General Reference. AWS Transfer Family is now available in the Asia Pacific (Hong Kong) and Middle East (Bahrain) Regions. For more information about Transfer Family endpoints , see AWS Transfer Family endpoints and quotas in the AWS General Reference. February 24, 2021 February 17, 2021 660 AWS Transfer Family User Guide Change Description Date Support for Amazon EFS as a data store Transfer Family now supports file transfers into and out of January 06, 2021 Support for AWS WAF Amazon Elastic File System (Amazon EFS). Amazon EFS is a simple, scalable, fully managed elastic NFS file system. For more information, see Configure an Amazon EFS file system. Transfer Family now supports AWS WAF, a web application firewall that helps protect web applications and API operations from attacks. For more information, see Add a web application firewall. November 24, 2020 Support for multiple security groups in a virtual private You can now attach multiple security groups to a server in October 15, 2020 cloud (VPC) a VPC. For more information, see Create a server in a virtual private cloud. 661 AWS Transfer Family User Guide Change Description Date New AWS Regions September 30, 2020 Transfer Family is now available in the AWS GovCloud (US) Regions. For more information about Transfer Family endpoints for AWS GovCloud (US) Regions, see AWS Transfer Family endpoints and quotas in the AWS General Reference. For information about using Transfer Family in the AWS GovCloud (US) Regions, see AWS Transfer Family in the AWS GovCloud (US) User Guide. A security policy with supported cryptographic You can now attach a security policy that contains a set August |
transferfamily-ug-189 | transferfamily-ug.pdf | 189 | see Create a server in a virtual private cloud. 661 AWS Transfer Family User Guide Change Description Date New AWS Regions September 30, 2020 Transfer Family is now available in the AWS GovCloud (US) Regions. For more information about Transfer Family endpoints for AWS GovCloud (US) Regions, see AWS Transfer Family endpoints and quotas in the AWS General Reference. For information about using Transfer Family in the AWS GovCloud (US) Regions, see AWS Transfer Family in the AWS GovCloud (US) User Guide. A security policy with supported cryptographic You can now attach a security policy that contains a set August 12, 2020 algorithms can now be of supported cryptographic attached to your server algorithms to your server. For more information, see Security policies for AWS Transfer Family servers. 662 AWS Transfer Family User Guide Change Description Date Support for Federal Informati on Processing Standard (FIPS) FIPS-enabled endpoints are now available in North August 12, 2020 endpoints American AWS Regions. For available Regions, see AWS Transfer Family endpoints and quotas in the AWS General Reference. To enable FIPS for an SFTP-enabled server endpoint, see Create an SFTP-enabled server. To enable FIPS for an FTPS- enabled server endpoint, see Create an FTPS-enabled server. To enable FIPS for an FTP-enabled server endpoint, see Create an FTP-enabled server. Username character-length increase and additional allowed characters Support for automatic Amazon CloudWatch logging AWS Identity and Access Management (IAM) role creation Usernames can now contain August 12, 2020 at signs (@) and periods (.), and can be a maximum length of 100 characters. To add a user, see Managing users for server endpoints. Transfer Family now supports automatic creation of a CloudWatch logging IAM role to view end-user activity. For more information, see Create an SFTP-enabled server, Create an FTPS-enab led server, or Create an FTP- enabled server. July 30, 2020 663 AWS Transfer Family User Guide Change Description Date AWS Transfer Family now supports Source IP as a factor Transfer Family adds support for using end users' source June 9, 2020 for authorization. IP addresses as a factor for authorization, enabling you to apply an additiona l layer of security when authorizing access over Secure File Transfer Protocol (SFTP), File Transfer Protocol over SSL (FTPS), or File Transfer Protocol (FTP). For more information, see Working with custom identity providers. AWS Transfer for SFTP is now AWS Transfer Family and adds You can now use two additional protocols for support for FTP and FTPS. your users' file transfers: File April 23, 2020 Transfer Protocol Secure (FTPS) and File Transfer Protocol (FTP). Users can move, run, secure, and integrate FTP over SSL (FTPS) and plaintext FTP based workflows in AWS, in addition to existing Secure File Transfer Protocol (SFTP) support. 664 AWS Transfer Family User Guide Change Description Date Support for virtual private cloud (VPC) security groups You can now create an allowlist for incoming IP and Elastic IP addresses addresses using security January 10, 2020 groups, providing an additional layer of security for servers. You can also associate Elastic IP addresses with your server's endpoint. By doing this, you can enable users behind firewalls to allow access to that endpoint. For more information, see Create a server in a virtual private cloud. You can now create a server in a VPC. You can use your server to transfer data over your client to and from an Amazon S3 bucket without going over the public internet. For more informati on, see Create a server in a virtual private cloud. This initial release includes setting up directions, describes how to get started, and provides information on client configuration, user configuration, and monitoring activity. March 27, 2019 November 25, 2018 Support for working in a VPC First version of AWS Transfer Family released. 665 |
translate-api-001 | translate-api.pdf | 1 | Amazon Translate API Reference Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon Translate API Reference Amazon Translate API Reference: Copyright © 2025 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. Amazon Translate API Reference Table of Contents Amazon Translate API Reference .................................................................................................... 1 Actions ............................................................................................................................................................ 1 CreateParallelData ................................................................................................................................... 3 DeleteParallelData ................................................................................................................................... 8 DeleteTerminology ................................................................................................................................ 11 DescribeTextTranslationJob ................................................................................................................ 13 GetParallelData ...................................................................................................................................... 16 GetTerminology ..................................................................................................................................... 20 ImportTerminology ............................................................................................................................... 24 ListLanguages ........................................................................................................................................ 29 ListParallelData ...................................................................................................................................... 33 ListTagsForResource ............................................................................................................................. 37 ListTerminologies .................................................................................................................................. 40 ListTextTranslationJobs ........................................................................................................................ 44 StartTextTranslationJob ....................................................................................................................... 48 StopTextTranslationJob ....................................................................................................................... 55 TagResource ........................................................................................................................................... 58 TranslateDocument ............................................................................................................................... 61 TranslateText .......................................................................................................................................... 67 UntagResource ....................................................................................................................................... 73 UpdateParallelData ............................................................................................................................... 76 Data Types ................................................................................................................................................... 80 AppliedTerminology ............................................................................................................................. 82 Document ............................................................................................................................................... 83 EncryptionKey ........................................................................................................................................ 85 InputDataConfig .................................................................................................................................... 86 JobDetails ............................................................................................................................................... 88 Language ................................................................................................................................................ 89 OutputDataConfig ................................................................................................................................. 90 ParallelDataConfig ................................................................................................................................ 91 ParallelDataDataLocation .................................................................................................................... 92 ParallelDataProperties ......................................................................................................................... 94 Tag ............................................................................................................................................................ 98 Term ......................................................................................................................................................... 99 TerminologyData ................................................................................................................................. 100 iii Amazon Translate API Reference TerminologyDataLocation ................................................................................................................. 102 TerminologyProperties ...................................................................................................................... 104 TextTranslationJobFilter .................................................................................................................... 108 TextTranslationJobProperties ........................................................................................................... 110 TranslatedDocument .......................................................................................................................... 114 TranslationSettings ............................................................................................................................. 115 Common Parameters ............................................................................................................................... 117 Common Errors ........................................................................................................................................ 119 iv Amazon Translate API Reference Amazon Translate API Reference This document provides detailed information about the Amazon Translate API actions and their parameters. For information about the IAM access control permissions you need to use this API, see Using IAM identity policies to manage permissions. You can use AWS SDKs to access Amazon Translate APIs using your favorite programming language. The SDKs automatically perform useful tasks for you, such as: • Cryptographically sign your service requests • Retry requests • Handle error responses The following resources provide additional information about the Amazon Translate API. • Amazon Web Services General Reference • Amazon Translate Endpoints for each region. • AWS Command Line Interface • Amazon Translate CLI commands. Topics • Actions • Data Types • Common Parameters • Common Errors Actions The following actions are supported: • CreateParallelData • DeleteParallelData • DeleteTerminology Actions 1 Amazon Translate API Reference • DescribeTextTranslationJob • GetParallelData • GetTerminology • ImportTerminology • ListLanguages • ListParallelData • ListTagsForResource • ListTerminologies • ListTextTranslationJobs • StartTextTranslationJob • StopTextTranslationJob • TagResource • TranslateDocument • TranslateText • UntagResource • UpdateParallelData Actions 2 Amazon Translate API Reference CreateParallelData Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output. Request Syntax { "ClientToken": "string", "Description": "string", "EncryptionKey": { "Id": "string", "Type": "string" }, "Name": "string", "ParallelDataConfig": { "Format": "string", "S3Uri": "string" }, "Tags": [ { "Key": "string", "Value": "string" } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ClientToken A unique identifier for the request. This token is automatically generated when you use Amazon Translate through an AWS SDK. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. CreateParallelData 3 Amazon Translate API Reference Pattern: ^[a-zA-Z0-9-]+$ Required: Yes Description A custom description for the parallel data resource in Amazon Translate. Type: String Length Constraints: Maximum length of 256. Pattern: [\P{M}\p{M}]{0,256} Required: No EncryptionKey The encryption key used to encrypt this object. Type: EncryptionKey object Required: No Name A custom name for the parallel data resource in Amazon Translate. You must assign a name that is unique in the account and region. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: Yes ParallelDataConfig Specifies the format and S3 location of the parallel data input file. Type: ParallelDataConfig object Required: Yes CreateParallelData 4 Amazon Translate API Reference Tags Tags to be associated with this resource. A tag is a key-value pair that adds metadata to a resource. Each tag key for the resource must be unique. For more information, see Tagging your resources in the Amazon Translate Developer Guide. Type: Array of Tag objects Array Members: Minimum number of 0 items. Maximum number of 200 items. Required: No Response Syntax { "Name": "string", "Status": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. Name The custom name that you assigned to the parallel data resource. Type: |
translate-api-002 | translate-api.pdf | 2 | A tag is a key-value pair that adds metadata to a resource. Each tag key for the resource must be unique. For more information, see Tagging your resources in the Amazon Translate Developer Guide. Type: Array of Tag objects Array Members: Minimum number of 0 items. Maximum number of 200 items. Required: No Response Syntax { "Name": "string", "Status": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. Name The custom name that you assigned to the parallel data resource. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Status The status of the parallel data resource. When the resource is ready for you to use, the status is ACTIVE. Type: String Valid Values: CREATING | UPDATING | ACTIVE | DELETING | FAILED CreateParallelData 5 Amazon Translate API Reference Errors For information about the errors that are common to all actions, see Common Errors. ConcurrentModificationException Another modification is being made. That modification must complete before you can make your change. HTTP Status Code: 400 ConflictException There was a conflict processing the request. Try your request again. HTTP Status Code: 400 InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 InvalidRequestException The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. HTTP Status Code: 400 LimitExceededException The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. CreateParallelData 6 Amazon Translate API Reference HTTP Status Code: 400 TooManyTagsException You have added too many tags to this resource. The maximum is 50 tags. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateParallelData 7 Amazon Translate API Reference DeleteParallelData Deletes a parallel data resource in Amazon Translate. Request Syntax { "Name": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Name The name of the parallel data resource that is being deleted. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: Yes Response Syntax { "Name": "string", "Status": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. DeleteParallelData 8 Amazon Translate API Reference Name The name of the parallel data resource that is being deleted. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Status The status of the parallel data deletion. Type: String Valid Values: CREATING | UPDATING | ACTIVE | DELETING | FAILED Errors For information about the errors that are common to all actions, see Common Errors. ConcurrentModificationException Another modification is being made. That modification must complete before you can make your change. HTTP Status Code: 400 InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. DeleteParallelData 9 Amazon Translate API Reference HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteParallelData 10 Amazon Translate API Reference DeleteTerminology A synchronous action that deletes a custom terminology. Request Syntax { "Name": "string" } Request |
translate-api-003 | translate-api.pdf | 3 | HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteParallelData 10 Amazon Translate API Reference DeleteTerminology A synchronous action that deletes a custom terminology. Request Syntax { "Name": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Name The name of the custom terminology being deleted. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: Yes Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 DeleteTerminology 11 Amazon Translate API Reference InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteTerminology 12 Amazon Translate API Reference DescribeTextTranslationJob Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on. Request Syntax { "JobId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. JobId The identifier that Amazon Translate generated for the job. The StartTextTranslationJob operation returns this identifier in its response. Type: String Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ Required: Yes Response Syntax { "TextTranslationJobProperties": { "DataAccessRoleArn": "string", "EndTime": number, "InputDataConfig": { "ContentType": "string", "S3Uri": "string" }, "JobDetails": { DescribeTextTranslationJob 13 Amazon Translate API Reference "DocumentsWithErrorsCount": number, "InputDocumentsCount": number, "TranslatedDocumentsCount": number }, "JobId": "string", "JobName": "string", "JobStatus": "string", "Message": "string", "OutputDataConfig": { "EncryptionKey": { "Id": "string", "Type": "string" }, "S3Uri": "string" }, "ParallelDataNames": [ "string" ], "Settings": { "Brevity": "string", "Formality": "string", "Profanity": "string" }, "SourceLanguageCode": "string", "SubmittedTime": number, "TargetLanguageCodes": [ "string" ], "TerminologyNames": [ "string" ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. TextTranslationJobProperties An object that contains the properties associated with an asynchronous batch translation job. Type: TextTranslationJobProperties object Errors For information about the errors that are common to all actions, see Common Errors. DescribeTextTranslationJob 14 Amazon Translate API Reference InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DescribeTextTranslationJob 15 Amazon Translate API Reference GetParallelData Provides information about a parallel data resource. Request Syntax { "Name": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts |
translate-api-004 | translate-api.pdf | 4 | language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DescribeTextTranslationJob 15 Amazon Translate API Reference GetParallelData Provides information about a parallel data resource. Request Syntax { "Name": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Name The name of the parallel data resource that is being retrieved. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: Yes Response Syntax { "AuxiliaryDataLocation": { "Location": "string", "RepositoryType": "string" }, "DataLocation": { "Location": "string", "RepositoryType": "string" }, "LatestUpdateAttemptAuxiliaryDataLocation": { GetParallelData 16 Amazon Translate API Reference "Location": "string", "RepositoryType": "string" }, "ParallelDataProperties": { "Arn": "string", "CreatedAt": number, "Description": "string", "EncryptionKey": { "Id": "string", "Type": "string" }, "FailedRecordCount": number, "ImportedDataSize": number, "ImportedRecordCount": number, "LastUpdatedAt": number, "LatestUpdateAttemptAt": number, "LatestUpdateAttemptStatus": "string", "Message": "string", "Name": "string", "ParallelDataConfig": { "Format": "string", "S3Uri": "string" }, "SkippedRecordCount": number, "SourceLanguageCode": "string", "Status": "string", "TargetLanguageCodes": [ "string" ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. AuxiliaryDataLocation The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration. Type: ParallelDataDataLocation object GetParallelData 17 Amazon Translate API Reference DataLocation The Amazon S3 location of the most recent parallel data input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30- minute expiration. Important Amazon Translate doesn't scan all input files for the risk of CSV injection attacks. CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator. Type: ParallelDataDataLocation object LatestUpdateAttemptAuxiliaryDataLocation The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to update a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration. Type: ParallelDataDataLocation object ParallelDataProperties The properties of the parallel data resource that is being retrieved. Type: ParallelDataProperties object Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 GetParallelData 18 Amazon Translate API Reference InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetParallelData 19 Amazon Translate API Reference GetTerminology Retrieves a custom terminology. Request Syntax { "Name": "string", "TerminologyDataFormat": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Name The name of the custom terminology being retrieved. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: Yes TerminologyDataFormat The data format of the custom terminology being retrieved. If you don't specify this parameter, Amazon Translate returns a file with the same format as the file that was imported to create the terminology. If you |
translate-api-005 | translate-api.pdf | 5 | GetTerminology Retrieves a custom terminology. Request Syntax { "Name": "string", "TerminologyDataFormat": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Name The name of the custom terminology being retrieved. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: Yes TerminologyDataFormat The data format of the custom terminology being retrieved. If you don't specify this parameter, Amazon Translate returns a file with the same format as the file that was imported to create the terminology. If you specify this parameter when you retrieve a multi-directional terminology resource, you must specify the same format as the input file that was imported to create it. Otherwise, Amazon Translate throws an error. Type: String Valid Values: CSV | TMX | TSV Required: No GetTerminology 20 Amazon Translate API Reference Response Syntax { "AuxiliaryDataLocation": { "Location": "string", "RepositoryType": "string" }, "TerminologyDataLocation": { "Location": "string", "RepositoryType": "string" }, "TerminologyProperties": { "Arn": "string", "CreatedAt": number, "Description": "string", "Directionality": "string", "EncryptionKey": { "Id": "string", "Type": "string" }, "Format": "string", "LastUpdatedAt": number, "Message": "string", "Name": "string", "SizeBytes": number, "SkippedTermCount": number, "SourceLanguageCode": "string", "TargetLanguageCodes": [ "string" ], "TermCount": number } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. AuxiliaryDataLocation The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a terminology resource. The location is returned as a presigned URL to that has a 30-minute expiration. GetTerminology 21 Amazon Translate API Reference Type: TerminologyDataLocation object TerminologyDataLocation The Amazon S3 location of the most recent custom terminology input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30- minute expiration. Important Amazon Translate doesn't scan all input files for the risk of CSV injection attacks. CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator. Type: TerminologyDataLocation object TerminologyProperties The properties of the custom terminology being retrieved. Type: TerminologyProperties object Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 GetTerminology 22 Amazon Translate API Reference ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetTerminology 23 Amazon Translate API Reference ImportTerminology Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name. If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology. Request Syntax { "Description": "string", "EncryptionKey": { "Id": "string", "Type": "string" }, "MergeStrategy": "string", "Name": "string", "Tags": [ { "Key": "string", "Value": "string" } ], "TerminologyData": { "Directionality": "string", "File": blob, "Format": "string" } } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Description The description of the custom terminology being imported. ImportTerminology 24 Amazon Translate API Reference Type: String |
translate-api-006 | translate-api.pdf | 6 | an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology. Request Syntax { "Description": "string", "EncryptionKey": { "Id": "string", "Type": "string" }, "MergeStrategy": "string", "Name": "string", "Tags": [ { "Key": "string", "Value": "string" } ], "TerminologyData": { "Directionality": "string", "File": blob, "Format": "string" } } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Description The description of the custom terminology being imported. ImportTerminology 24 Amazon Translate API Reference Type: String Length Constraints: Maximum length of 256. Pattern: [\P{M}\p{M}]{0,256} Required: No EncryptionKey The encryption key for the custom terminology being imported. Type: EncryptionKey object Required: No MergeStrategy The merge strategy of the custom terminology being imported. Currently, only the OVERWRITE merge strategy is supported. In this case, the imported terminology will overwrite an existing terminology of the same name. Type: String Valid Values: OVERWRITE Required: Yes Name The name of the custom terminology being imported. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: Yes Tags Tags to be associated with this resource. A tag is a key-value pair that adds metadata to a resource. Each tag key for the resource must be unique. For more information, see Tagging your resources in the Amazon Translate Developer Guide. Type: Array of Tag objects ImportTerminology 25 Amazon Translate API Reference Array Members: Minimum number of 0 items. Maximum number of 200 items. Required: No TerminologyData The terminology data for the custom terminology being imported. Type: TerminologyData object Required: Yes Response Syntax { "AuxiliaryDataLocation": { "Location": "string", "RepositoryType": "string" }, "TerminologyProperties": { "Arn": "string", "CreatedAt": number, "Description": "string", "Directionality": "string", "EncryptionKey": { "Id": "string", "Type": "string" }, "Format": "string", "LastUpdatedAt": number, "Message": "string", "Name": "string", "SizeBytes": number, "SkippedTermCount": number, "SourceLanguageCode": "string", "TargetLanguageCodes": [ "string" ], "TermCount": number } } Response Elements If the action is successful, the service sends back an HTTP 200 response. ImportTerminology 26 Amazon Translate API Reference The following data is returned in JSON format by the service. AuxiliaryDataLocation The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a terminology resource. The location is returned as a presigned URL to that has a 30 minute expiration. Type: TerminologyDataLocation object TerminologyProperties The properties of the custom terminology being imported. Type: TerminologyProperties object Errors For information about the errors that are common to all actions, see Common Errors. ConcurrentModificationException Another modification is being made. That modification must complete before you can make your change. HTTP Status Code: 400 InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 LimitExceededException The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit. ImportTerminology 27 Amazon Translate API Reference HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 TooManyTagsException You have added too many tags to this resource. The maximum is 50 tags. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 ImportTerminology 28 Amazon Translate API Reference ListLanguages Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports. Request Syntax { "DisplayLanguageCode": "string", "MaxResults": number, "NextToken": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DisplayLanguageCode The language code for the language to use to display the language names in the response. The language code is en by default. Type: String Valid Values: de | en | es | fr | it | ja | ko | pt | zh | zh-TW Required: No MaxResults The maximum number of results to return in each response. Type: Integer Valid Range: Minimum value of 1. Maximum value of 500. Required: No NextToken Include the NextToken value to fetch the next group of supported languages. Type: String ListLanguages 29 Amazon Translate API Reference Length Constraints: Maximum length |
translate-api-007 | translate-api.pdf | 7 | format. DisplayLanguageCode The language code for the language to use to display the language names in the response. The language code is en by default. Type: String Valid Values: de | en | es | fr | it | ja | ko | pt | zh | zh-TW Required: No MaxResults The maximum number of results to return in each response. Type: Integer Valid Range: Minimum value of 1. Maximum value of 500. Required: No NextToken Include the NextToken value to fetch the next group of supported languages. Type: String ListLanguages 29 Amazon Translate API Reference Length Constraints: Maximum length of 8192. Pattern: \p{ASCII}{0,8192} Required: No Response Syntax { "DisplayLanguageCode": "string", "Languages": [ { "LanguageCode": "string", "LanguageName": "string" } ], "NextToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. DisplayLanguageCode The language code passed in with the request. Type: String Valid Values: de | en | es | fr | it | ja | ko | pt | zh | zh-TW Languages The list of supported languages. Type: Array of Language objects NextToken If the response does not include all remaining results, use the NextToken in the next request to fetch the next group of supported languages. ListLanguages 30 Amazon Translate API Reference Type: String Length Constraints: Maximum length of 8192. Pattern: \p{ASCII}{0,8192} Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 UnsupportedDisplayLanguageCodeException Requested display language code is not supported. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET ListLanguages 31 Amazon Translate API Reference • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 ListLanguages 32 Amazon Translate API Reference ListParallelData Provides a list of your parallel data resources in Amazon Translate. Request Syntax { "MaxResults": number, "NextToken": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. MaxResults The maximum number of parallel data resources returned for each request. Type: Integer Valid Range: Minimum value of 1. Maximum value of 500. Required: No NextToken A string that specifies the next page of results to return in a paginated response. Type: String Length Constraints: Maximum length of 8192. Pattern: \p{ASCII}{0,8192} Required: No Response Syntax { ListParallelData 33 Amazon Translate API Reference "NextToken": "string", "ParallelDataPropertiesList": [ { "Arn": "string", "CreatedAt": number, "Description": "string", "EncryptionKey": { "Id": "string", "Type": "string" }, "FailedRecordCount": number, "ImportedDataSize": number, "ImportedRecordCount": number, "LastUpdatedAt": number, "LatestUpdateAttemptAt": number, "LatestUpdateAttemptStatus": "string", "Message": "string", "Name": "string", "ParallelDataConfig": { "Format": "string", "S3Uri": "string" }, "SkippedRecordCount": number, "SourceLanguageCode": "string", "Status": "string", "TargetLanguageCodes": [ "string" ] } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextToken The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages. Type: String Length Constraints: Maximum length of 8192. ListParallelData 34 Amazon Translate API Reference Pattern: \p{ASCII}{0,8192} ParallelDataPropertiesList The properties of the parallel data resources returned by this request. Type: Array of ParallelDataProperties objects Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 |
translate-api-008 | translate-api.pdf | 8 | the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 ListParallelData 35 Amazon Translate API Reference • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 ListParallelData 36 Amazon Translate API Reference ListTagsForResource Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources in the Amazon Translate Developer Guide. Request Syntax { "ResourceArn": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The Amazon Resource Name (ARN) of the given Amazon Translate resource you are querying. Type: String Length Constraints: Minimum length of 1. Maximum length of 512. Required: Yes Response Syntax { "Tags": [ { "Key": "string", "Value": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. ListTagsForResource 37 Amazon Translate API Reference The following data is returned in JSON format by the service. Tags Tags associated with the Amazon Translate resource being queried. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Translate. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department. Type: Array of Tag objects Array Members: Minimum number of 0 items. Maximum number of 200 items. Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface ListTagsForResource 38 Amazon Translate API Reference • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 ListTagsForResource 39 Amazon Translate API Reference ListTerminologies Provides a list of custom terminologies associated with your account. Request Syntax { "MaxResults": number, "NextToken": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. MaxResults The maximum number of custom terminologies returned per list request. Type: Integer Valid Range: Minimum value of 1. Maximum value of 500. Required: No NextToken If the result of the request to ListTerminologies was truncated, include the NextToken to fetch the next group of custom terminologies. Type: String Length Constraints: Maximum length of 8192. Pattern: \p{ASCII}{0,8192} Required: No Response Syntax { ListTerminologies 40 Amazon Translate API Reference "NextToken": "string", "TerminologyPropertiesList": [ { "Arn": "string", "CreatedAt": number, "Description": "string", "Directionality": "string", "EncryptionKey": { "Id": "string", "Type": "string" }, "Format": "string", "LastUpdatedAt": number, "Message": "string", "Name": "string", "SizeBytes": number, "SkippedTermCount": number, "SourceLanguageCode": "string", "TargetLanguageCodes": [ "string" ], "TermCount": number } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextToken If the response to the ListTerminologies was truncated, the NextToken fetches the next group of custom terminologies. Type: String Length Constraints: Maximum length of 8192. Pattern: \p{ASCII}{0,8192} TerminologyPropertiesList The properties list of the custom terminologies returned on the list request. ListTerminologies 41 Amazon Translate API Reference Type: Array of TerminologyProperties objects Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and |
translate-api-009 | translate-api.pdf | 9 | the response to the ListTerminologies was truncated, the NextToken fetches the next group of custom terminologies. Type: String Length Constraints: Maximum length of 8192. Pattern: \p{ASCII}{0,8192} TerminologyPropertiesList The properties list of the custom terminologies returned on the list request. ListTerminologies 41 Amazon Translate API Reference Type: Array of TerminologyProperties objects Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python ListTerminologies 42 Amazon Translate API Reference • AWS SDK for Ruby V3 ListTerminologies 43 Amazon Translate API Reference ListTextTranslationJobs Gets a list of the batch translation jobs that you have submitted. Request Syntax { "Filter": { "JobName": "string", "JobStatus": "string", "SubmittedAfterTime": number, "SubmittedBeforeTime": number }, "MaxResults": number, "NextToken": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Filter The parameters that specify which batch translation jobs to retrieve. Filters include job name, job status, and submission time. You can only set one filter at a time. Type: TextTranslationJobFilter object Required: No MaxResults The maximum number of results to return in each page. The default value is 100. Type: Integer Valid Range: Minimum value of 1. Maximum value of 500. Required: No NextToken The token to request the next page of results. ListTextTranslationJobs 44 Amazon Translate API Reference Type: String Length Constraints: Maximum length of 8192. Pattern: \p{ASCII}{0,8192} Required: No Response Syntax { "NextToken": "string", "TextTranslationJobPropertiesList": [ { "DataAccessRoleArn": "string", "EndTime": number, "InputDataConfig": { "ContentType": "string", "S3Uri": "string" }, "JobDetails": { "DocumentsWithErrorsCount": number, "InputDocumentsCount": number, "TranslatedDocumentsCount": number }, "JobId": "string", "JobName": "string", "JobStatus": "string", "Message": "string", "OutputDataConfig": { "EncryptionKey": { "Id": "string", "Type": "string" }, "S3Uri": "string" }, "ParallelDataNames": [ "string" ], "Settings": { "Brevity": "string", "Formality": "string", "Profanity": "string" }, "SourceLanguageCode": "string", ListTextTranslationJobs 45 Amazon Translate API Reference "SubmittedTime": number, "TargetLanguageCodes": [ "string" ], "TerminologyNames": [ "string" ] } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextToken The token to use to retrieve the next page of results. This value is null when there are no more results to return. Type: String Length Constraints: Maximum length of 8192. Pattern: \p{ASCII}{0,8192} TextTranslationJobPropertiesList A list containing the properties of each job that is returned. Type: Array of TextTranslationJobProperties objects Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidFilterException The filter specified for the operation is not valid. Specify a different filter. ListTextTranslationJobs 46 Amazon Translate API Reference HTTP Status Code: 400 InvalidRequestException The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 ListTextTranslationJobs 47 Amazon Translate API Reference StartTextTranslationJob Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text across multiple documents at once. For batch translation, you can input documents with different source languages (specify auto as the source language). You can specify one or more target languages. Batch translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing in the Amazon Translate Developer Guide. Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed |
translate-api-010 | translate-api.pdf | 10 | • AWS SDK for Python • AWS SDK for Ruby V3 ListTextTranslationJobs 47 Amazon Translate API Reference StartTextTranslationJob Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text across multiple documents at once. For batch translation, you can input documents with different source languages (specify auto as the source language). You can specify one or more target languages. Batch translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing in the Amazon Translate Developer Guide. Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation. Request Syntax { "ClientToken": "string", "DataAccessRoleArn": "string", "InputDataConfig": { "ContentType": "string", "S3Uri": "string" }, "JobName": "string", "OutputDataConfig": { "EncryptionKey": { "Id": "string", "Type": "string" }, "S3Uri": "string" }, "ParallelDataNames": [ "string" ], "Settings": { "Brevity": "string", "Formality": "string", "Profanity": "string" }, "SourceLanguageCode": "string", "TargetLanguageCodes": [ "string" ], "TerminologyNames": [ "string" ] } StartTextTranslationJob 48 Amazon Translate API Reference Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ClientToken A unique identifier for the request. This token is generated for you when using the Amazon Translate SDK. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: ^[a-zA-Z0-9-]+$ Required: Yes DataAccessRoleArn The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that grants Amazon Translate read access to your input data. For more information, see Prerequisite permissions in the Amazon Translate Developer Guide. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+ Required: Yes InputDataConfig Specifies the format and location of the input documents for the translation job. Type: InputDataConfig object Required: Yes JobName The name of the batch translation job to be performed. Type: String StartTextTranslationJob 49 Amazon Translate API Reference Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ Required: No OutputDataConfig Specifies the S3 folder to which your job output will be saved. Type: OutputDataConfig object Required: Yes ParallelDataNames 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. 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. For a list of available parallel data resources, use the ListParallelData operation. For more information, see Customizing your translations with parallel data in the Amazon Translate Developer Guide. Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: No StartTextTranslationJob 50 Amazon Translate API Reference Settings Settings to configure your translation output. You can configure the following options: • Brevity: not supported. • Formality: sets the formality level of the output text. • Profanity: masks profane words and phrases in your translation output. Type: TranslationSettings object Required: No SourceLanguageCode The language code of the input language. Specify the language if all input documents share the same language. 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 input document. For a list of supported language codes, see Supported languages in the Amazon Translate Developer Guide. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. Required: Yes TargetLanguageCodes The target languages of the translation job. Enter up to 10 language codes. Each input file is translated into each target language. Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages in the Amazon Translate Developer Guide. Type: Array of strings Array Members: Minimum number of 1 item. Length Constraints: Minimum length of 2. Maximum length of 5. Required: Yes TerminologyNames The name of a custom terminology resource to add to the translation job. This resource lists examples source terms and the desired translation for each term. StartTextTranslationJob 51 Amazon Translate API Reference This parameter accepts only one custom terminology resource. 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 a list of available custom terminology resources, use the ListTerminologies operation. For more information, see Custom terminology in the Amazon Translate Developer Guide. Type: Array of strings Length Constraints: Minimum |
translate-api-011 | translate-api.pdf | 11 | of a custom terminology resource to add to the translation job. This resource lists examples source terms and the desired translation for each term. StartTextTranslationJob 51 Amazon Translate API Reference This parameter accepts only one custom terminology resource. 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 a list of available custom terminology resources, use the ListTerminologies operation. For more information, see Custom terminology in the Amazon Translate Developer Guide. Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: No Response Syntax { "JobId": "string", "JobStatus": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. JobId The identifier generated for the job. To get the status of a job, use this ID with the DescribeTextTranslationJob operation. Type: String Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ StartTextTranslationJob 52 Amazon Translate API Reference JobStatus The status of the job. Possible values include: • SUBMITTED - The job has been received and is queued for processing. • IN_PROGRESS - Amazon Translate is processing the job. • COMPLETED - The job was successfully completed and the output is available. • COMPLETED_WITH_ERROR - The job was completed with errors. The errors can be analyzed in the job's output. • FAILED - The job did not complete. To get details, use the DescribeTextTranslationJob operation. • STOP_REQUESTED - The user who started the job has requested that it be stopped. • STOPPED - The job has been stopped. Type: String Valid Values: SUBMITTED | IN_PROGRESS | COMPLETED | COMPLETED_WITH_ERROR | FAILED | STOP_REQUESTED | STOPPED Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 InvalidRequestException The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. HTTP Status Code: 400 StartTextTranslationJob 53 Amazon Translate API Reference ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 UnsupportedLanguagePairException Amazon Translate does not support translation from the language of the source text into the requested target language. For more information, see Supported languages in the Amazon Translate Developer Guide. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 StartTextTranslationJob 54 Amazon Translate API Reference StopTextTranslationJob Stops an asynchronous batch translation job that is in progress. If the job's state is IN_PROGRESS, the job will be marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state. Otherwise, the job is put into the STOPPED state. Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation job's JobId. Request Syntax { "JobId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. JobId The job ID of the job to be stopped. Type: String Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ Required: Yes Response Syntax { "JobId": "string", "JobStatus": "string" StopTextTranslationJob 55 Amazon Translate API Reference } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. JobId The job ID of the stopped batch translation job. Type: String Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ JobStatus The status of the designated job. Upon successful completion, the job's status will be STOPPED. Type: String Valid Values: SUBMITTED | IN_PROGRESS | COMPLETED | |
translate-api-012 | translate-api.pdf | 12 | of 1. Maximum length of 32. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ Required: Yes Response Syntax { "JobId": "string", "JobStatus": "string" StopTextTranslationJob 55 Amazon Translate API Reference } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. JobId The job ID of the stopped batch translation job. Type: String Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ JobStatus The status of the designated job. Upon successful completion, the job's status will be STOPPED. Type: String Valid Values: SUBMITTED | IN_PROGRESS | COMPLETED | COMPLETED_WITH_ERROR | FAILED | STOP_REQUESTED | STOPPED Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 StopTextTranslationJob 56 Amazon Translate API Reference TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 StopTextTranslationJob 57 Amazon Translate API Reference TagResource Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see Tagging your resources in the Amazon Translate Developer Guide. Request Syntax { "ResourceArn": "string", "Tags": [ { "Key": "string", "Value": "string" } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The Amazon Resource Name (ARN) of the given Amazon Translate resource to which you want to associate the tags. Type: String Length Constraints: Minimum length of 1. Maximum length of 512. Required: Yes Tags Tags being associated with a specific Amazon Translate resource. There can be a maximum of 50 tags (both existing and pending) associated with a specific resource. Type: Array of Tag objects TagResource 58 Amazon Translate API Reference Array Members: Minimum number of 0 items. Maximum number of 200 items. Required: Yes Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. ConcurrentModificationException Another modification is being made. That modification must complete before you can make your change. HTTP Status Code: 400 InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 TooManyTagsException You have added too many tags to this resource. The maximum is 50 tags. HTTP Status Code: 400 TagResource 59 Amazon Translate API Reference See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 TagResource 60 Amazon Translate API Reference TranslateDocument Translates the input document from the source language to the target language. This synchronous operation supports text, HTML, or Word documents as the input document. TranslateDocument supports translations from English to any supported language, and from any supported language to English. Therefore, specify either the source language code or the target language code as “en” (English). If you set the Formality parameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see Setting formality in the Amazon Translate Developer Guide. Request Syntax { "Document": { "Content": blob, "ContentType": "string" }, "Settings": { "Brevity": "string", "Formality": "string", "Profanity": "string" }, "SourceLanguageCode": "string", "TargetLanguageCode": |
translate-api-013 | translate-api.pdf | 13 | operation supports text, HTML, or Word documents as the input document. TranslateDocument supports translations from English to any supported language, and from any supported language to English. Therefore, specify either the source language code or the target language code as “en” (English). If you set the Formality parameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see Setting formality in the Amazon Translate Developer Guide. Request Syntax { "Document": { "Content": blob, "ContentType": "string" }, "Settings": { "Brevity": "string", "Formality": "string", "Profanity": "string" }, "SourceLanguageCode": "string", "TargetLanguageCode": "string", "TerminologyNames": [ "string" ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Document The content and content type for the document to be translated. The document size must not exceed 100 KB. Type: Document object TranslateDocument 61 Amazon Translate API Reference Required: Yes Settings Settings to configure your translation output. You can configure the following options: • Brevity: not supported. • Formality: sets the formality level of the output text. • Profanity: masks profane words and phrases in your translation output. Type: TranslationSettings object Required: No SourceLanguageCode The language code for the language of the source text. For a list of supported language codes, see Supported languages in the Amazon Translate Developer Guide. To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language. Note If you specify auto, you must send the TranslateDocument request in a region that supports Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not supported. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. Required: Yes TargetLanguageCode The language code requested for the translated document. For a list of supported language codes, see Supported languages. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. TranslateDocument 62 Amazon Translate API Reference Required: Yes TerminologyNames The name of a terminology list file to add to the translation job. This file provides source terms and the desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one custom terminology resource in your translation request. Use the ListTerminologies operation to get the available terminology lists. For more information about custom terminology lists, see Custom terminology in the Amazon Translate Developer Guide. Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: No Response Syntax { "AppliedSettings": { "Brevity": "string", "Formality": "string", "Profanity": "string" }, "AppliedTerminologies": [ { "Name": "string", "Terms": [ { "SourceText": "string", "TargetText": "string" } ] } ], "SourceLanguageCode": "string", "TargetLanguageCode": "string", "TranslatedDocument": { "Content": blob TranslateDocument 63 Amazon Translate API Reference } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. AppliedSettings Settings to configure your translation output. You can configure the following options: • Brevity: reduces the length of the translation output for most translations. Available for TranslateText only. • Formality: sets the formality level of the translation output. • Profanity: masks profane words and phrases in the translation output. Type: TranslationSettings object AppliedTerminologies The names of the custom terminologies applied to the input text by Amazon Translate to produce the translated text document. Type: Array of AppliedTerminology objects SourceLanguageCode The language code of the source document. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. TargetLanguageCode The language code of the translated document. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. TranslatedDocument The document containing the translated content. The document format matches the source document format. TranslateDocument 64 Amazon Translate API Reference Type: TranslatedDocument object Errors For information about the errors that are common to all actions, see Common Errors. InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidRequestException The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. HTTP Status Code: 400 LimitExceededException The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit. HTTP Status Code: 400 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 ServiceUnavailableException The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your request. HTTP Status Code: 500 TooManyRequestsException You have made too many requests within a short period of |
translate-api-014 | translate-api.pdf | 14 | then retry the request. HTTP Status Code: 400 LimitExceededException The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit. HTTP Status Code: 400 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 ServiceUnavailableException The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your request. HTTP Status Code: 500 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 TranslateDocument 65 Amazon Translate API Reference UnsupportedLanguagePairException Amazon Translate does not support translation from the language of the source text into the requested target language. For more information, see Supported languages in the Amazon Translate Developer Guide. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 TranslateDocument 66 Amazon Translate API Reference TranslateText Translates input text from the source language to the target language. For a list of available languages and language codes, see Supported languages in the Amazon Translate Developer Guide. Request Syntax { "Settings": { "Brevity": "string", "Formality": "string", "Profanity": "string" }, "SourceLanguageCode": "string", "TargetLanguageCode": "string", "TerminologyNames": [ "string" ], "Text": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Settings Settings to configure your translation output. You can configure the following options: • Brevity: reduces the length of the translated output for most translations. • Formality: sets the formality level of the output text. • Profanity: masks profane words and phrases in your translation output. Type: TranslationSettings object Required: No SourceLanguageCode The language code for the language of the source text. For a list of language codes, see Supported languages in the Amazon Translate Developer Guide. TranslateText 67 Amazon Translate API Reference To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language. Note If you specify auto, you must send the TranslateText request in a region that supports Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not supported. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. Required: Yes TargetLanguageCode The language code requested for the language of the target text. For a list of language codes, see Supported languages in the Amazon Translate Developer Guide. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. Required: Yes TerminologyNames The name of a terminology list file to add to the translation job. This file provides source terms and the desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one custom terminology resource in your translation request. Use the ListTerminologies operation to get the available terminology lists. For more information about custom terminology lists, see Custom terminology in the Amazon Translate Developer Guide. Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 256. TranslateText 68 Amazon Translate API Reference Pattern: ^([A-Za-z0-9-]_?)+$ Required: No Text The text to translate. The text string can be a maximum of 10,000 bytes long. Depending on your character set, this may be fewer than 10,000 characters. Type: String Length Constraints: Minimum length of 1. Maximum length of 10000. Pattern: [\P{M}\p{M}]{1,10000} Required: Yes Response Syntax { "AppliedSettings": { "Brevity": "string", "Formality": "string", "Profanity": "string" }, "AppliedTerminologies": [ { "Name": "string", "Terms": [ { "SourceText": "string", "TargetText": "string" } ] } ], "SourceLanguageCode": "string", "TargetLanguageCode": "string", "TranslatedText": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. TranslateText 69 Amazon Translate API Reference The following data is returned in JSON format by the service. AppliedSettings Optional settings that modify the translation output. Type: TranslationSettings object AppliedTerminologies The names of the custom terminologies applied to the input text by Amazon Translate for the translated text response. Type: Array of AppliedTerminology objects SourceLanguageCode The language code for the language of the source text. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. TargetLanguageCode The language code for the language of the target text. Type: String Length Constraints: Minimum |
translate-api-015 | translate-api.pdf | 15 | the service sends back an HTTP 200 response. TranslateText 69 Amazon Translate API Reference The following data is returned in JSON format by the service. AppliedSettings Optional settings that modify the translation output. Type: TranslationSettings object AppliedTerminologies The names of the custom terminologies applied to the input text by Amazon Translate for the translated text response. Type: Array of AppliedTerminology objects SourceLanguageCode The language code for the language of the source text. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. TargetLanguageCode The language code for the language of the target text. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. TranslatedText The translated text. Type: String Length Constraints: Maximum length of 20000. Pattern: [\P{M}\p{M}]{0,20000} Errors For information about the errors that are common to all actions, see Common Errors. TranslateText 70 Amazon Translate API Reference DetectedLanguageLowConfidenceException The confidence that Amazon Comprehend accurately detected the source language is low. If a low confidence level is acceptable for your application, you can use the language in the exception to call Amazon Translate again. For more information, see the DetectDominantLanguage operation in the Amazon Comprehend Developer Guide. HTTP Status Code: 400 InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidRequestException The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. HTTP Status Code: 400 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 ServiceUnavailableException The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your request. HTTP Status Code: 500 TextSizeLimitExceededException The size of the text you submitted exceeds the size limit. Reduce the size of the text or use a smaller document and then retry your request. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. TranslateText 71 Amazon Translate API Reference HTTP Status Code: 400 UnsupportedLanguagePairException Amazon Translate does not support translation from the language of the source text into the requested target language. For more information, see Supported languages in the Amazon Translate Developer Guide. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 TranslateText 72 Amazon Translate API Reference UntagResource Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources in the Amazon Translate Developer Guide. Request Syntax { "ResourceArn": "string", "TagKeys": [ "string" ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The Amazon Resource Name (ARN) of the given Amazon Translate resource from which you want to remove the tags. Type: String Length Constraints: Minimum length of 1. Maximum length of 512. Required: Yes TagKeys The initial part of a key-value pair that forms a tag being removed from a given resource. Keys must be unique and cannot be duplicated for a particular resource. Type: Array of strings Array Members: Minimum number of 0 items. Maximum number of 200 items. Length Constraints: Minimum length of 1. Maximum length of 128. Required: Yes UntagResource 73 Amazon Translate API Reference Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. ConcurrentModificationException Another modification is being made. That modification must complete before you can make your change. HTTP Status Code: 400 InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ UntagResource 74 Amazon |
translate-api-016 | translate-api.pdf | 16 | of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ UntagResource 74 Amazon Translate API Reference • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UntagResource 75 Amazon Translate API Reference UpdateParallelData Updates a previously created parallel data resource by importing a new input file from Amazon S3. Request Syntax { "ClientToken": "string", "Description": "string", "Name": "string", "ParallelDataConfig": { "Format": "string", "S3Uri": "string" } } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ClientToken A unique identifier for the request. This token is automatically generated when you use Amazon Translate through an AWS SDK. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: ^[a-zA-Z0-9-]+$ Required: Yes Description A custom description for the parallel data resource in Amazon Translate. Type: String Length Constraints: Maximum length of 256. UpdateParallelData 76 Amazon Translate API Reference Pattern: [\P{M}\p{M}]{0,256} Required: No Name The name of the parallel data resource being updated. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: Yes ParallelDataConfig Specifies the format and S3 location of the parallel data input file. Type: ParallelDataConfig object Required: Yes Response Syntax { "LatestUpdateAttemptAt": number, "LatestUpdateAttemptStatus": "string", "Name": "string", "Status": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. LatestUpdateAttemptAt The time that the most recent update was attempted. Type: Timestamp UpdateParallelData 77 Amazon Translate API Reference LatestUpdateAttemptStatus The status of the parallel data update attempt. When the updated parallel data resource is ready for you to use, the status is ACTIVE. Type: String Valid Values: CREATING | UPDATING | ACTIVE | DELETING | FAILED Name The name of the parallel data resource being updated. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Status The status of the parallel data resource that you are attempting to update. Your update request is accepted only if this status is either ACTIVE or FAILED. Type: String Valid Values: CREATING | UPDATING | ACTIVE | DELETING | FAILED Errors For information about the errors that are common to all actions, see Common Errors. ConcurrentModificationException Another modification is being made. That modification must complete before you can make your change. HTTP Status Code: 400 ConflictException There was a conflict processing the request. Try your request again. HTTP Status Code: 400 UpdateParallelData 78 Amazon Translate API Reference InternalServerException An internal server error occurred. Retry your request. HTTP Status Code: 500 InvalidParameterValueException The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. HTTP Status Code: 400 InvalidRequestException The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. HTTP Status Code: 400 LimitExceededException The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit. HTTP Status Code: 400 ResourceNotFoundException The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. HTTP Status Code: 400 TooManyRequestsException You have made too many requests within a short period of time. Wait for a short time and then try your request again. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: UpdateParallelData 79 Amazon Translate API Reference • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 Data Types The following data types are supported: • AppliedTerminology • Document • EncryptionKey • InputDataConfig • JobDetails • Language • OutputDataConfig • ParallelDataConfig • ParallelDataDataLocation • |
translate-api-017 | translate-api.pdf | 17 | this API in one of the language-specific AWS SDKs, see the following: UpdateParallelData 79 Amazon Translate API Reference • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 Data Types The following data types are supported: • AppliedTerminology • Document • EncryptionKey • InputDataConfig • JobDetails • Language • OutputDataConfig • ParallelDataConfig • ParallelDataDataLocation • ParallelDataProperties • Tag • Term • TerminologyData • TerminologyDataLocation • TerminologyProperties • TextTranslationJobFilter • TextTranslationJobProperties Data Types 80 Amazon Translate API Reference • TranslatedDocument • TranslationSettings Data Types 81 Amazon Translate API Reference AppliedTerminology The custom terminology applied to the input text by Amazon Translate for the translated text response. This is optional in the response and will only be present if you specified terminology input in the request. Currently, only one terminology can be applied per TranslateText request. Contents Name The name of the custom terminology applied to the input text by Amazon Translate for the translated text response. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: No Terms The specific terms of the custom terminology applied to the input text by Amazon Translate for the translated text response. A maximum of 250 terms will be returned, and the specific terms applied will be the first 250 terms in the source text. Type: Array of Term objects Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AppliedTerminology 82 Amazon Translate API Reference Document The content and content type of a document. Contents Content The Contentfield type is Binary large object (blob). This object contains the document content converted into base64-encoded binary data. If you use one of the AWS SDKs, the SDK performs the Base64-encoding on this field before sending the request. Type: Base64-encoded binary data object Length Constraints: Maximum length of 102400. Required: Yes ContentType Describes the format of the document. You can specify one of the following: • text/html - The input data consists of HTML content. Amazon Translate translates only the text in the HTML element. • text/plain - The input data consists of unformatted text. Amazon Translate translates every character in the content. • application/vnd.openxmlformats- officedocument.wordprocessingml.document - The input data consists of a Word document (.docx). Type: String Length Constraints: Maximum length of 256. Pattern: ^[-\w.]+\/[-\w.+]+$ Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: Document 83 Amazon Translate API Reference • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 Document 84 Amazon Translate API Reference EncryptionKey The encryption key used to encrypt this object. Contents Id The Amazon Resource Name (ARN) of the encryption key being used to encrypt this object. Type: String Length Constraints: Minimum length of 1. Maximum length of 400. Pattern: (arn:aws((-us-gov)|(-iso)|(-iso-b)|(-cn))?:kms:)?([a-z]{2}-[a- z]+(-[a-z]+)?-\d:)?(\d{12}:)?(((key/)?[a-zA-Z0-9-_]+)|(alias/[a-zA- Z0-9:/_-]+)) Required: Yes Type The type of encryption key used by Amazon Translate to encrypt this object. Type: String Valid Values: KMS Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 EncryptionKey 85 Amazon Translate API Reference InputDataConfig The input configuration properties for requesting a batch translation job. Contents ContentType Describes the format of the data that you submit to Amazon Translate as input. You can specify one of the following multipurpose internet mail extension (MIME) types: • text/html: The input data consists of one or more HTML files. Amazon Translate translates only the text that resides in the html element in each file. • text/plain: The input data consists of one or more unformatted text files. Amazon Translate translates every character in this type of input. • application/vnd.openxmlformats- officedocument.wordprocessingml.document: The input data consists of one or more Word documents (.docx). • application/vnd.openxmlformats- officedocument.presentationml.presentation: The input data consists of one or more PowerPoint Presentation files (.pptx). • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: The input data consists of one or more Excel Workbook files (.xlsx). • application/x-xliff+xml: The input data consists of one or more XML Localization Interchange File Format (XLIFF) files (.xlf). Amazon Translate supports only XLIFF version 1.2. Important If you structure your input data as HTML, ensure that you set this parameter to text/ html. By doing so, you cut costs by limiting the translation to the contents of the html element in each file. |
translate-api-018 | translate-api.pdf | 18 | consists of one or more Word documents (.docx). • application/vnd.openxmlformats- officedocument.presentationml.presentation: The input data consists of one or more PowerPoint Presentation files (.pptx). • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: The input data consists of one or more Excel Workbook files (.xlsx). • application/x-xliff+xml: The input data consists of one or more XML Localization Interchange File Format (XLIFF) files (.xlf). Amazon Translate supports only XLIFF version 1.2. Important If you structure your input data as HTML, ensure that you set this parameter to text/ html. By doing so, you cut costs by limiting the translation to the contents of the html element in each file. Otherwise, if you set this parameter to text/plain, your costs will cover the translation of every character. Type: String Length Constraints: Maximum length of 256. Pattern: ^[-\w.]+\/[-\w.+]+$ InputDataConfig 86 Amazon Translate API Reference Required: Yes S3Uri The URI of the AWS S3 folder that contains the input files. Amazon Translate translates all the files in the folder and all its sub-folders. The folder must be in the same Region as the API endpoint you are calling. Type: String Length Constraints: Maximum length of 1024. Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)? Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 InputDataConfig 87 Amazon Translate API Reference JobDetails The number of documents successfully and unsuccessfully processed during a translation job. Contents DocumentsWithErrorsCount The number of documents that could not be processed during a translation job. Type: Integer Required: No InputDocumentsCount The number of documents used as input in a translation job. Type: Integer Required: No TranslatedDocumentsCount The number of documents successfully processed during a translation job. Type: Integer Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 JobDetails 88 Amazon Translate API Reference Language A supported language. Contents LanguageCode Language code for the supported language. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. Required: Yes LanguageName Language name of the supported language. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 Language 89 Amazon Translate API Reference OutputDataConfig The output configuration properties for a batch translation job. Contents S3Uri The URI of the S3 folder that contains a translation job's output file. The folder must be in the same Region as the API endpoint that you are calling. Type: String Length Constraints: Maximum length of 1024. Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)? Required: Yes EncryptionKey The encryption key used to encrypt this object. Type: EncryptionKey object Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 OutputDataConfig 90 Amazon Translate API Reference ParallelDataConfig Specifies the format and S3 location of the parallel data input file. Contents Format The format of the parallel data input file. Type: String Valid Values: TSV | CSV | TMX Required: No S3Uri The URI of the Amazon S3 folder that contains the parallel data input file. The folder must be in the same Region as the API endpoint you are calling. Type: String Length Constraints: Maximum length of 1024. Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)? Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 ParallelDataConfig 91 Amazon Translate API Reference ParallelDataDataLocation The location of the most recent parallel data input file that was successfully imported into Amazon Translate. Contents Location The Amazon S3 location of the parallel data input file. The location is returned as a presigned URL to that has a 30-minute expiration. Important Amazon Translate doesn't scan all input files for the risk of CSV injection attacks. CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator. Type: String Length Constraints: Maximum length of 10000. Pattern: [\P{M}\p{M}]{0,10000} Required: Yes RepositoryType Describes the |
translate-api-019 | translate-api.pdf | 19 | all input files for the risk of CSV injection attacks. CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator. Type: String Length Constraints: Maximum length of 10000. Pattern: [\P{M}\p{M}]{0,10000} Required: Yes RepositoryType Describes the repository that contains the parallel data input file. Type: String Length Constraints: Maximum length of 10000. Pattern: [\P{M}\p{M}]{0,10000} Required: Yes ParallelDataDataLocation 92 Amazon Translate API Reference See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 ParallelDataDataLocation 93 Amazon Translate API Reference ParallelDataProperties The properties of a parallel data resource. Contents Arn The Amazon Resource Name (ARN) of the parallel data resource. Type: String Length Constraints: Minimum length of 1. Maximum length of 512. Required: No CreatedAt The time at which the parallel data resource was created. Type: Timestamp Required: No Description The description assigned to the parallel data resource. Type: String Length Constraints: Maximum length of 256. Pattern: [\P{M}\p{M}]{0,256} Required: No EncryptionKey The encryption key used to encrypt this object. Type: EncryptionKey object Required: No FailedRecordCount The number of records unsuccessfully imported from the parallel data input file. ParallelDataProperties 94 Amazon Translate API Reference Type: Long Required: No ImportedDataSize The number of UTF-8 characters that Amazon Translate imported from the parallel data input file. This number includes only the characters in your translation examples. It does not include characters that are used to format your file. For example, if you provided a Translation Memory Exchange (.tmx) file, this number does not include the tags. Type: Long Required: No ImportedRecordCount The number of records successfully imported from the parallel data input file. Type: Long Required: No LastUpdatedAt The time at which the parallel data resource was last updated. Type: Timestamp Required: No LatestUpdateAttemptAt The time that the most recent update was attempted. Type: Timestamp Required: No LatestUpdateAttemptStatus The status of the most recent update attempt for the parallel data resource. Type: String Valid Values: CREATING | UPDATING | ACTIVE | DELETING | FAILED ParallelDataProperties 95 Amazon Translate API Reference Required: No Message Additional information from Amazon Translate about the parallel data resource. Type: String Required: No Name The custom name assigned to the parallel data resource. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: No ParallelDataConfig Specifies the format and S3 location of the parallel data input file. Type: ParallelDataConfig object Required: No SkippedRecordCount The number of items in the input file that Amazon Translate skipped when you created or updated the parallel data resource. For example, Amazon Translate skips empty records, empty target texts, and empty lines. Type: Long Required: No SourceLanguageCode The source language of the translations in the parallel data file. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. ParallelDataProperties 96 Amazon Translate API Reference Required: No Status The status of the parallel data resource. When the parallel data is ready for you to use, the status is ACTIVE. Type: String Valid Values: CREATING | UPDATING | ACTIVE | DELETING | FAILED Required: No TargetLanguageCodes The language codes for the target languages available in the parallel data file. All possible target languages are returned as an array. Type: Array of strings Length Constraints: Minimum length of 2. Maximum length of 5. Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 ParallelDataProperties 97 Amazon Translate API Reference Tag A key-value pair that adds as a metadata to a resource used by Amazon Translate. Contents Key The initial part of a key-value pair that forms a tag associated with a given resource. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Required: Yes Value The second part of a key-value pair that forms a tag associated with a given resource. Type: String Length Constraints: Minimum length of 0. Maximum length of 256. Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 Tag 98 Amazon Translate API Reference Term The term being translated by the custom terminology. Contents SourceText The source text |
translate-api-020 | translate-api.pdf | 20 | String Length Constraints: Minimum length of 1. Maximum length of 128. Required: Yes Value The second part of a key-value pair that forms a tag associated with a given resource. Type: String Length Constraints: Minimum length of 0. Maximum length of 256. Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 Tag 98 Amazon Translate API Reference Term The term being translated by the custom terminology. Contents SourceText The source text of the term being translated by the custom terminology. Type: String Length Constraints: Maximum length of 10000. Pattern: [\P{M}\p{M}]{0,10000} Required: No TargetText The target text of the term being translated by the custom terminology. Type: String Length Constraints: Maximum length of 10000. Pattern: [\P{M}\p{M}]{0,10000} Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 Term 99 Amazon Translate API Reference TerminologyData The data associated with the custom terminology. For information about the custom terminology file, see Creating a Custom Terminology in the Amazon Translate Developer Guide. Contents File The file containing the custom terminology data. Your version of the AWS SDK performs a Base64-encoding on this field before sending a request to the AWS service. Users of the SDK should not perform Base64-encoding themselves. Type: Base64-encoded binary data object Length Constraints: Maximum length of 10485760. Required: Yes Format The data format of the custom terminology. Type: String Valid Values: CSV | TMX | TSV Required: Yes Directionality The directionality of your terminology resource indicates whether it has one source language (uni-directional) or multiple (multi-directional). UNI The terminology resource has one source language (for example, the first column in a CSV file), and all of its other languages are target languages. MULTI Any language in the terminology resource can be the source language or a target language. A single multi-directional terminology resource can be used for jobs that translate different language pairs. For example, if the terminology contains English and Spanish terms, it can be used for jobs that translate English to Spanish and Spanish to English. TerminologyData 100 Amazon Translate API Reference When you create a custom terminology resource without specifying the directionality, it behaves as uni-directional terminology, although this parameter will have a null value. Type: String Valid Values: UNI | MULTI Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 TerminologyData 101 Amazon Translate API Reference TerminologyDataLocation The location of the custom terminology data. Contents Location The Amazon S3 location of the most recent custom terminology input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30- minute expiration . Important Amazon Translate doesn't scan all input files for the risk of CSV injection attacks. CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator. Type: String Length Constraints: Maximum length of 10000. Pattern: [\P{M}\p{M}]{0,10000} Required: Yes RepositoryType The repository type for the custom terminology data. Type: String Length Constraints: Maximum length of 10000. Pattern: [\P{M}\p{M}]{0,10000} Required: Yes TerminologyDataLocation 102 Amazon Translate API Reference See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 TerminologyDataLocation 103 Amazon Translate API Reference TerminologyProperties The properties of the custom terminology. Contents Arn The Amazon Resource Name (ARN) of the custom terminology. Type: String Length Constraints: Minimum length of 1. Maximum length of 512. Required: No CreatedAt The time at which the custom terminology was created, based on the timestamp. Type: Timestamp Required: No Description The description of the custom terminology properties. Type: String Length Constraints: Maximum length of 256. Pattern: [\P{M}\p{M}]{0,256} Required: No Directionality The directionality of your terminology resource indicates whether it has one source language (uni-directional) or multiple (multi-directional). UNI The terminology resource has one source language (the first column in a CSV file), and all of its other languages are target languages. TerminologyProperties 104 Amazon Translate API Reference MULTI Any |
translate-api-021 | translate-api.pdf | 21 | Length Constraints: Minimum length of 1. Maximum length of 512. Required: No CreatedAt The time at which the custom terminology was created, based on the timestamp. Type: Timestamp Required: No Description The description of the custom terminology properties. Type: String Length Constraints: Maximum length of 256. Pattern: [\P{M}\p{M}]{0,256} Required: No Directionality The directionality of your terminology resource indicates whether it has one source language (uni-directional) or multiple (multi-directional). UNI The terminology resource has one source language (the first column in a CSV file), and all of its other languages are target languages. TerminologyProperties 104 Amazon Translate API Reference MULTI Any language in the terminology resource can be the source language. Type: String Valid Values: UNI | MULTI Required: No EncryptionKey The encryption key for the custom terminology. Type: EncryptionKey object Required: No Format The format of the custom terminology input file. Type: String Valid Values: CSV | TMX | TSV Required: No LastUpdatedAt The time at which the custom terminology was last update, based on the timestamp. Type: Timestamp Required: No Message Additional information from Amazon Translate about the terminology resource. Type: String Required: No Name The name of the custom terminology. TerminologyProperties 105 Amazon Translate API Reference Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: No SizeBytes The size of the file used when importing a custom terminology. Type: Integer Required: No SkippedTermCount The number of terms in the input file that Amazon Translate skipped when you created or updated the terminology resource. Type: Integer Required: No SourceLanguageCode The language code for the source text of the translation request for which the custom terminology is being used. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. Required: No TargetLanguageCodes The language codes for the target languages available with the custom terminology resource. All possible target languages are returned in array. Type: Array of strings Length Constraints: Minimum length of 2. Maximum length of 5. Required: No TerminologyProperties 106 Amazon Translate API Reference TermCount The number of terms included in the custom terminology. Type: Integer Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 TerminologyProperties 107 Amazon Translate API Reference TextTranslationJobFilter Provides information for filtering a list of translation jobs. For more information, see ListTextTranslationJobs. Contents JobName Filters the list of jobs by name. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ Required: No JobStatus Filters the list of jobs based by job status. Type: String Valid Values: SUBMITTED | IN_PROGRESS | COMPLETED | COMPLETED_WITH_ERROR | FAILED | STOP_REQUESTED | STOPPED Required: No SubmittedAfterTime Filters the list of jobs based on the time that the job was submitted for processing and returns only the jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest. Type: Timestamp Required: No SubmittedBeforeTime Filters the list of jobs based on the time that the job was submitted for processing and returns only the jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest. TextTranslationJobFilter 108 Amazon Translate API Reference Type: Timestamp Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 TextTranslationJobFilter 109 Amazon Translate API Reference TextTranslationJobProperties Provides information about a translation job. Contents DataAccessRoleArn The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that granted Amazon Translate read access to the job's input data. For more information, see Prerequisite permissions in the Amazon Translate Developer Guide. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+ Required: No EndTime The time at which the translation job ended. Type: Timestamp Required: No InputDataConfig The input configuration properties that were specified when the job was requested. Type: InputDataConfig object Required: No JobDetails The number of documents successfully and unsuccessfully processed during the translation job. Type: JobDetails object Required: No JobId The ID of the translation job. TextTranslationJobProperties 110 Amazon Translate API Reference Type: String Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ Required: No JobName The user-defined name of the translation job. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ Required: No JobStatus The status of the translation job. Type: String Valid Values: SUBMITTED | IN_PROGRESS | COMPLETED | COMPLETED_WITH_ERROR | FAILED | STOP_REQUESTED | STOPPED Required: No Message An explanation of any errors that may have occurred during the translation job. Type: String Required: No OutputDataConfig The output configuration properties that |
translate-api-022 | translate-api.pdf | 22 | of the translation job. TextTranslationJobProperties 110 Amazon Translate API Reference Type: String Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ Required: No JobName The user-defined name of the translation job. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$ Required: No JobStatus The status of the translation job. Type: String Valid Values: SUBMITTED | IN_PROGRESS | COMPLETED | COMPLETED_WITH_ERROR | FAILED | STOP_REQUESTED | STOPPED Required: No Message An explanation of any errors that may have occurred during the translation job. Type: String Required: No OutputDataConfig The output configuration properties that were specified when the job was requested. Type: OutputDataConfig object Required: No TextTranslationJobProperties 111 Amazon Translate API Reference ParallelDataNames A list containing the names of the parallel data resources applied to the translation job. Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: No Settings Settings that modify the translation output. Type: TranslationSettings object Required: No SourceLanguageCode The language code of the language of the source text. The language must be a language supported by Amazon Translate. Type: String Length Constraints: Minimum length of 2. Maximum length of 5. Required: No SubmittedTime The time at which the translation job was submitted. Type: Timestamp Required: No TargetLanguageCodes The language code of the language of the target text. The language must be a language supported by Amazon Translate. Type: Array of strings Array Members: Minimum number of 1 item. TextTranslationJobProperties 112 Amazon Translate API Reference Length Constraints: Minimum length of 2. Maximum length of 5. Required: No TerminologyNames A list containing the names of the terminologies applied to a translation job. Only one terminology can be applied per StartTextTranslationJob request at this time. Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: ^([A-Za-z0-9-]_?)+$ Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 TextTranslationJobProperties 113 Amazon Translate API Reference TranslatedDocument The translated content. Contents Content The document containing the translated content. Type: Base64-encoded binary data object Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 TranslatedDocument 114 Amazon Translate API Reference TranslationSettings Settings to configure your translation output. You can configure the following options: • Brevity: reduces the length of the translation output for most translations. Available for TranslateText only. • Formality: sets the formality level of the translation output. • Profanity: masks profane words and phrases in the translation output. Contents Brevity When you turn on brevity, Amazon Translate reduces the length of the translation output for most translations (when compared with the same translation with brevity turned off). By default, brevity is turned off. If you turn on brevity for a translation request with an unsupported language pair, the translation proceeds with the brevity setting turned off. For the language pairs that brevity supports, see Using brevity in the Amazon Translate Developer Guide. Type: String Valid Values: ON Required: No Formality You can 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 register) in the translation output. You can set the value to informal or formal. If you don't specify a value for formality, or if the target language doesn't support formality, the translation will ignore the formality setting. If you specify multiple target languages for the job, translate ignores the formality setting for any unsupported target language. TranslationSettings 115 Amazon Translate API Reference For a list of target languages that support formality, see Supported languages in the Amazon Translate Developer Guide. Type: String Valid Values: FORMAL | INFORMAL Required: No Profanity You can enable the profanity setting if you want 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 doesn't detect profanity in all of its supported languages. For languages that don't support profanity detection, see Unsupported languages in the Amazon Translate Developer Guide. 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. Type: String Valid Values: MASK Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see |
translate-api-023 | translate-api.pdf | 23 | profane word or phrase, regardless of the length or number of words. Amazon Translate doesn't detect profanity in all of its supported languages. For languages that don't support profanity detection, see Unsupported languages in the Amazon Translate Developer Guide. 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. Type: String Valid Values: MASK Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 TranslationSettings 116 Amazon Translate API Reference Common Parameters The following list contains the parameters that all actions use for signing Signature Version 4 requests with a query string. Any action-specific parameters are listed in the topic for that action. For more information about Signature Version 4, see Signing AWS API requests in the IAM User Guide. Action The action to be performed. Type: string Required: Yes Version The API version that the request is written for, expressed in the format YYYY-MM-DD. Type: string Required: Yes X-Amz-Algorithm The hash algorithm that you used to create the request signature. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Valid Values: AWS4-HMAC-SHA256 Required: Conditional X-Amz-Credential The credential scope value, which is a string that includes your access key, the date, the region you are targeting, the service you are requesting, and a termination string ("aws4_request"). The value is expressed in the following format: access_key/YYYYMMDD/region/service/ aws4_request. For more information, see Create a signed AWS API request in the IAM User Guide. Common Parameters 117 Amazon Translate API Reference Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Required: Conditional X-Amz-Date The date that is used to create the signature. The format must be ISO 8601 basic format (YYYYMMDD'T'HHMMSS'Z'). For example, the following date time is a valid X-Amz-Date value: 20120325T120000Z. Condition: X-Amz-Date is optional for all requests; it can be used to override the date used for signing requests. If the Date header is specified in the ISO 8601 basic format, X-Amz-Date is not required. When X-Amz-Date is used, it always overrides the value of the Date header. For more information, see Elements of an AWS API request signature in the IAM User Guide. Type: string Required: Conditional X-Amz-Security-Token The temporary security token that was obtained through a call to AWS Security Token Service (AWS STS). For a list of services that support temporary security credentials from AWS STS, see AWS services that work with IAM in the IAM User Guide. Condition: If you're using temporary security credentials from AWS STS, you must include the security token. Type: string Required: Conditional X-Amz-Signature Specifies the hex-encoded signature that was calculated from the string to sign and the derived signing key. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Common Parameters 118 Amazon Translate API Reference Required: Conditional X-Amz-SignedHeaders Specifies all the HTTP headers that were included as part of the canonical request. For more information about specifying signed headers, see Create a signed AWS API request in the IAM User Guide. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Required: Conditional Common Errors This section lists the errors common to the API actions of all AWS services. For errors specific to an API action for this service, see the topic for that API action. AccessDeniedException You do not have sufficient access to perform this action. HTTP Status Code: 400 IncompleteSignature The request signature does not conform to AWS standards. HTTP Status Code: 400 InternalFailure The request processing has failed because of an unknown error, exception or failure. HTTP Status Code: 500 InvalidAction The action or operation requested is invalid. Verify that the action is typed correctly. HTTP Status Code: 400 Common Errors 119 Amazon Translate API Reference InvalidClientTokenId The X.509 certificate or AWS access key ID provided does not exist in our records. HTTP Status Code: 403 NotAuthorized You do not have permission to perform this action. HTTP Status Code: 400 OptInRequired The AWS access key ID needs a subscription for the service. HTTP Status Code: 403 RequestExpired The request reached the service more than 15 minutes after the date stamp on the request or more than 15 minutes after the request expiration date (such as for pre-signed URLs), or the date stamp on the request is more than 15 minutes in |
translate-api-024 | translate-api.pdf | 24 | 119 Amazon Translate API Reference InvalidClientTokenId The X.509 certificate or AWS access key ID provided does not exist in our records. HTTP Status Code: 403 NotAuthorized You do not have permission to perform this action. HTTP Status Code: 400 OptInRequired The AWS access key ID needs a subscription for the service. HTTP Status Code: 403 RequestExpired The request reached the service more than 15 minutes after the date stamp on the request or more than 15 minutes after the request expiration date (such as for pre-signed URLs), or the date stamp on the request is more than 15 minutes in the future. HTTP Status Code: 400 ServiceUnavailable The request has failed due to a temporary failure of the server. HTTP Status Code: 503 ThrottlingException The request was denied due to request throttling. HTTP Status Code: 400 ValidationError The input fails to satisfy the constraints specified by an AWS service. HTTP Status Code: 400 Common Errors 120 |
translate-dg-001 | translate-dg.pdf | 1 | Developer Guide Amazon Translate Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon Translate Developer Guide Amazon Translate: Developer Guide Copyright © 2025 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. Amazon Translate Table of Contents Developer Guide What is Amazon Translate? ............................................................................................................. 1 Use cases ........................................................................................................................................................ 1 First-time user ............................................................................................................................................... 2 Amazon Translate pricing ........................................................................................................................... 2 Amazon Translate API Reference .............................................................................................................. 2 Supported languages ...................................................................................................................... 3 Supported languages ................................................................................................................................... 3 Languages supported by Amazon Translate features ........................................................................... 7 How it works .................................................................................................................................... 8 Supported formats for the input content ............................................................................................... 8 Customizing your translations ................................................................................................................... 8 Automatic language detection .................................................................................................................. 9 Exception handling ....................................................................................................................................... 9 Setting up ...................................................................................................................................... 10 Sign up for an AWS account ................................................................................................................... 10 Create a user with administrative access .............................................................................................. 10 Set up the AWS CLI ................................................................................................................................... 12 Grant programmatic access ..................................................................................................................... 12 Working with AWS SDKs .......................................................................................................................... 14 Getting started .............................................................................................................................. 16 Getting started (console) .......................................................................................................................... 16 Getting started (AWS CLI) ........................................................................................................................ 18 Translate text using the command line ........................................................................................... 18 Next step ................................................................................................................................................ 19 Getting started (SDK) ................................................................................................................................ 19 Using the SDK for Java ....................................................................................................................... 19 Using the AWS SDK for Python ......................................................................................................... 20 Other SDK examples ............................................................................................................................ 20 Translation processing modes ...................................................................................................... 21 Real-time translation ................................................................................................................................. 21 Real-time translation (console) .......................................................................................................... 21 Real-time translation (API) ................................................................................................................. 26 Asynchronous batch processing .............................................................................................................. 29 Region availability ................................................................................................................................. 29 iii Amazon Translate Developer Guide Prerequisites ........................................................................................................................................... 30 Running a job ........................................................................................................................................ 35 Monitoring and analyzing ................................................................................................................... 42 Getting results ....................................................................................................................................... 44 Customizing your translations ...................................................................................................... 47 Using do-not-translate tags ..................................................................................................................... 47 Using do-not-translate with the console ......................................................................................... 48 Using do-not-translate with the API ................................................................................................ 48 Customizing with custom terminology ................................................................................................. 49 Creating a custom terminology ......................................................................................................... 50 Using custom terminologies ............................................................................................................... 52 Example using SDK for Python ......................................................................................................... 53 Encrypting your terminology ............................................................................................................. 55 Best practices ......................................................................................................................................... 55 Using brevity ............................................................................................................................................... 57 Using the brevity setting .................................................................................................................... 57 Supported languages ........................................................................................................................... 57 Masking profanity ...................................................................................................................................... 58 Using the profanity setting ................................................................................................................ 59 Unsupported languages ...................................................................................................................... 59 Setting formality ........................................................................................................................................ 60 Using the formality setting ................................................................................................................ 60 Supported languages ........................................................................................................................... 61 Customizing with parallel data ............................................................................................................... 62 Region availability ................................................................................................................................. 63 Parallel data input files for Amazon Translate ............................................................................... 63 Adding parallel data ............................................................................................................................. 69 Viewing and managing parallel data ................................................................................................ 73 Code examples ............................................................................................................................... 77 Basics ............................................................................................................................................................. 77 Actions ..................................................................................................................................................... 78 Scenarios ...................................................................................................................................................... 95 Build an Amazon Transcribe streaming app ................................................................................... 96 Building an Amazon Lex chatbot ...................................................................................................... 97 Building an Amazon SNS application ............................................................................................... 98 Create an application to analyze customer feedback ................................................................... 99 iv Amazon Translate Developer Guide Get started with translate jobs ....................................................................................................... 105 Tagging ......................................................................................................................................... 109 Tagging a new resource ......................................................................................................................... 110 Viewing, editing, and deleting tags ..................................................................................................... 111 Security ........................................................................................................................................ 113 Data protection ........................................................................................................................................ 114 Encryption at rest ............................................................................................................................... 115 Encryption in transit .......................................................................................................................... 116 Identity and Access Management ........................................................................................................ 116 Audience ............................................................................................................................................... 116 Authenticating with identities ......................................................................................................... 117 Managing access using policies ....................................................................................................... 120 How Amazon Translate works with IAM ........................................................................................ 123 Identity-based policy examples ....................................................................................................... 130 AWS managed policies ...................................................................................................................... 136 Troubleshooting .................................................................................................................................. 139 Monitoring ................................................................................................................................................. 140 Monitoring with CloudWatch ........................................................................................................... 143 Logging Amazon Translate API calls with AWS CloudTrail ........................................................ 145 CloudWatch metrics and dimensions for Amazon Translate ..................................................... 147 Monitoring with EventBridge ........................................................................................................... 149 Compliance validation ............................................................................................................................ 152 Resilience ................................................................................................................................................... 153 Infrastructure security ............................................................................................................................. 153 VPC endpoints (AWS PrivateLink) ........................................................................................................ 154 Considerations for Amazon Translate VPC endpoints ................................................................ 154 Creating an interface VPC endpoint for Amazon Translate ....................................................... 154 Creating a VPC endpoint policy for Amazon Translate .............................................................. 155 Guidelines and quotas ................................................................................................................ 157 Supported AWS Regions ........................................................................................................................ 157 Compliance ................................................................................................................................................ 157 Throttling ................................................................................................................................................... 157 Guidelines .................................................................................................................................................. 157 Service quotas .......................................................................................................................................... 158 Document history ........................................................................................................................ 161 API reference ............................................................................................................................... 174 v Amazon Translate Developer Guide AWS Glossary ............................................................................................................................... 175 vi Amazon Translate Developer Guide 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 for information about the languages that Amazon Translate supports. Topics • Use cases • Are you a first-time user of Amazon Translate? • Amazon Translate pricing • Amazon Translate API Reference Use cases Use Amazon Translate to do the following: Enable multilingual user experiences in your applications by integrating |
translate-dg-002 | translate-dg.pdf | 2 | Translate Developer Guide 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 for information about the languages that Amazon Translate supports. Topics • Use cases • Are you a first-time user of Amazon Translate? • Amazon Translate pricing • Amazon Translate API Reference 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. • Make subtitles and live captioning available in many languages with Amazon Transcribe. • Speak translated content with Amazon Polly. • Translate document repositories stored in Amazon S3 . Use cases 1 Amazon Translate Developer Guide • Translate text stored in the following databases: Amazon DynamoDB, Amazon Aurora, and Amazon Redshift. • Seamlessly integrate workflows with AWS Lambda or AWS Glue. 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 – Introduces Amazon Translate. 2. Getting started with Amazon Translate – Explains how to set up your AWS account and start using Amazon Translate. 3. Code examples for Amazon Translate using AWS SDKs – Use the code examples to explore the Amazon Translate APIs. You can also use the following resources to learn about the Amazon Translate service: • The AWS Machine Learning Blog includes useful articles about Amazon Translate. • Amazon Translate Deep Dive Video Series 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. Amazon Translate API Reference The Amazon Translate API Reference is now a separate document. For more information, see Amazon Translate API Reference. First-time user 2 Amazon Translate Developer Guide 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. Topics • Supported languages • Languages supported by Amazon Translate features Supported languages Amazon Translate supports text translation between the languages listed in the following table. The language code column uses ISO 639-1 two-digit language codes. For a country variant of a language, the table follows the RFC 5646 format of appending a dash followed by an ISO 3166 2- digit country code. For example, the language code for the Mexican variant of Spanish is es-MX. Language Afrikaans Albanian Amharic Arabic Armenian Language code af sq am ar hy Supported languages 3 Amazon Translate Language Azerbaijani Bengali Bosnian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dari Dutch English Estonian Farsi (Persian) Filipino, Tagalog Finnish French French (Canada) Georgian Language code Developer Guide az bn bs bg ca zh zh-TW hr cs da fa-AF nl en et fa tl fi fr fr-CA ka Supported languages 4 Amazon Translate Language German Greek Gujarati Haitian Creole Hausa Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Kannada Kazakh Korean Latvian Lithuanian Macedonian Malay Language code Developer Guide de el gu ht ha he hi hu is id ga it ja kn kk ko lv lt mk ms Supported languages 5 Amazon Translate Language Malayalam Maltese Marathi Mongolian Norwegian (Bokmål) Pashto Polish Portuguese (Brazil) Language code Developer Guide ml mt mr mn no ps pl pt Portuguese (Portugal) pt-PT Punjabi Romanian Russian Serbian Sinhala Slovak Slovenian Somali Spanish Spanish (Mexico) Swahili pa ro ru sr si sk sl so es es-MX sw Supported languages 6 Amazon Translate Language Swedish Tamil Telugu Thai Turkish Ukrainian Urdu Uzbek Vietnamese Welsh Language code Developer Guide sv ta te th tr uk ur uz vi cy Languages supported |
translate-dg-003 | translate-dg.pdf | 3 | hi hu is id ga it ja kn kk ko lv lt mk ms Supported languages 5 Amazon Translate Language Malayalam Maltese Marathi Mongolian Norwegian (Bokmål) Pashto Polish Portuguese (Brazil) Language code Developer Guide ml mt mr mn no ps pl pt Portuguese (Portugal) pt-PT Punjabi Romanian Russian Serbian Sinhala Slovak Slovenian Somali Spanish Spanish (Mexico) Swahili pa ro ru sr si sk sl so es es-MX sw Supported languages 6 Amazon Translate Language Swedish Tamil Telugu Thai Turkish Ukrainian Urdu Uzbek Vietnamese Welsh Language code Developer Guide sv ta te th tr uk ur uz vi cy Languages supported by Amazon Translate features The following sections describe the languages supported by Amazon Translate features. • Real-time document translation – Supports translations from English to any supported language, and from any supported language to English. For details about real-time translation, see Real- time translation. • Brevity – For the languages supported by this feature, see Using brevity in Amazon Translate. • Profanity masking – For the languages supported by this feature, see Masking profane words and phrases in Amazon Translate. • Formality – For the languages supported by this feature, see Setting formality in Amazon Translate. Languages supported by Amazon Translate features 7 Amazon Translate Developer Guide How Amazon Translate works Use the Amazon Translate service to translate content from a source language (the language of the input content) to a target language (the language that you select for the translation output). In a batch job, you can translate files from one or more source languages to one or more target languages. For more information about supported languages, see Supported languages and language codes. Topics • Supported formats for the input content • Customizing your translations • Automatic language detection • Exception handling Supported formats for the input content Amazon Translate, supports the following formats for the input content: • For real-time translations: • Input text – Plain text in UTF-8 format. Amazon Translate provides the output content as UTF-8 text. • One input file – A file containing plain text (.txt), HTML (.html), or Word (.docx) content. Amazon Translate provides the output content as a file in the same format as the input file. • For batch translation jobs: • Collection of input files – One or more files that you upload to an Amazon S3 location. Supported file formats include plain text (.txt), HTML (.html), Word (.docx), Excel (.xlsx), PowerPoint (.pptx) and XLIFF 1.2 (.xlf). Amazon Translate provides the output content as files. The file format for each output file matches the input file format. Customizing your translations You can use the following features to customize the translations that you produce with Amazon Translate: Supported formats for the input content 8 Amazon Translate Developer Guide • Do-not-translate tags – Uses start and end tags to specify content that you don't want to translate (in HTML content). • Custom terminology – Defines how you want Amazon Translate to translate specific terms, such as brand names. • Brevity – Reduces the length of the translation output for most translations (compared to the translation output without brevity). Brevity is supported for real-time text translations. • Profanity – Masks profane words and phrases in your translation output. • Formality – Sets the level of language formality in your translation output. • Parallel data – Adapts the translation output to reflect the style, tone, and word choices in the example translation samples that you provide. For information, see Customizing your translations. 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. 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. • 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. Automatic language detection 9 Amazon Translate Setting up Developer Guide Before you use Amazon Translate for the first time, complete the following tasks. Setting up tasks • Sign up for an AWS account • Create a user with administrative access • Install and configure the AWS Command Line Interface (AWS CLI) • Grant programmatic access • Using this service |
translate-dg-004 | translate-dg.pdf | 4 | – 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. Automatic language detection 9 Amazon Translate Setting up Developer Guide Before you use Amazon Translate for the first time, complete the following tasks. Setting up tasks • Sign up for an AWS account • Create a user with administrative access • Install and configure the AWS Command Line Interface (AWS CLI) • Grant programmatic access • Using this service with an AWS SDK Sign up for an AWS account If you do not have an AWS account, complete the following steps to create one. To sign up for an AWS account 1. Open https://portal.aws.amazon.com/billing/signup. 2. 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 a user, and use only the root user to perform tasks that require root user access. AWS sends you a confirmation email after the sign-up process is complete. At any time, you can view your current account activity and manage your account by going to https://aws.amazon.com/ and choosing My Account. Create a user with administrative access After you sign up for an AWS account, secure your AWS account root user, enable AWS IAM Identity Center, and create an administrative user so that you don't use the root user for everyday tasks. Sign up for an AWS account 10 Amazon Translate Developer Guide Secure your AWS account root user 1. Sign in to the AWS Management Console as the account owner by choosing Root user and entering your AWS account email address. On the next page, enter your password. For help signing in by using root user, see Signing in as the root user in the AWS Sign-In User Guide. 2. Turn on multi-factor authentication (MFA) for your root user. For instructions, see Enable a virtual MFA device for your AWS account root user (console) in the IAM User Guide. Create a user with administrative access 1. Enable IAM Identity Center. For instructions, see Enabling AWS IAM Identity Center in the AWS IAM Identity Center User Guide. 2. In IAM Identity Center, grant administrative access to a user. For a tutorial about using the IAM Identity Center directory as your identity source, see Configure user access with the default IAM Identity Center directory in the AWS IAM Identity Center User Guide. Sign in as the user with administrative access • To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email address when you created the IAM Identity Center user. For help signing in using an IAM Identity Center user, see Signing in to the AWS access portal in the AWS Sign-In User Guide. Assign access to additional users 1. In IAM Identity Center, create a permission set that follows the best practice of applying least- privilege permissions. For instructions, see Create a permission set in the AWS IAM Identity Center User Guide. Create a user with administrative access 11 Amazon Translate Developer Guide 2. Assign users to a group, and then assign single sign-on access to the group. For instructions, see Add groups in the AWS IAM Identity Center User Guide. Install and configure the AWS Command Line Interface (AWS CLI) You use the AWS CLI to make interactive calls to Amazon Translate. To install and configure the AWS CLI 1. Install the AWS CLI. For instructions, see the following topic in the AWS Command Line Interface User Guide: Installing or updating the latest version of the AWS Command Line Interface 2. Configure the AWS CLI. For instructions, see the following topic in the AWS Command Line Interface User Guide: Configuring the AWS Command Line Interface Grant programmatic access Users need programmatic access if they want to interact with AWS outside of the AWS Management Console. The way to grant programmatic access depends on the type of user that's accessing AWS. To grant users programmatic access, choose one of the following options. Which user needs programmatic access? To By Workforce identity (Users managed in IAM Identity Center) Use temporary credentials to sign programmatic requests to the AWS CLI, AWS SDKs, or AWS APIs. Following the instructions for the interface that you want to use. • For the AWS CLI, see Configuring the AWS CLI to use AWS IAM Set up the AWS CLI 12 Amazon Translate Developer Guide Which user needs programmatic access? To By |
translate-dg-005 | translate-dg.pdf | 5 | Console. The way to grant programmatic access depends on the type of user that's accessing AWS. To grant users programmatic access, choose one of the following options. Which user needs programmatic access? To By Workforce identity (Users managed in IAM Identity Center) Use temporary credentials to sign programmatic requests to the AWS CLI, AWS SDKs, or AWS APIs. Following the instructions for the interface that you want to use. • For the AWS CLI, see Configuring the AWS CLI to use AWS IAM Set up the AWS CLI 12 Amazon Translate Developer Guide Which user needs programmatic access? To By Identity Center in the AWS Command Line Interface User Guide. • For AWS SDKs, tools, and AWS APIs, see IAM Identity Center authentication in the AWS SDKs and Tools Reference Guide. IAM IAM Use temporary credentials to sign programmatic requests to the AWS CLI, AWS SDKs, or Following the instructions in Using temporary credentia ls with AWS resources in the AWS APIs. IAM User Guide. (Not recommended) Use long-term credentials to Following the instructions for the interface that you want to sign programmatic requests use. to the AWS CLI, AWS SDKs, or AWS APIs. • For the AWS CLI, see Authenticating using IAM user credentials in the AWS Command Line Interface User Guide. • For AWS SDKs and tools, see Authenticate using long-term credentials in the AWS SDKs and Tools Reference Guide. • For AWS APIs, see Managing access keys for IAM users in the IAM User Guide. Grant programmatic access 13 Amazon Translate Developer Guide Using this service with an AWS SDK AWS software development kits (SDKs) are available for many popular programming languages. Each SDK provides an API, code examples, and documentation that make it easier for developers to build applications in their preferred language. SDK documentation Code examples AWS SDK for C++ AWS SDK for C++ code examples AWS CLI AWS SDK for Go AWS SDK for Java AWS CLI code examples AWS SDK for Go code examples AWS SDK for Java code examples AWS SDK for JavaScript AWS SDK for JavaScript code examples AWS SDK for Kotlin AWS SDK for Kotlin code examples AWS SDK for .NET AWS SDK for PHP AWS SDK for .NET code examples AWS SDK for PHP code examples AWS Tools for PowerShell Tools for PowerShell code examples AWS SDK for Python (Boto3) AWS SDK for Python (Boto3) code examples AWS SDK for Ruby AWS SDK for Rust AWS SDK for Ruby code examples AWS SDK for Rust code examples AWS SDK for SAP ABAP AWS SDK for SAP ABAP code examples AWS SDK for Swift AWS SDK for Swift code examples Working with AWS SDKs 14 Amazon Translate Developer Guide Example availability Can't find what you need? Request a code example by using the Provide feedback link at the bottom of this page. Working with AWS SDKs 15 Amazon Translate Developer Guide Getting started with Amazon Translate The easiest way to get started with Amazon Translate is to use the console to translate some text. You can also try out the API operations from the command line. You can also install one of the AWS SDKs to use the Amazon Translate API operations. Topics • Getting started (console) • Getting started (AWS CLI) • Getting started (SDK) 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 10,000 bytes of text using the console. If you haven't reviewed the concepts and terminology in How Amazon Translate works, we recommend that you do so before proceeding. Open the Amazon Translate console. If this is the first time that you've used Amazon Translate, choose Launch real-time translation. In Real-time translation, choose the target language. Amazon Translate autodetects the source language, or you can choose a source language. Enter the text that you want to translate in the left-hand text box. The translated text appears in the right-hand text box. Getting started (console) 16 Amazon Translate Developer Guide In the Application integration section you can see the JSON input and output for the TranslateText operation. Getting started (console) 17 Amazon Translate Developer Guide Getting started (AWS CLI) In the following exercise, you use the AWS command line interface (AWS CLI) to translate text. To complete the exercise, you need to be familiar with the CLI and have a text editor. For more information, see Install and configure the AWS Command Line Interface (AWS CLI). To use Amazon Translate from the command line, you need to run the command from a region that supports the Amazon Translate service. For a list of available endpoints and regions, see Amazon Translate Regions and Endpoints in the AWS General Reference. Translate text using the command line The following example shows how to |
translate-dg-006 | translate-dg.pdf | 6 | the following exercise, you use the AWS command line interface (AWS CLI) to translate text. To complete the exercise, you need to be familiar with the CLI and have a text editor. For more information, see Install and configure the AWS Command Line Interface (AWS CLI). To use Amazon Translate from the command line, you need to run the command from a region that supports the Amazon Translate service. For a list of available endpoints and regions, see Amazon Translate Regions and Endpoints in the AWS General Reference. Translate text using the command line The following example shows how to use the TranslateText 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 \ Getting started (AWS CLI) 18 Amazon Translate Developer Guide --source-language-code "en" \ --target-language-code "es" \ --text "hello, world" The response is the following JSON: { "TargetLanguageCode": "es", "Text": "Hola, mundo", "SourceLanguageCode": "en" } Next step To see other ways to use Amazon Translate see Code examples for Amazon Translate using AWS SDKs. 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. The following examples demonstrate how to use Amazon Translate TranslateText operation using Java and Python. 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 • Translating text using the AWS SDK for Python (Boto) • Other SDK examples Translating text using the AWS SDK for Java AWS provides a GitHub example of how to use the TranslateText 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 2.x. Next step 19 Amazon Translate Developer Guide Translating text using the AWS SDK for Python (Boto) The following example shows how to use the TranslateText operation in Python. To run the example, install the Python SDK via the AWS CLI. For instructions, see the section called “Set up the AWS CLI”. 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 Other SDK examples See Code examples for Amazon Translate using AWS SDKs for examples that use .NET and SAP ABAP. Using the AWS SDK for Python 20 Amazon Translate Developer Guide 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 – You make a synchronous request to translate a small amount of text (or a text file) and Amazon Translate responds immediately with the translated text. • Asynchronous batch processing – You put a collection of documents in an Amazon Simple Storage Service (Amazon S3) location and start an asynchronous processing job to translate them. Amazon Translate sends the translated output documents to a specified Amazon S3 location. Real-time translation Amazon Translate provides real-time document and text translation operations that immediately return the translations. You can use the console or the API to perform real-time translations. Topics • Real-time translation using the console • Real-time translation using the API Real-time translation using the console To use the console for real-time translations, paste input text into the Source language text box or provide the input text as a file. Optionally, you can set features such as the desired formality level, profanity masking, brevity, and custom terminology. You can use auto language detection with real-time translations, but you may incur a charge. For more information, see Automatic language detection. Topics • Translate text • Translate a document • View equivalent API request and response data Real-time translation 21 Amazon Translate • Use translation features Translate text Developer Guide Use the Amazon Translate console to translate up to 10,000 bytes of text. 1. Open the Amazon Translate console. 2. 3. 4. 5. In the navigation menu on the left, choose Real-time translation. For Source language, select the language of the source text, or keep the value as Auto for auto detection. For Target language, select a language. Enter or paste text into the Source language text box. The console displays the translated text |
translate-dg-007 | translate-dg.pdf | 7 | text • Translate a document • View equivalent API request and response data Real-time translation 21 Amazon Translate • Use translation features Translate text Developer Guide Use the Amazon Translate console to translate up to 10,000 bytes of text. 1. Open the Amazon Translate console. 2. 3. 4. 5. In the navigation menu on the left, choose Real-time translation. For Source language, select the language of the source text, or keep the value as Auto for auto detection. For Target language, select a language. Enter or paste text into the Source language text box. The console displays the translated text in the Target language text box. Translate a document Real-time document translation supports translations from English to any supported language, and from any supported language to English. Real-time translation (console) 22 Amazon Translate Developer Guide To translate a document using the Amazon Translate console: 1. Open the Amazon Translate console. 2. 3. 4. 5. In the navigation menu on the left, choose Real-time translation. In the Translation panel, choose the Documents tab. For Source language, select the language of the source text, or select Auto for auto detection. For Target language, select a language. If the source language is not English, you must select English for the target language. 6. Under Upload file, choose Choose file and enter the path to the source file. The maximum file size is 100 KB. 7. For Document type, select the format of the translation source file. Document translation supports plain text, HTML, or Word (.docx) input files. 8. Choose Translate. Real-time translation (console) 23 Amazon Translate Developer Guide After the translation task completes, choose Download translation to download the translated document to your local hard drive. The format of the translated document (text, HTML, or Word) matches the input document. View equivalent API request and response data After you use the console to translate the input text or document, you can view the equivalent API request data and response data in JSON format. 1. Below the Translation panel, expand the Application integration panel. The console displays the equivalent translation request data in JSON format. 2. You can copy the JSON request to use in a TranslateText or TranslateDocument API operation. 3. The JSON output in the JSON response panel matches the output that the API generates. Use translation features To use translation features with the Amazon Translate console: 1. Open the Amazon Translate console. Real-time translation (console) 24 Amazon Translate Developer Guide 2. In the navigation menu on the left, choose Real-time translation. 3. Provide the source language, target language, and the input data (text or document) as described in the previous procedures. 4. Under Additional settings, you can choose to customize the output of your translation job with the following settings: Custom terminology Select a custom terminology file. If the file has an entry for a source term in the input text, Amazon Translate uses the translation from the terminology file. For more information, see Customizing your translations with custom terminology. Brevity Reduces the length of the translation output for most translations (compared to the translation output without brevity). Amazon Translate supports brevity for translating text, but not for translating a document. Amazon Translate ignores the brevity setting if the source and target language form an unsupported language pair for brevity. For information about supported languages, see Using brevity in Amazon Translate. Profanity Masks profane words and phrases in your translation output. Amazon Translate doesn't support profanity masking in all supported languages. For more information, see Masking profane words and phrases in Amazon Translate. Formality For some target languages, you can set Formality to formal or informal. Amazon Translate ignores the formality setting if formality doesn't support the target language. For more information, see Setting formality in Amazon Translate. 5. For document translation, choose Translate to translate the document using the chosen features. For text translation, the console applies the translation feature to the translated text when you choose each feature. Real-time translation (console) 25 Amazon Translate Developer Guide Real-time translation using the API Amazon Translate provides the following real-time translation operations to support interactive applications: • TranslateText – translates a block of text. • TranslateDocument – translates the contents of a file (plain text, HTML, or .docx). These synchronous operations return the translation result directly to your application. If you use auto language detection with these operations, you may incur a charge. For more information, see Automatic language detection. Translate text Use the TranslateText operation to translate a single block of text. Translate text using the command line The following example shows how to use the TranslateText operation from the command line. 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 |
translate-dg-008 | translate-dg.pdf | 8 | file (plain text, HTML, or .docx). These synchronous operations return the translation result directly to your application. If you use auto language detection with these operations, you may incur a charge. For more information, see Automatic language detection. Translate text Use the TranslateText operation to translate a single block of text. Translate text using the command line The following example shows how to use the TranslateText operation from the command line. 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, enter the following command. aws translate translate-text \ --region region \ --source-language-code "en" \ --target-language-code "es" \ --text "hello, world" The command responds with the following JSON: { "TargetLanguageCode": "es", "TranslatedText": "Hola, mundo", "SourceLanguageCode": "en" } Real-time translation (API) 26 Amazon Translate Translate text using a JSON file Developer Guide This example shows how to use a JSON file to translate a longer text block. You can specify the source and target language on the command line, or you specify them in the JSON file. Note The example 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" } 2. 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", "TranslatedText": "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 Real-time translation (API) 27 Amazon Translate Developer Guide pour traduire des documents ou pour créer des applications qui fonctionnent en plusieurs langues.", "SourceLanguageCode": "en" } Translate document Use the TranslateDocument operation to translate a text, HTML, or Word (.docx) document and return the translation result directly to your application. Real-time document translation supports translations from English to any supported language, and from any supported language to English. You can specify the source language code or use auto detect. Translate document using the command line The following example shows how to use the TranslateDocument operation from the command line. 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, enter the following command. aws translate translate-document \ --region region \ --source-language-code "en" \ --target-language-code "es" \ --document-content fileb://source-lang.txt --document ContentType=text/plain --query "TranslatedDocument.Content" --output text | base64 --decode > target-lang.txt The command responds with the following JSON: { "SourceLanguageCode": "en", "TargetLanguageCode": "es", "TranslatedDocument":{ "Content": blob } Real-time translation (API) 28 Amazon Translate } Developer Guide 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. 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. 2. Start a batch translation job. 3. 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. 4. Monitor the progress of the batch translation job. 5. 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 (Ohio) • US East (N. Virginia) • US West (N. California) • US West (Oregon) • Asia Pacific (Mumbai) • Asia Pacific (Seoul) • Asia Pacific (Singapore) • Asia Pacific (Sydney) • Asia Pacific (Tokyo) • Canada (Central) • Europe (Frankfurt) Asynchronous batch processing 29 Developer Guide Amazon Translate • Europe (Ireland) • Europe (London) • Europe (Paris) • Europe (Stockholm) Topics • Prerequisites for batch translation jobs • Running a batch translation job • Monitoring and analyzing batch translation jobs • Getting batch translation results Prerequisites for batch translation |
translate-dg-009 | translate-dg.pdf | 9 | is supported in the following AWS Regions: • US East (Ohio) • US East (N. Virginia) • US West (N. California) • US West (Oregon) • Asia Pacific (Mumbai) • Asia Pacific (Seoul) • Asia Pacific (Singapore) • Asia Pacific (Sydney) • Asia Pacific (Tokyo) • Canada (Central) • Europe (Frankfurt) Asynchronous batch processing 29 Developer Guide Amazon Translate • Europe (Ireland) • Europe (London) • Europe (Paris) • Europe (Stockholm) Topics • Prerequisites for batch translation jobs • Running a batch translation job • Monitoring and analyzing batch translation jobs • Getting batch translation results 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. Prerequisites 30 Amazon Translate • HTML. • Word documents (.docx). • PowerPoint Presentation files (.pptx). • Excel Workbook files (.xlsx). Developer Guide • 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 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": [ { Prerequisites 31 Amazon Translate Developer Guide "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 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" }, Prerequisites 32 Amazon Translate Developer Guide "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 |
translate-dg-010 | translate-dg.pdf | 10 | } ] } 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" Prerequisites 33 Developer Guide Amazon Translate ] }, "Action": [ "kms:Decrypt", "kms:GenerateDataKey", "kms:CreateGrant", "kms:RetireGrant", "kms:DescribeKey" ], "Resource": "*" } For more information, see Key policies in AWS KMS 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. 2. 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" } Prerequisites 34 Amazon Translate Developer Guide To update your KMS key policy, add the service role and admin 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:admin" ] }, "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 in the AWS Key Management Service Developer Guide 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. Running a job 35 Amazon Translate Amazon Translate console Developer Guide 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. 2. In the navigation menu on the left, choose Batch translation. 3. On the Translation jobs page, choose Create job. The console shows the Create translation job page. 4. Under Job settings, do the following: a. b. c. For Name, enter a custom name for the batch translation job. 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. For Target languages, select up to 10 languages. Amazon Translate translates each source file into each target language. 5. Under Input data, do the following: a. 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. b. For File format, select format of the translation source files. 6. Under Output data, do the following: a. 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. b. 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 |
translate-dg-011 | translate-dg.pdf | 11 | in Amazon S3, choose Select folder. b. For File format, select format of the translation source files. 6. Under Output data, do the following: a. 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. b. 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. Running a job 36 Amazon Translate Developer Guide 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. 7. 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. Brevity Amazon Translate doesn't support brevity for batch translation jobs. For more information, see Using brevity in Amazon Translate. 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. Running a job 37 Amazon Translate Custom terminology Developer Guide 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. 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. 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. For more information, see Customizing your translations with parallel data (Active Custom Translation). 8. 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-. Running a job 38 Amazon Translate Developer Guide 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 9. 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. 10. 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. 11. 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. 12. To download your output files, select the check box |
translate-dg-012 | translate-dg.pdf | 12 | 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. 10. 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. 11. 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. 12. 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 start-text-translation-job 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://amzn-s3-demo-bucket/input/ \ > --output-data-config S3Uri=s3://amzn-s3-demo-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 Running a job 39 Amazon Translate Developer Guide 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: Turn on brevity in the translation output. Amazon Translate doesn't support brevity for batch translation jobs. For more information, see Using brevity in Amazon Translate. 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. 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. --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 list-terminologies command. For more information, see Customizing your translations with custom terminology. --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 Running a job 40 Amazon Translate Developer Guide 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. 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. For a list of available parallel data resources, use the list-parallel-data command. For more information, see Customizing your translations with parallel data (Active Custom Translation). To check the status of your translation job, use the describe-text-translation-job 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 }, Running a job 41 Amazon Translate Developer Guide "SourceLanguageCode": "en", "TargetLanguageCodes": [ "es", "it" ], "SubmittedTime": 1598661012.468, "InputDataConfig": { "S3Uri": "s3://amzn-s3-demo-bucket/input/", "ContentType": "application/vnd.openxmlformats- officedocument.spreadsheetml.sheet" }, "OutputDataConfig": { "S3Uri": "s3://amzn-s3-demo-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 describe- text-translation-job 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 operation. 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. |
translate-dg-013 | translate-dg.pdf | 13 | "application/vnd.openxmlformats- officedocument.spreadsheetml.sheet" }, "OutputDataConfig": { "S3Uri": "s3://amzn-s3-demo-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 describe- text-translation-job 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 operation. 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 operation. You can also use the ListTextTranslationJobs 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 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 command: Monitoring and analyzing 42 Amazon Translate Developer Guide $ 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 operation. Example stop-text-translation-job command The following example stops a batch translation with by using the AWS CLI to run the StopTextTranslationJob command: Monitoring and analyzing 43 Amazon Translate Developer Guide $ 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/" } } } 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 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 Getting results 44 Amazon Translate Developer Guide 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" } Getting results 45 Amazon Translate ] } ] } } ] } Developer Guide Getting results 46 Amazon Translate Developer Guide 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 don't want to translate (in HTML content). • Custom terminology – Define how you want Amazon Translate to translate specific terms, such as brand names. • Brevity – Reduces the length of the translation output for most translations (compared to the translation output without brevity). Use brevity with real-time text translations. • Profanity – Mask profane words and phrases in your translation output. • Formality – Set the level of language formality in your translation output. • Parallel data – Adapt the translation output to reflect the style, tone, and word choices in the example translation samples that you provide. Topics • Using do-not-translate in Amazon Translate • Customizing your translations with custom terminology • Using brevity in Amazon Translate • Masking profane words and phrases in Amazon Translate • Setting formality in Amazon Translate • Customizing your translations with parallel data (Active Custom Translation) Using do-not-translate in Amazon Translate For HTML content, you can add do-not-translate tags to text that you don't want to translate. This feature is available for the console and API operations. Topics • Using |
translate-dg-014 | translate-dg.pdf | 14 | – Adapt the translation output to reflect the style, tone, and word choices in the example translation samples that you provide. Topics • Using do-not-translate in Amazon Translate • Customizing your translations with custom terminology • Using brevity in Amazon Translate • Masking profane words and phrases in Amazon Translate • Setting formality in Amazon Translate • Customizing your translations with parallel data (Active Custom Translation) Using do-not-translate in Amazon Translate For HTML content, you can add do-not-translate tags to text that you don't want to translate. This feature is available for the console and API operations. Topics • Using do-not-translate with the console • Using do-not-translate with the API Using do-not-translate tags 47 Amazon Translate Developer Guide Using do-not-translate with the console In the source HTML content, specify translate="no" in HTML tags that surround the content that you don't want to translate. For example, to translate the following text from English to German: In French, the Louvre Museum is Musée du Louvre. The text “Musée du Louvre” needs to remain in French, so we use a span tag to skip translation for this content : <p>In French, the Louvre Museum is <span translate="no">Musée du Louvre</span>.</p> This sentence has the resulting translation into German: <p>Auf Französisch ist <span translate="no">Musée du Louvre</span> das Louvre-Museum.</ p> Using do-not-translate with the API You can use do-not-translate with the real-time API operations (TranslateText and TranslateDocument) and the asynchronous StartTextTranslationJob API operation. 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 want to translate some text from English to Spanish, but keep some text in English: aws translate translate-text \ --source-language-code "en" \ --target-language-code "es" \ --region us-west-2 \ --text "<p>You can translate this paragraph to any language.</p> <p translate=no>But do not translate this.</p>" This API request returns the following Spanish translation: { Using do-not-translate with the console 48 Amazon Translate Developer Guide "TranslatedText": "<p>Puede traducir este párrafo a cualquier idioma.</p> <p translate=no>But do not translate this.</p>", "SourceLanguageCode": "en", "TargetLanguageCode": "es" } Customizing your translations with custom terminology Use custom terminologies along with your translation requests to make sure that your brand names, character names, model names, and other unique content get translated to the desired result. You can create terminology files and upload them to your Amazon Translate account. For information about file sizes and number of terminology files, see Service quotas. When you translate text, you can optionally choose a custom terminology file to use. When Amazon Translate finds a match between source text and the terminology file, it uses the translation from the terminology file. Consider the following example: Amazon Photos provides free photo and video storage to Amazon Prime members. In French, the name isn't translated: it remains as Amazon Photos. When you use Amazon Translate to translate Amazon Photos into French without any additional context, the result is Photos d'Amazon, which isn't the desired translation. If you add a custom terminology entry for the term Amazon Photos, specifying that the French translation is Amazon Photos, Amazon Translate uses the custom terminology to translate the phrase to the desired result. Amazon Translate doesn't guarantee that it will use the target term for every translation. Custom terminology uses the meaning of the source and target term in the translation context to decide whether to use the target term. For more information, see Best practices. Topics • Creating a custom terminology • Using custom terminologies • Custom Terminology example using the AWS SDK for Python (Boto) • Encrypting your terminology • Best practices Customizing with custom terminology 49 Amazon Translate Developer Guide Creating a custom terminology You define custom terminology by creating a terminology file. Amazon Translate supports CSV, TSV, or TMX file formats. Each entry in the file contains the source term and the equivalent (translated) term for each target language. After you create a terminology file, you upload the file to your Amazon Translate account. Important The source text in a custom terminology is case-sensitive. During translation, Amazon Translate uses the custom terminology when it finds an exact match in the input document. Terminology file formats The following example shows a terminology file in CSV format. CSV (comma separated values) en,fr,es Amazon Photos,Amazon Photos,Amazon Photos The following example shows a terminology file in TMX format. A TMX file uses an XML format that translation software often uses. TMX (Translation Memory eXchange) <?xml version="1.0" encoding="UTF-8"?> <tmx version="1.4"> <header creationtool="XYZTool" creationtoolversion="0" datatype="PlainText" segtype="sentence" adminlang="en-us" srclang="en" o-tmf="test"/> <body> <tu> <tuv xml:lang="en"> <seg>Amazon Photos</seg> </tuv> <tuv xml:lang="fr"> Creating a custom terminology 50 Amazon Translate Developer Guide <seg>Amazon Photos</seg> </tuv> <tuv xml:lang="es"> <seg>Amazon Photos</seg> </tuv> </tu> </body> </tmx> Directionality When you upload a custom terminology file, you set the directionality value for the |
translate-dg-015 | translate-dg.pdf | 15 | example shows a terminology file in CSV format. CSV (comma separated values) en,fr,es Amazon Photos,Amazon Photos,Amazon Photos The following example shows a terminology file in TMX format. A TMX file uses an XML format that translation software often uses. TMX (Translation Memory eXchange) <?xml version="1.0" encoding="UTF-8"?> <tmx version="1.4"> <header creationtool="XYZTool" creationtoolversion="0" datatype="PlainText" segtype="sentence" adminlang="en-us" srclang="en" o-tmf="test"/> <body> <tu> <tuv xml:lang="en"> <seg>Amazon Photos</seg> </tuv> <tuv xml:lang="fr"> Creating a custom terminology 50 Amazon Translate Developer Guide <seg>Amazon Photos</seg> </tuv> <tuv xml:lang="es"> <seg>Amazon Photos</seg> </tuv> </tu> </body> </tmx> Directionality When you upload a custom terminology file, you set the directionality value for the custom terminology. Directionality indicates whether your terminology file specifies one source language or multiple source languages. For directionality, set one of the following values: Uni-directional The terminology file contains one source language (the first language in the list). All other languages are target languages. For example, in a CSV file, the first column contains text for the source language, and all other columns contain text for 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, French, and Spanish, you can use the file for jobs that translate the following language pairs: • English to French • English to Spanish • French to English • French to Spanish • Spanish to English • Spanish to French In contrast, you would need to create three uni-directional terminology files for these six translation jobs (one for each source language). Creating a custom terminology 51 Amazon Translate Developer Guide Using custom terminologies To use a Custom Terminology when translating text with the TranslateText operation, include the optional TerminologyNames parameter. For example, if you upload the following terminology file called Amazon_Family.csv to your account: en,fr Amazon Family,Amazon Famille You can use the following CLI command to translate your text using Custom Terminology. 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 stored videos in 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?" The following example shows how to use the same terminology file in Python. 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") Using custom terminologies 52 Amazon Translate Developer Guide print("Translated text: " + response.get('TranslatedText')) print("\n") For more information on using the Amazon Translate operations with Custom Terminologies, see API Operations. Custom Terminology example using the AWS SDK for Python (Boto) The following example shows how to use the Custom Terminology operations in Python. To run the example, install the Python SDK via the AWS CLI. For instructions, see the section called “Set up the AWS CLI”. #!/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')) Example using SDK for Python 53 Amazon Translate Developer Guide 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...") Example using SDK for Python 54 Amazon Translate Developer Guide 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 |
translate-dg-016 | translate-dg.pdf | 16 | 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...") Example using SDK for Python 54 Amazon Translate Developer Guide 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.") Encrypting your terminology Amazon Translate endeavors to protect all 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. AWS encryption is the default option to safeguard your information. • Using an encryption key associated with your account. 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. The console displays an input field for you to enter the Amazon Resource Name (ARN) of the encryption key. Best practices Use following general best practices when using custom terminologies: • Keep your custom terminology uncluttered. Only include terms for which you need to control the translated values. • Custom terminologies are case-sensitive. If you want a target translation for the capitalized and non-capitalized versions of a word, include an entry for each version. • Custom terminology isn't intended as a tool for controlling spacing, punctuation, or capitalization. For example, avoid the following types of entries: Encrypting your terminology 55 Amazon Translate Developer Guide • Adding spaces – EN: USA FR: U S A • Adding punctuation – EN: USA FR: U.S.A • Changing the capitalization – EN: USA FR: Usa • Don't include different translations for the same source phrase. For example: • Entry #1 – EN: Amazon FR: Amazon • Entry #2 – EN: Amazon FR: Amazone • You can create custom terminology files for any of the languages that Amazon Translate supports. Amazon Translate doesn't guarantee that custom terminology will use the target term for every translation. To achieve high accuracy with custom terminology, follow these best practices when you create the content for the terminology file: • Custom terminology works well with any words, including verbs and homographs. Proper names, such as brand names and product names, are ideal entries. • Target terms should be fluent in the target language. Custom terminology isn't recommended for target terms that contain numerous special characters or formatting. • You can include multi-word phrases or clauses in your terminology file. However, terms that contain multiple words are less likely to read fluently in the target languages. • Custom terminology uses the meaning of the source and target term in the translation context to decide whether to use the target term. If a target term isn't a good fit in a given translation context, Amazon Translate may not use the target term. For example, if your terminology file contains the following entry for English to French: EN: order, FR: commande (based on the English "to order" translating into French "commander"). Amazon Translate doesn't use this entry when translating the following sentence, because the translation context doesn't match: "In order for us to help you, please share your name." Suggestions for avoiding this type of situation: • Make sure that the target term for each language is semantically equivalent to the source term. Best practices 56 Amazon Translate Developer Guide • Avoid source or target terms that have multiple meanings. Using brevity in Amazon Translate When translating between languages, there are times when the translation output is longer (in character count) than desired. Longer output can cause a problem in some scenarios (such as captions, subtitles, headlines, or form fields), if there is no space for extra characters. You can turn on the brevity setting when you run real-time text translations with Amazon Translate. Brevity reduces the length of the translation output for most translations (compared to the translation output without brevity). Topics • Using the brevity setting • Supported languages Using the brevity setting You can use the brevity setting with real-time text translation. Amazon Translate doesn't support brevity for real-time document translation or for asynchronous translation jobs. To use brevity in a real-time text translation request, do one of the following: • Console – In the Text tab of the Real-time translation page, under Additional settings, choose the Brevity setting. • AWS CLI – In the translate-text command, set brevity in the --settings parameter to Brevity=ON. For more information, see translate-text in |
translate-dg-017 | translate-dg.pdf | 17 | translations (compared to the translation output without brevity). Topics • Using the brevity setting • Supported languages Using the brevity setting You can use the brevity setting with real-time text translation. Amazon Translate doesn't support brevity for real-time document translation or for asynchronous translation jobs. To use brevity in a real-time text translation request, do one of the following: • Console – In the Text tab of the Real-time translation page, under Additional settings, choose the Brevity setting. • AWS CLI – In the translate-text command, set brevity in the --settings parameter to Brevity=ON. For more information, see translate-text in the AWS CLI Command Reference. • AWS API – In the TranslateText API operation, configure brevity in the Settings parameter. Supported languages Amazon Translate supports brevity for the following language pairs: • From any source language to one of the languages in the following table. • From any of the languages in the following table to English. Using brevity 57 Amazon Translate Language French German Italian Portuguese (Brazil) Spanish Developer Guide Language code fr de it pt es If you request brevity for translation with an unsupported language pair, the translation proceeds with the brevity setting turned off. 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 • Unsupported languages Masking profanity 58 Amazon Translate Developer Guide 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. • In the translate-text command in the AWS CLI, set the --settings parameter to Profanity=MASK. For more information, see translate-text in the AWS CLI Command Reference. • In the TranslateText action in the Amazon Translate API, use the Settings parameter to set profanity masking. For more information, see TranslateText in the API Reference. To mask profanity in an asynchronous batch operation, see Running a batch translation job. Unsupported languages You can mask profanity when you translate to any of the target languages that Amazon Translate supports, with the following exceptions: Language Bengali Hindi Malayalam Punjabi Sinhala Vietnamese Language code bn hi ml pa si vi For all of the languages that Amazon Translate supports, see Supported languages and language codes. Using the profanity setting 59 Amazon Translate Developer Guide 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 or register) 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 • Supported 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 |
translate-dg-018 | translate-dg.pdf | 18 | 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 • Supported 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 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 in the AWS CLI Command Reference. Setting formality 60 Amazon Translate Developer Guide 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. 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 Dutch French French (Canada) German Hindi Italian Japanese Korean Portuguese (Portugal) Spanish Spanish (Mexico) Language code nl fr fr-CA de hi it ja ko pt-PT es es-MX For all the languages that Amazon Translate supports, see Supported languages and language codes. Supported languages 61 Amazon Translate Developer Guide 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. 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: Customizing with parallel data 62 Amazon Translate Developer Guide 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 • Parallel data input files for Amazon Translate • Adding your parallel data to Amazon Translate • Viewing and managing your parallel data in Amazon Translate Parallel data input files for Amazon Translate Before you can create a parallel |
translate-dg-019 | translate-dg.pdf | 19 | 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 • Parallel data input files for Amazon Translate • Adding your parallel data to Amazon Translate • Viewing and managing your parallel data in Amazon Translate 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 Region availability 63 Amazon Translate Developer Guide Amazon Translate supports. For a list of these languages, see Supported languages and language codes. 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 Amazon Translate is a neural machine translati on service. Amazon Translate es un servicio de traducción automática basado en redes neuronales. Neural machine translation is a form of language translation automation that uses La traducción automática neuronal es una forma de automatizar la traducción de deep learning models. 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. The first row of the table provides the language codes. The first language, English (en), is the source language. Spanish (es) is the target language. The first column provides examples of source text. The other column contains 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 Parallel data input files for Amazon Translate 64 Amazon Translate Example TMX input file Developer Guide 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) is the target language. As an input file for parallel data, it provides several examples that Amazon Translate can use to tailor the output of a batch job. <?xml version="1.0" encoding="UTF-8"?> <tmx version="1.4"> <header srclang="en"/> <body> <tu> <tuv xml:lang="en"> <seg>Amazon Translate is a neural machine translation service.</seg> </tuv> <tuv xml:lang="es"> <seg>Amazon Translate es un servicio de traducción automática basado en redes neuronales.</seg> </tuv> </tu> <tu> <tuv xml:lang="en"> <seg>Neural machine translation is a form of language translation automation that uses deep learning models.</seg> </tuv> <tuv xml:lang="es"> <seg>La traducción automática neuronal es una forma de automatizar la traducción de lenguajes utilizando modelos de aprendizaje profundo.</seg> </tuv> </tu> <tu> <tuv xml:lang="en"> <seg>Amazon Translate allows you to localize content for international users.</seg> </tuv> <tuv xml:lang="es"> <seg>Amazon Translate le permite localizar contenido para usuarios internacionales.</seg> </tuv> </tu> </body> </tmx> Parallel data input files for Amazon Translate 65 Amazon Translate TMX requirements Developer Guide 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 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 |
translate-dg-020 | translate-dg.pdf | 20 | 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. Parallel data input files for Amazon Translate 66 Amazon Translate CSV Developer Guide 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) is the target language. 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 Amazon Translate is a neural machine translation service.,Amazon Translate es un servicio de traducción automática basado en redes neuronales. 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. 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: Parallel data input files for Amazon Translate 67 Amazon Translate 34"" monitor Developer Guide • 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) is the target language. 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 Amazon Translate is a neural machine translation service. Amazon Translate es un servicio de traducción automática basado en redes neuronales. 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. 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. Parallel data input files for Amazon Translate 68 Amazon Translate Developer Guide • 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 |
translate-dg-021 | translate-dg.pdf | 21 | Translate allows you to localize content for international users. Amazon Translate le permite localizar contenido para usuarios internacionales. 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. Parallel data input files for Amazon Translate 68 Amazon Translate Developer Guide • 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. 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. Adding parallel data 69 Amazon Translate Developer Guide 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. • Have an Amazon S3 bucket in your AWS account. To create one, see How do I create an S3 Bucket? 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? 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. 2. In the navigation menu on the left, choose Customization, and choose Parallel data. 3. On the Parallel data page, choose Create parallel data. The console shows the Create parallel data page. 4. 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). Adding parallel data 70 Amazon Translate Developer Guide 5. 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. 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 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 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 |
translate-dg-022 | translate-dg.pdf | 22 | 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 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. 6. 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, Adding parallel data 71 Amazon Translate Developer Guide "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. 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. Adding parallel data 72 Amazon Translate Developer Guide 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. 2. 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. 2. 3. In the Amazon Translate console, go to the Parallel data page. Select the parallel data that you want to update, and choose Update. The console shows the Update parallel data page. 4. 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. Viewing and managing parallel data 73 Amazon Translate Developer Guide 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). 5. 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 |
translate-dg-023 | translate-dg.pdf | 23 | Viewing and managing parallel data 73 Amazon Translate Developer Guide 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). 5. 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, Viewing and managing parallel data 74 Amazon Translate Developer Guide "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, Viewing and managing parallel data 75 Amazon Translate Developer Guide "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. Viewing and managing parallel data 76 Amazon Translate Developer Guide Code examples for Amazon Translate using AWS SDKs The following code examples show how to use Amazon Translate with an AWS software development kit (SDK). Actions are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios. Scenarios are code examples that show you how to accomplish specific tasks by calling multiple functions within a service or combined with other AWS services. For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Code examples • Basic examples for Amazon Translate using AWS SDKs • Actions for Amazon Translate using AWS SDKs • Use DescribeTextTranslationJob with an AWS SDK • Use ListTextTranslationJobs with an AWS SDK • Use StartTextTranslationJob with an AWS SDK • Use StopTextTranslationJob with an AWS SDK • Use TranslateText with an AWS SDK or CLI • Scenarios for Amazon Translate using AWS SDKs • Build an Amazon Transcribe streaming app • Create an Amazon Lex chatbot to engage your website visitors • Build a publish and subscription application that translates messages • Create an application that analyzes customer feedback and synthesizes audio • Get started with Amazon Translate jobs using an AWS SDK Basic examples for Amazon Translate using AWS SDKs The following code examples show how to use the basics of Amazon Translate with AWS SDKs. Examples Basics 77 Amazon Translate Developer Guide • Actions for Amazon Translate using AWS SDKs • Use DescribeTextTranslationJob with an AWS SDK • Use ListTextTranslationJobs with an AWS SDK • Use StartTextTranslationJob with an AWS SDK • Use StopTextTranslationJob with an AWS SDK • Use TranslateText with an AWS SDK or CLI Actions for Amazon Translate using AWS SDKs The following code examples demonstrate how to perform individual Amazon Translate actions with AWS SDKs. |
translate-dg-024 | translate-dg.pdf | 24 | AWS SDK Basic examples for Amazon Translate using AWS SDKs The following code examples show how to use the basics of Amazon Translate with AWS SDKs. Examples Basics 77 Amazon Translate Developer Guide • Actions for Amazon Translate using AWS SDKs • Use DescribeTextTranslationJob with an AWS SDK • Use ListTextTranslationJobs with an AWS SDK • Use StartTextTranslationJob with an AWS SDK • Use StopTextTranslationJob with an AWS SDK • Use TranslateText with an AWS SDK or CLI Actions for Amazon Translate using AWS SDKs The following code examples demonstrate how to perform individual Amazon Translate actions with AWS SDKs. Each example includes a link to GitHub, where you can find instructions for setting up and running the code. These excerpts call the Amazon Translate API and are code excerpts from larger programs that must be run in context. You can see actions in context in Scenarios for Amazon Translate using AWS SDKs . The following examples include only the most commonly used actions. For a complete list, see the Amazon Translate API Reference. Examples • Use DescribeTextTranslationJob with an AWS SDK • Use ListTextTranslationJobs with an AWS SDK • Use StartTextTranslationJob with an AWS SDK • Use StopTextTranslationJob with an AWS SDK • Use TranslateText with an AWS SDK or CLI Use DescribeTextTranslationJob with an AWS SDK The following code examples show how to use DescribeTextTranslationJob. Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example: • Get started with translate jobs Actions 78 Amazon Translate .NET SDK for .NET Note Developer Guide There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. using System; using System.Threading.Tasks; using Amazon.Translate; using Amazon.Translate.Model; /// <summary> /// The following example shows how to retrieve the details of /// a text translation job using Amazon Translate. /// </summary> public class DescribeTextTranslation { public static async Task Main() { var client = new AmazonTranslateClient(); // The Job Id is generated when the text translation job is started // with a call to the StartTextTranslationJob method. var jobId = "1234567890abcdef01234567890abcde"; var request = new DescribeTextTranslationJobRequest { JobId = jobId, }; var jobProperties = await DescribeTranslationJobAsync(client, request); DisplayTranslationJobDetails(jobProperties); } /// <summary> /// Retrieve information about an Amazon Translate text translation job. Actions 79 Amazon Translate Developer Guide /// </summary> /// <param name="client">The initialized Amazon Translate client object.</param> /// <param name="request">The DescribeTextTranslationJobRequest object.</ param> /// <returns>The TextTranslationJobProperties object containing /// information about the text translation job..</returns> public static async Task<TextTranslationJobProperties> DescribeTranslationJobAsync( AmazonTranslateClient client, DescribeTextTranslationJobRequest request) { var response = await client.DescribeTextTranslationJobAsync(request); if (response.HttpStatusCode == System.Net.HttpStatusCode.OK) { return response.TextTranslationJobProperties; } else { return null; } } /// <summary> /// Displays the properties of the text translation job. /// </summary> /// <param name="jobProperties">The properties of the text translation /// job returned by the call to DescribeTextTranslationJobAsync.</param> public static void DisplayTranslationJobDetails(TextTranslationJobProperties jobProperties) { if (jobProperties is null) { Console.WriteLine("No text translation job properties found."); return; } // Display the details of the text translation job. Console.WriteLine($"{jobProperties.JobId}: {jobProperties.JobName}"); } } Actions 80 Amazon Translate Developer Guide • For API details, see DescribeTextTranslationJob in AWS SDK for .NET API Reference. SAP ABAP SDK for SAP ABAP Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. "Gets the properties associated with an asynchronous batch translation job." "Includes properties such as name, ID, status, source and target languages, and input/output Amazon Simple Storage Service (Amazon S3) buckets." TRY. oo_result = lo_xl8->describetexttranslationjob( "oo_result is returned for testing purposes." iv_jobid = iv_jobid ). MESSAGE 'Job description retrieved.' TYPE 'I'. CATCH /aws1/cx_xl8internalserverex. MESSAGE 'An internal server error occurred. Retry your request.' TYPE 'E'. CATCH /aws1/cx_xl8resourcenotfoundex. MESSAGE 'The resource you are looking for has not been found.' TYPE 'E'. CATCH /aws1/cx_xl8toomanyrequestsex. MESSAGE 'You have made too many requests within a short period of time.' TYPE 'E'. ENDTRY. • For API details, see DescribeTextTranslationJob in AWS SDK for SAP ABAP API reference. For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Actions 81 Amazon Translate Developer Guide Use ListTextTranslationJobs with an AWS SDK The following code examples show how to use ListTextTranslationJobs. .NET SDK for .NET Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. using System; using System.Collections.Generic; using System.Threading.Tasks; using Amazon.Translate; using Amazon.Translate.Model; /// <summary> /// List Amazon Translate translation jobs, along with details about each job. /// </summary> public class ListTranslationJobs { public static async Task Main() { var client = new AmazonTranslateClient(); var filter |
translate-dg-025 | translate-dg.pdf | 25 | about getting started and details about previous SDK versions. Actions 81 Amazon Translate Developer Guide Use ListTextTranslationJobs with an AWS SDK The following code examples show how to use ListTextTranslationJobs. .NET SDK for .NET Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. using System; using System.Collections.Generic; using System.Threading.Tasks; using Amazon.Translate; using Amazon.Translate.Model; /// <summary> /// List Amazon Translate translation jobs, along with details about each job. /// </summary> public class ListTranslationJobs { public static async Task Main() { var client = new AmazonTranslateClient(); var filter = new TextTranslationJobFilter { JobStatus = "COMPLETED", }; var request = new ListTextTranslationJobsRequest { MaxResults = 10, Filter = filter, }; await ListJobsAsync(client, request); } Actions 82 Amazon Translate Developer Guide /// <summary> /// List Amazon Translate text translation jobs. /// </summary> /// <param name="client">The initialized Amazon Translate client object.</param> /// <param name="request">An Amazon Translate /// ListTextTranslationJobsRequest object detailing which text /// translation jobs are of interest.</param> public static async Task ListJobsAsync( AmazonTranslateClient client, ListTextTranslationJobsRequest request) { ListTextTranslationJobsResponse response; do { response = await client.ListTextTranslationJobsAsync(request); ShowTranslationJobDetails(response.TextTranslationJobPropertiesList); request.NextToken = response.NextToken; } while (response.NextToken is not null); } /// <summary> /// List existing translation job details. /// </summary> /// <param name="properties">A list of Amazon Translate text /// translation jobs.</param> public static void ShowTranslationJobDetails(List<TextTranslationJobProperties> properties) { properties.ForEach(prop => { Console.WriteLine($"{prop.JobId}: {prop.JobName}"); Console.WriteLine($"Status: {prop.JobStatus}"); Console.WriteLine($"Submitted time: {prop.SubmittedTime}"); }); } } Actions 83 Amazon Translate Developer Guide • For API details, see ListTextTranslationJobs in AWS SDK for .NET API Reference. SAP ABAP SDK for SAP ABAP Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. "Gets a list of the batch translation jobs that you have submitted." DATA lo_filter TYPE REF TO /aws1/cl_xl8textxlationjobfilt. "Create an ABAP object for filtering using jobname." lo_filter = NEW #( iv_jobname = iv_jobname ). TRY. oo_result = lo_xl8->listtexttranslationjobs( "oo_result is returned for testing purposes." io_filter = lo_filter ). MESSAGE 'Jobs retrieved.' TYPE 'I'. CATCH /aws1/cx_xl8internalserverex. MESSAGE 'An internal server error occurred. Retry your request.' TYPE 'E'. CATCH /aws1/cx_xl8invalidfilterex. MESSAGE 'The filter specified for the operation is not valid. Specify a different filter.' TYPE 'E'. CATCH /aws1/cx_xl8invalidrequestex. MESSAGE 'The request that you made is not valid.' TYPE 'E'. CATCH /aws1/cx_xl8toomanyrequestsex. MESSAGE 'You have made too many requests within a short period of time.' TYPE 'E'. ENDTRY. • For API details, see ListTextTranslationJobs in AWS SDK for SAP ABAP API reference. Actions 84 Amazon Translate Developer Guide For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Use StartTextTranslationJob with an AWS SDK The following code examples show how to use StartTextTranslationJob. Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example: • Get started with translate jobs .NET SDK for .NET Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. using System; using System.Collections.Generic; using System.Threading.Tasks; using Amazon.Translate; using Amazon.Translate.Model; /// <summary> /// This example shows how to use Amazon Translate to process the files in /// an Amazon Simple Storage Service (Amazon S3) bucket. The translated results /// will also be stored in an Amazon S3 bucket. /// </summary> public class BatchTranslate { public static async Task Main() { var contentType = "text/plain"; Actions 85 Amazon Translate Developer Guide // Set this variable to an S3 bucket location with a folder." // Input files must be in a folder and not at the bucket root." var s3InputUri = "s3://amzn-s3-demo-bucket1/FOLDER/"; var s3OutputUri = "s3://amzn-s3-demo-bucket2/"; // This role must have permissions to read the source bucket and to read and // write to the destination bucket where the translated text will be stored. var dataAccessRoleArn = "arn:aws:iam::0123456789ab:role/ S3TranslateRole"; var client = new AmazonTranslateClient(); var inputConfig = new InputDataConfig { ContentType = contentType, S3Uri = s3InputUri, }; var outputConfig = new OutputDataConfig { S3Uri = s3OutputUri, }; var request = new StartTextTranslationJobRequest { JobName = "ExampleTranslationJob", DataAccessRoleArn = dataAccessRoleArn, InputDataConfig = inputConfig, OutputDataConfig = outputConfig, SourceLanguageCode = "en", TargetLanguageCodes = new List<string> { "fr" }, }; var response = await StartTextTranslationAsync(client, request); if (response.HttpStatusCode == System.Net.HttpStatusCode.OK) { Console.WriteLine($"{response.JobId}: {response.JobStatus}"); } } /// <summary> Actions 86 Amazon Translate Developer Guide /// Start the Amazon Translate text translation job. /// </summary> /// <param name="client">The initialized AmazonTranslateClient object.</ param> /// <param name="request">The request object that includes details such /// as source and destination bucket names and the IAM Role that will /// be used to access the buckets.</param> /// <returns>The StartTextTranslationResponse object that includes the /// details of |
translate-dg-026 | translate-dg.pdf | 26 | "ExampleTranslationJob", DataAccessRoleArn = dataAccessRoleArn, InputDataConfig = inputConfig, OutputDataConfig = outputConfig, SourceLanguageCode = "en", TargetLanguageCodes = new List<string> { "fr" }, }; var response = await StartTextTranslationAsync(client, request); if (response.HttpStatusCode == System.Net.HttpStatusCode.OK) { Console.WriteLine($"{response.JobId}: {response.JobStatus}"); } } /// <summary> Actions 86 Amazon Translate Developer Guide /// Start the Amazon Translate text translation job. /// </summary> /// <param name="client">The initialized AmazonTranslateClient object.</ param> /// <param name="request">The request object that includes details such /// as source and destination bucket names and the IAM Role that will /// be used to access the buckets.</param> /// <returns>The StartTextTranslationResponse object that includes the /// details of the request response.</returns> public static async Task<StartTextTranslationJobResponse> StartTextTranslationAsync(AmazonTranslateClient client, StartTextTranslationJobRequest request) { var response = await client.StartTextTranslationJobAsync(request); return response; } } • For API details, see StartTextTranslationJob in AWS SDK for .NET API Reference. SAP ABAP SDK for SAP ABAP Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. "Starts an asynchronous batch translation job." "Use batch translation jobs to translate large volumes of text across multiple documents at once." DATA lo_inputdataconfig TYPE REF TO /aws1/cl_xl8inputdataconfig. DATA lo_outputdataconfig TYPE REF TO /aws1/cl_xl8outputdataconfig. DATA lt_targetlanguagecodes TYPE /aws1/ cl_xl8tgtlanguagecodes00=>tt_targetlanguagecodestrlist. DATA lo_targetlanguagecodes TYPE REF TO /aws1/cl_xl8tgtlanguagecodes00. Actions 87 Amazon Translate Developer Guide "Create an ABAP object for the input data config." lo_inputdataconfig = NEW #( iv_s3uri = iv_input_data_s3uri iv_contenttype = iv_input_data_contenttype ). "Create an ABAP object for the output data config." lo_outputdataconfig = NEW #( iv_s3uri = iv_output_data_s3uri ). "Create an internal table for target languages." lo_targetlanguagecodes = NEW #( iv_value = iv_targetlanguagecode ). INSERT lo_targetlanguagecodes INTO TABLE lt_targetlanguagecodes. TRY. oo_result = lo_xl8->starttexttranslationjob( "oo_result is returned for testing purposes." io_inputdataconfig = lo_inputdataconfig io_outputdataconfig = lo_outputdataconfig it_targetlanguagecodes = lt_targetlanguagecodes iv_dataaccessrolearn = iv_dataaccessrolearn iv_jobname = iv_jobname iv_sourcelanguagecode = iv_sourcelanguagecode ). MESSAGE 'Translation job started.' TYPE 'I'. CATCH /aws1/cx_xl8internalserverex. MESSAGE 'An internal server error occurred. Retry your request.' TYPE 'E'. CATCH /aws1/cx_xl8invparamvalueex. MESSAGE 'The value of the parameter is not valid.' TYPE 'E'. CATCH /aws1/cx_xl8invalidrequestex. MESSAGE 'The request that you made is not valid.' TYPE 'E'. CATCH /aws1/cx_xl8resourcenotfoundex. MESSAGE 'The resource you are looking for has not been found.' TYPE 'E'. CATCH /aws1/cx_xl8toomanyrequestsex. MESSAGE 'You have made too many requests within a short period of time.' TYPE 'E'. CATCH /aws1/cx_xl8unsuppedlanguage00. MESSAGE 'Amazon Translate does not support translation from the language of the source text into the requested target language.' TYPE 'E'. ENDTRY. • For API details, see StartTextTranslationJob in AWS SDK for SAP ABAP API reference. Actions 88 Amazon Translate Developer Guide For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Use StopTextTranslationJob with an AWS SDK The following code examples show how to use StopTextTranslationJob. .NET SDK for .NET Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. using System; using System.Threading.Tasks; using Amazon.Translate; using Amazon.Translate.Model; /// <summary> /// Shows how to stop a running Amazon Translation Service text translation /// job. /// </summary> public class StopTextTranslationJob { public static async Task Main() { var client = new AmazonTranslateClient(); var jobId = "1234567890abcdef01234567890abcde"; var request = new StopTextTranslationJobRequest { JobId = jobId, }; await StopTranslationJobAsync(client, request); } Actions 89 Amazon Translate Developer Guide /// <summary> /// Sends a request to stop a text translation job. /// </summary> /// <param name="client">Initialized AmazonTrnslateClient object.</param> /// <param name="request">The request object to be passed to the /// StopTextJobAsync method.</param> public static async Task StopTranslationJobAsync( AmazonTranslateClient client, StopTextTranslationJobRequest request) { var response = await client.StopTextTranslationJobAsync(request); if (response.HttpStatusCode == System.Net.HttpStatusCode.OK) { Console.WriteLine($"{response.JobId} as status: {response.JobStatus}"); } } } • For API details, see StopTextTranslationJob in AWS SDK for .NET API Reference. SAP ABAP SDK for SAP ABAP Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. "Stops an asynchronous batch translation job that is in progress." TRY. oo_result = lo_xl8->stoptexttranslationjob( "oo_result is returned for testing purposes." iv_jobid = iv_jobid ). MESSAGE 'Translation job stopped.' TYPE 'I'. CATCH /aws1/cx_xl8internalserverex. MESSAGE 'An internal server error occurred.' TYPE 'E'. Actions 90 Amazon Translate Developer Guide CATCH /aws1/cx_xl8resourcenotfoundex. MESSAGE 'The resource you are looking for has not been found.' TYPE 'E'. CATCH /aws1/cx_xl8toomanyrequestsex. MESSAGE 'You have made too many requests within a short period of time.' TYPE 'E'. ENDTRY. • For API details, see StopTextTranslationJob in AWS SDK for SAP ABAP API reference. For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Use TranslateText with an AWS SDK or CLI The following code |
translate-dg-027 | translate-dg.pdf | 27 | TYPE 'E'. Actions 90 Amazon Translate Developer Guide CATCH /aws1/cx_xl8resourcenotfoundex. MESSAGE 'The resource you are looking for has not been found.' TYPE 'E'. CATCH /aws1/cx_xl8toomanyrequestsex. MESSAGE 'You have made too many requests within a short period of time.' TYPE 'E'. ENDTRY. • For API details, see StopTextTranslationJob in AWS SDK for SAP ABAP API reference. For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Use TranslateText with an AWS SDK or CLI The following code examples show how to use TranslateText. .NET SDK for .NET Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. using System; using System.IO; using System.Threading.Tasks; using Amazon.S3; using Amazon.S3.Transfer; using Amazon.Translate; using Amazon.Translate.Model; /// <summary> /// Take text from a file stored a Amazon Simple Storage Service (Amazon S3) /// object and translate it using the Amazon Transfer Service. /// </summary> public class TranslateText Actions 91 Amazon Translate { Developer Guide public static async Task Main() { // If the region you want to use is different from the region // defined for the default user, supply it as a parameter to the // Amazon Translate client object constructor. var client = new AmazonTranslateClient(); // Set the source language to "auto" to request Amazon Translate to // automatically detect te language of the source text. // You can get a list of the languages supposed by Amazon Translate // in the Amazon Translate Developer's Guide here: // https://docs.aws.amazon.com/translate/latest/dg/what-is.html string srcLang = "en"; // English. string destLang = "fr"; // French. // The Amazon Simple Storage Service (Amazon S3) bucket where the // source text file is stored. string srcBucket = "amzn-s3-demo-bucket"; string srcTextFile = "source.txt"; var srcText = await GetSourceTextAsync(srcBucket, srcTextFile); var destText = await TranslatingTextAsync(client, srcLang, destLang, srcText); ShowText(srcText, destText); } /// <summary> /// Use the Amazon S3 TransferUtility to retrieve the text to translate /// from an object in an S3 bucket. /// </summary> /// <param name="srcBucket">The name of the S3 bucket where the /// text is stored. /// </param> /// <param name="srcTextFile">The key of the S3 object that /// contains the text to translate.</param> /// <returns>A string representing the source text.</returns> public static async Task<string> GetSourceTextAsync(string srcBucket, string srcTextFile) { string srcText = string.Empty; Actions 92 Amazon Translate Developer Guide var s3Client = new AmazonS3Client(); TransferUtility utility = new TransferUtility(s3Client); using var stream = await utility.OpenStreamAsync(srcBucket, srcTextFile); StreamReader file = new System.IO.StreamReader(stream); srcText = file.ReadToEnd(); return srcText; } /// <summary> /// Use the Amazon Translate Service to translate the document from the /// source language to the specified destination language. /// </summary> /// <param name="client">The Amazon Translate Service client used to /// perform the translation.</param> /// <param name="srcLang">The language of the source text.</param> /// <param name="destLang">The destination language for the translated /// text.</param> /// <param name="text">A string representing the text to ranslate.</ param> /// <returns>The text that has been translated to the destination /// language.</returns> public static async Task<string> TranslatingTextAsync(AmazonTranslateClient client, string srcLang, string destLang, string text) { var request = new TranslateTextRequest { SourceLanguageCode = srcLang, TargetLanguageCode = destLang, Text = text, }; var response = await client.TranslateTextAsync(request); return response.TranslatedText; } /// <summary> /// Show the original text followed by the translated text. /// </summary> Actions 93 Amazon Translate Developer Guide /// <param name="srcText">The original text to be translated.</param> /// <param name="destText">The translated text.</param> public static void ShowText(string srcText, string destText) { Console.WriteLine("Source text:"); Console.WriteLine(srcText); Console.WriteLine(); Console.WriteLine("Translated text:"); Console.WriteLine(destText); } } • For API details, see TranslateText in AWS SDK for .NET API Reference. PowerShell Tools for PowerShell Example 1: Converts the specified English text to French. The text to convert can also be passed as the -Text parameter. "Hello World" | ConvertTo-TRNTargetLanguage -SourceLanguageCode en - TargetLanguageCode fr • For API details, see TranslateText in AWS Tools for PowerShell Cmdlet Reference. SAP ABAP SDK for SAP ABAP Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. "Translates input text from the source language to the target language." TRY. Actions 94 Amazon Translate Developer Guide oo_result = lo_xl8->translatetext( "oo_result is returned for testing purposes." iv_text = iv_text iv_sourcelanguagecode = iv_sourcelanguagecode iv_targetlanguagecode = iv_targetlanguagecode ). MESSAGE 'Translation completed.' TYPE 'I'. CATCH /aws1/cx_xl8detectedlanguage00. MESSAGE 'The confidence that Amazon Comprehend accurately detected the source language is low.' TYPE 'E'. CATCH /aws1/cx_xl8internalserverex. MESSAGE 'An internal server error occurred.' TYPE 'E'. CATCH /aws1/cx_xl8invalidrequestex. MESSAGE 'The request that you made is not valid.' TYPE 'E'. CATCH /aws1/cx_xl8resourcenotfoundex. MESSAGE 'The resource you are looking for has not been found.' TYPE 'E'. CATCH /aws1/cx_xl8serviceunavailex. MESSAGE 'The Amazon Translate service is temporarily unavailable.' TYPE 'E'. CATCH /aws1/cx_xl8textsizelmtexcdex. MESSAGE |
translate-dg-028 | translate-dg.pdf | 28 | Actions 94 Amazon Translate Developer Guide oo_result = lo_xl8->translatetext( "oo_result is returned for testing purposes." iv_text = iv_text iv_sourcelanguagecode = iv_sourcelanguagecode iv_targetlanguagecode = iv_targetlanguagecode ). MESSAGE 'Translation completed.' TYPE 'I'. CATCH /aws1/cx_xl8detectedlanguage00. MESSAGE 'The confidence that Amazon Comprehend accurately detected the source language is low.' TYPE 'E'. CATCH /aws1/cx_xl8internalserverex. MESSAGE 'An internal server error occurred.' TYPE 'E'. CATCH /aws1/cx_xl8invalidrequestex. MESSAGE 'The request that you made is not valid.' TYPE 'E'. CATCH /aws1/cx_xl8resourcenotfoundex. MESSAGE 'The resource you are looking for has not been found.' TYPE 'E'. CATCH /aws1/cx_xl8serviceunavailex. MESSAGE 'The Amazon Translate service is temporarily unavailable.' TYPE 'E'. CATCH /aws1/cx_xl8textsizelmtexcdex. MESSAGE 'The size of the text you submitted exceeds the size limit. ' TYPE 'E'. CATCH /aws1/cx_xl8toomanyrequestsex. MESSAGE 'You have made too many requests within a short period of time.' TYPE 'E'. CATCH /aws1/cx_xl8unsuppedlanguage00. MESSAGE 'Amazon Translate does not support translation from the language of the source text into the requested target language. ' TYPE 'E'. ENDTRY. • For API details, see TranslateText in AWS SDK for SAP ABAP API reference. For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Scenarios for Amazon Translate using AWS SDKs The following code examples show you how to implement common scenarios in Amazon Translate with AWS SDKs. These scenarios show you how to accomplish specific tasks by calling multiple functions within Amazon Translate or combined with other AWS services. Each scenario includes Scenarios 95 Amazon Translate Developer Guide a link to the complete source code, where you can find instructions on how to set up and run the code. Scenarios target an intermediate level of experience to help you understand service actions in context. Examples • Build an Amazon Transcribe streaming app • Create an Amazon Lex chatbot to engage your website visitors • Build a publish and subscription application that translates messages • Create an application that analyzes customer feedback and synthesizes audio • Get started with Amazon Translate jobs using an AWS SDK Build an Amazon Transcribe streaming app The following code example shows how to build an app that records, transcribes, and translates live audio in real-time, and emails the results. JavaScript SDK for JavaScript (v3) Shows how to use Amazon Transcribe to build an app that records, transcribes, and translates live audio in real-time, and emails the results using Amazon Simple Email Service (Amazon SES). For complete source code and instructions on how to set up and run, see the full example on GitHub. Services used in this example • Amazon Comprehend • Amazon SES • Amazon Transcribe • Amazon Translate Build an Amazon Transcribe streaming app 96 Amazon Translate Developer Guide For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Create an Amazon Lex chatbot to engage your website visitors The following code examples show how to create a chatbot to engage your website visitors. Java SDK for Java 2.x Shows how to use the Amazon Lex API to create a Chatbot within a web application to engage your web site visitors. For complete source code and instructions on how to set up and run, see the full example on GitHub. Services used in this example • Amazon Comprehend • Amazon Lex • Amazon Translate JavaScript SDK for JavaScript (v3) Shows how to use the Amazon Lex API to create a Chatbot within a web application to engage your web site visitors. For complete source code and instructions on how to set up and run, see the full example Building an Amazon Lex chatbot in the AWS SDK for JavaScript developer guide. Services used in this example • Amazon Comprehend • Amazon Lex • Amazon Translate Building an Amazon Lex chatbot 97 Amazon Translate Developer Guide For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Build a publish and subscription application that translates messages The following code examples show how to create an application that has subscription and publish functionality and translates messages. .NET SDK for .NET Shows how to use the Amazon Simple Notification Service .NET API to create a web application that has subscription and publish functionality. In addition, this example application also translates messages. For complete source code and instructions on how to set up and run, see the full example on GitHub. Services used in this example • Amazon SNS • Amazon Translate Java SDK for Java 2.x Shows how to use the Amazon Simple Notification Service Java API to |
translate-dg-029 | translate-dg.pdf | 29 | The following code examples show how to create an application that has subscription and publish functionality and translates messages. .NET SDK for .NET Shows how to use the Amazon Simple Notification Service .NET API to create a web application that has subscription and publish functionality. In addition, this example application also translates messages. For complete source code and instructions on how to set up and run, see the full example on GitHub. Services used in this example • Amazon SNS • Amazon Translate Java SDK for Java 2.x Shows how to use the Amazon Simple Notification Service Java API to create a web application that has subscription and publish functionality. In addition, this example application also translates messages. For complete source code and instructions on how to set up and run, see the full example on GitHub. For complete source code and instructions on how to set up and run the example that uses the Java Async API, see the full example on GitHub. Services used in this example • Amazon SNS Building an Amazon SNS application 98 Amazon Translate • Amazon Translate Kotlin SDK for Kotlin Developer Guide Shows how to use the Amazon SNS Kotlin API to create an application that has subscription and publish functionality. In addition, this example application also translates messages. For complete source code and instructions on how to create a web app, see the full example on GitHub. For complete source code and instructions on how to create a native Android app, see the full example on GitHub. Services used in this example • Amazon SNS • Amazon Translate For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Create an application that analyzes customer feedback and synthesizes audio The following code examples show how to create an application that analyzes customer comment cards, translates them from their original language, determines their sentiment, and generates an audio file from the translated text. .NET SDK for .NET This example application analyzes and stores customer feedback cards. Specifically, it fulfills the need of a fictitious hotel in New York City. The hotel receives feedback from guests in various languages in the form of physical comment cards. That feedback is uploaded into the app through a web client. After an image of a comment card is uploaded, the following steps occur: Create an application to analyze customer feedback 99 Amazon Translate Developer Guide • Text is extracted from the image using Amazon Textract. • Amazon Comprehend determines the sentiment of the extracted text and its language. • The extracted text is translated to English using Amazon Translate. • Amazon Polly synthesizes an audio file from the extracted text. The full app can be deployed with the AWS CDK. For source code and deployment instructions, see the project in GitHub. Services used in this example • Amazon Comprehend • Lambda • Amazon Polly • Amazon Textract • Amazon Translate Java SDK for Java 2.x This example application analyzes and stores customer feedback cards. Specifically, it fulfills the need of a fictitious hotel in New York City. The hotel receives feedback from guests in various languages in the form of physical comment cards. That feedback is uploaded into the app through a web client. After an image of a comment card is uploaded, the following steps occur: • Text is extracted from the image using Amazon Textract. • Amazon Comprehend determines the sentiment of the extracted text and its language. • The extracted text is translated to English using Amazon Translate. • Amazon Polly synthesizes an audio file from the extracted text. The full app can be deployed with the AWS CDK. For source code and deployment instructions, see the project in GitHub. Services used in this example • Amazon Comprehend • Lambda Create an application to analyze customer feedback 100 Amazon Translate Developer Guide • Amazon Polly • Amazon Textract • Amazon Translate JavaScript SDK for JavaScript (v3) This example application analyzes and stores customer feedback cards. Specifically, it fulfills the need of a fictitious hotel in New York City. The hotel receives feedback from guests in various languages in the form of physical comment cards. That feedback is uploaded into the app through a web client. After an image of a comment card is uploaded, the following steps occur: • Text is extracted from the image using Amazon Textract. • Amazon Comprehend determines the sentiment of the extracted text and its language. • The extracted text is translated to English using Amazon Translate. • Amazon Polly synthesizes an audio file from the extracted text. The full app can be deployed with the AWS CDK. For source code and deployment instructions, see the |
translate-dg-030 | translate-dg.pdf | 30 | feedback from guests in various languages in the form of physical comment cards. That feedback is uploaded into the app through a web client. After an image of a comment card is uploaded, the following steps occur: • Text is extracted from the image using Amazon Textract. • Amazon Comprehend determines the sentiment of the extracted text and its language. • The extracted text is translated to English using Amazon Translate. • Amazon Polly synthesizes an audio file from the extracted text. The full app can be deployed with the AWS CDK. For source code and deployment instructions, see the project in GitHub. The following excerpts show how the AWS SDK for JavaScript is used inside of Lambda functions. import { ComprehendClient, DetectDominantLanguageCommand, DetectSentimentCommand, } from "@aws-sdk/client-comprehend"; /** * Determine the language and sentiment of the extracted text. * * @param {{ source_text: string}} extractTextOutput */ export const handler = async (extractTextOutput) => { const comprehendClient = new ComprehendClient({}); const detectDominantLanguageCommand = new DetectDominantLanguageCommand({ Text: extractTextOutput.source_text, }); Create an application to analyze customer feedback 101 Amazon Translate Developer Guide // The source language is required for sentiment analysis and // translation in the next step. const { Languages } = await comprehendClient.send( detectDominantLanguageCommand, ); const languageCode = Languages[0].LanguageCode; const detectSentimentCommand = new DetectSentimentCommand({ Text: extractTextOutput.source_text, LanguageCode: languageCode, }); const { Sentiment } = await comprehendClient.send(detectSentimentCommand); return { sentiment: Sentiment, language_code: languageCode, }; }; import { DetectDocumentTextCommand, TextractClient, } from "@aws-sdk/client-textract"; /** * Fetch the S3 object from the event and analyze it using Amazon Textract. * * @param {import("@types/aws-lambda").EventBridgeEvent<"Object Created">} eventBridgeS3Event */ export const handler = async (eventBridgeS3Event) => { const textractClient = new TextractClient(); const detectDocumentTextCommand = new DetectDocumentTextCommand({ Document: { S3Object: { Bucket: eventBridgeS3Event.bucket, Name: eventBridgeS3Event.object, }, }, Create an application to analyze customer feedback 102 Amazon Translate }); Developer Guide // Textract returns a list of blocks. A block can be a line, a page, word, etc. // Each block also contains geometry of the detected text. // For more information on the Block type, see https://docs.aws.amazon.com/ textract/latest/dg/API_Block.html. const { Blocks } = await textractClient.send(detectDocumentTextCommand); // For the purpose of this example, we are only interested in words. const extractedWords = Blocks.filter((b) => b.BlockType === "WORD").map( (b) => b.Text, ); return extractedWords.join(" "); }; import { PollyClient, SynthesizeSpeechCommand } from "@aws-sdk/client-polly"; import { S3Client } from "@aws-sdk/client-s3"; import { Upload } from "@aws-sdk/lib-storage"; /** * Synthesize an audio file from text. * * @param {{ bucket: string, translated_text: string, object: string}} sourceDestinationConfig */ export const handler = async (sourceDestinationConfig) => { const pollyClient = new PollyClient({}); const synthesizeSpeechCommand = new SynthesizeSpeechCommand({ Engine: "neural", Text: sourceDestinationConfig.translated_text, VoiceId: "Ruth", OutputFormat: "mp3", }); const { AudioStream } = await pollyClient.send(synthesizeSpeechCommand); const audioKey = `${sourceDestinationConfig.object}.mp3`; // Store the audio file in S3. const s3Client = new S3Client(); const upload = new Upload({ Create an application to analyze customer feedback 103 Amazon Translate Developer Guide client: s3Client, params: { Bucket: sourceDestinationConfig.bucket, Key: audioKey, Body: AudioStream, ContentType: "audio/mp3", }, }); await upload.done(); return audioKey; }; import { TranslateClient, TranslateTextCommand, } from "@aws-sdk/client-translate"; /** * Translate the extracted text to English. * * @param {{ extracted_text: string, source_language_code: string}} textAndSourceLanguage */ export const handler = async (textAndSourceLanguage) => { const translateClient = new TranslateClient({}); const translateCommand = new TranslateTextCommand({ SourceLanguageCode: textAndSourceLanguage.source_language_code, TargetLanguageCode: "en", Text: textAndSourceLanguage.extracted_text, }); const { TranslatedText } = await translateClient.send(translateCommand); return { translated_text: TranslatedText }; }; Services used in this example • Amazon Comprehend • Lambda Create an application to analyze customer feedback 104 Amazon Translate Developer Guide • Amazon Polly • Amazon Textract • Amazon Translate Ruby SDK for Ruby This example application analyzes and stores customer feedback cards. Specifically, it fulfills the need of a fictitious hotel in New York City. The hotel receives feedback from guests in various languages in the form of physical comment cards. That feedback is uploaded into the app through a web client. After an image of a comment card is uploaded, the following steps occur: • Text is extracted from the image using Amazon Textract. • Amazon Comprehend determines the sentiment of the extracted text and its language. • The extracted text is translated to English using Amazon Translate. • Amazon Polly synthesizes an audio file from the extracted text. The full app can be deployed with the AWS CDK. For source code and deployment instructions, see the project in GitHub. Services used in this example • Amazon Comprehend • Lambda • Amazon Polly • Amazon Textract • Amazon Translate For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Get started with Amazon Translate jobs using an AWS SDK The following code example shows how to: Get started |
translate-dg-031 | translate-dg.pdf | 31 | an audio file from the extracted text. The full app can be deployed with the AWS CDK. For source code and deployment instructions, see the project in GitHub. Services used in this example • Amazon Comprehend • Lambda • Amazon Polly • Amazon Textract • Amazon Translate For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Get started with Amazon Translate jobs using an AWS SDK The following code example shows how to: Get started with translate jobs 105 Amazon Translate Developer Guide • Start an asynchronous batch translation job. • Wait for the asynchronous job to complete. • Describe the asynchronous job. SAP ABAP SDK for SAP ABAP Note There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository. DATA lo_inputdataconfig TYPE REF TO /aws1/cl_xl8inputdataconfig. DATA lo_outputdataconfig TYPE REF TO /aws1/cl_xl8outputdataconfig. DATA lt_targetlanguagecodes TYPE /aws1/ cl_xl8tgtlanguagecodes00=>tt_targetlanguagecodestrlist. DATA lo_targetlanguagecodes TYPE REF TO /aws1/cl_xl8tgtlanguagecodes00. "Create an ABAP object for the input data config." lo_inputdataconfig = NEW #( iv_s3uri = iv_input_data_s3uri iv_contenttype = iv_input_data_contenttype ). "Create an ABAP object for the output data config." lo_outputdataconfig = NEW #( iv_s3uri = iv_output_data_s3uri ). "Create an internal table for target languages." lo_targetlanguagecodes = NEW #( iv_value = iv_targetlanguagecode ). INSERT lo_targetlanguagecodes INTO TABLE lt_targetlanguagecodes. TRY. DATA(lo_translationjob_result) = lo_xl8->starttexttranslationjob( io_inputdataconfig = lo_inputdataconfig io_outputdataconfig = lo_outputdataconfig it_targetlanguagecodes = lt_targetlanguagecodes iv_dataaccessrolearn = iv_dataaccessrolearn iv_jobname = iv_jobname iv_sourcelanguagecode = iv_sourcelanguagecode ). MESSAGE 'Translation job started.' TYPE 'I'. Get started with translate jobs 106 Amazon Translate Developer Guide CATCH /aws1/cx_xl8internalserverex. MESSAGE 'An internal server error occurred. Retry your request.' TYPE 'E'. CATCH /aws1/cx_xl8invparamvalueex. MESSAGE 'The value of the parameter is not valid.' TYPE 'E'. CATCH /aws1/cx_xl8invalidrequestex. MESSAGE 'The request that you made is not valid.' TYPE 'E'. CATCH /aws1/cx_xl8resourcenotfoundex. MESSAGE 'The resource you are looking for has not been found.' TYPE 'E'. CATCH /aws1/cx_xl8toomanyrequestsex. MESSAGE 'You have made too many requests within a short period of time. ' TYPE 'E'. CATCH /aws1/cx_xl8unsuppedlanguage00. MESSAGE 'Amazon Translate does not support translation from the language of the source text into the requested target language.' TYPE 'E'. ENDTRY. "Get the job ID." DATA(lv_jobid) = lo_translationjob_result->get_jobid( ). "Wait for translate job to complete." DATA(lo_des_translation_result) = lo_xl8- >describetexttranslationjob( iv_jobid = lv_jobid ). WHILE lo_des_translation_result->get_textxlationjobproperties( )- >get_jobstatus( ) <> 'COMPLETED'. IF sy-index = 30. EXIT. "Maximum 900 seconds." ENDIF. WAIT UP TO 30 SECONDS. lo_des_translation_result = lo_xl8->describetexttranslationjob( iv_jobid = lv_jobid ). ENDWHILE. TRY. oo_result = lo_xl8->describetexttranslationjob( "oo_result is returned for testing purposes." iv_jobid = lv_jobid ). MESSAGE 'Job description retrieved.' TYPE 'I'. CATCH /aws1/cx_xl8internalserverex. MESSAGE 'An internal server error occurred. Retry your request.' TYPE 'E'. CATCH /aws1/cx_xl8resourcenotfoundex. MESSAGE 'The resource you are looking for has not been found.' TYPE 'E'. CATCH /aws1/cx_xl8toomanyrequestsex. Get started with translate jobs 107 Amazon Translate Developer Guide MESSAGE 'You have made too many requests within a short period of time.' TYPE 'E'. ENDTRY. • For API details, see the following topics in AWS SDK for SAP ABAP API reference. • DescribeTextTranslationJob • StartTextTranslationJob For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions. Get started with translate jobs 108 Amazon Translate Developer Guide 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 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 |
translate-dg-032 | translate-dg.pdf | 32 | 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 • Viewing, updating, and deleting tags associated with a resource 109 Amazon Translate Developer Guide 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. 2. Sign in to the Amazon Translate console. From the left navigation pane, select the resource (Parallel data or Custom terminology) that you want to create. 3. 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. 4. Choose Add new tag to add a tag for the resource. Enter a tag key and, optionally, a tag value. 5. Repeat step 4 until you have added all your tags. Each key must be unique for this resource. Tagging a new resource 110 Amazon Translate Developer Guide 6. Choose Create parallel data or Create terminology to create the resource. You can also add tags using the Amazon Translate CreateParallelData 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\"}]" 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. 2. 3. 4. Sign in to the Amazon Translate console. From the left navigation pane, select Parallel data or Custom terminology. Select the resource that contains the tags you want to view, update, or delete. The console opens the details page for the resource. Scroll down until you see the Tags panel. Here, you can see all the tags associated with your selected resource. Viewing, editing, and deleting tags 111 Amazon Translate Developer Guide Select Manage tags to edit or remove tags from your resource. 5. Choose the text you want to modify, then edit your tag. You can also remove the tag by selecting Remove. 6. To add a new tag, select Add new tag, then enter the key and value in the blank fields. 7. When you're finished modifying your tags, select Save. Viewing, editing, and deleting tags 112 Amazon Translate Developer Guide 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 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. To learn about the compliance programs that apply to Amazon Translate, see AWS Services in Scope by Compliance Program. • 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 • Identity and Access Management for Amazon Translate • Monitoring Amazon Translate • Compliance validation for Amazon Translate • Resilience in Amazon Translate • Infrastructure security in Amazon Translate • Amazon Translate and interface VPC endpoints (AWS PrivateLink) 113 Amazon Translate Developer |
translate-dg-033 | translate-dg.pdf | 33 | 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 • Identity and Access Management for Amazon Translate • Monitoring Amazon Translate • Compliance validation for Amazon Translate • Resilience in Amazon Translate • Infrastructure security in Amazon Translate • Amazon Translate and interface VPC endpoints (AWS PrivateLink) 113 Amazon Translate Developer Guide Data protection in Amazon Translate Amazon Translate conforms to the AWS 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 roles 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 blog post on the AWS Security Blog. Topics • Encryption at rest • Encryption in transit Data protection 114 Amazon Translate Encryption at rest Developer Guide 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) 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) in the Amazon Simple Storage Service User Guide. For more information about KMS keys, see AWS 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. Encryption at rest 115 Amazon Translate Developer Guide 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 |
translate-dg-034 | translate-dg.pdf | 34 | 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. Encryption at rest 115 Amazon Translate Developer Guide 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. 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. Encryption in transit To encrypt data in transit, Amazon Translate uses TLS 1.2 with AWS certificates. 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 • Authenticating with identities • Managing access using policies • How Amazon Translate works with IAM • Identity-based policy examples for Amazon Translate • AWS managed policies for Amazon Translate • Troubleshooting Amazon Translate identity and access 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 Encryption in transit 116 Amazon Translate Developer Guide 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. 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. 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 Identity-based policy examples for Amazon Translate. 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 (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 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 by 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 AWS Signature Version 4 for API requests in the IAM User Guide. 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 Authenticating with identities 117 Amazon Translate Developer Guide (MFA) to increase the security of your account. To learn more, see Multi-factor authentication in the AWS IAM Identity Center User Guide and AWS Multi-factor authentication in IAM in the IAM User Guide. AWS account root user When you create an AWS |
translate-dg-035 | translate-dg.pdf | 35 | more information about using the recommended method to sign requests yourself, see AWS Signature Version 4 for API requests in the IAM User Guide. 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 Authenticating with identities 117 Amazon Translate Developer Guide (MFA) to increase the security of your account. To learn more, see Multi-factor authentication in the AWS IAM Identity Center User Guide and AWS Multi-factor authentication in IAM 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 in the IAM User Guide. Federated identity As a best practice, require human users, including users that require administrator access, to use federation with an identity provider to access AWS services by using temporary credentials. A federated identity is a user from your enterprise user directory, a web identity provider, the AWS Directory Service, the Identity Center directory, or any user that accesses AWS services by using credentials provided through an identity source. When federated identities access AWS accounts, they assume roles, and the roles provide temporary credentials. For centralized access management, we recommend that you use AWS IAM Identity Center. You can create users and groups in IAM Identity Center, or you can connect and synchronize to a set of users and groups in your own identity source for use across all your AWS accounts and applications. For information about IAM Identity Center, see What is IAM Identity Center? in the AWS IAM Identity Center User Guide. IAM users and groups An IAM user 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 in the IAM User Guide. Authenticating with identities 118 Amazon Translate Developer Guide An IAM group 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 Use cases for IAM users in the IAM User Guide. IAM roles An IAM role 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. To temporarily assume an IAM role in the AWS Management Console, you can switch from a user to an IAM role (console). 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 Methods to assume a role 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 Create a role for a third-party identity provider (federation) 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 in the AWS IAM Identity Center User Guide. • Temporary IAM user permissions – An IAM user |
translate-dg-036 | translate-dg.pdf | 36 | 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 Create a role for a third-party identity provider (federation) 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 in the AWS IAM Identity Center 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 Cross account resource access in IAM 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 Authenticating with identities 119 Amazon Translate Developer Guide 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. • Forward access sessions (FAS) – When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. • Service role – A service role is an IAM role 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 Create a role to delegate permissions to an AWS service 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 AWS 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 Use an IAM role to grant permissions to applications running on Amazon EC2 instances 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 in the IAM User Guide. Managing access using policies 120 Amazon Translate Developer 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. By default, users and roles have no permissions. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. IAM policies define permissions for an action regardless of the method that you use to perform the |
translate-dg-037 | translate-dg.pdf | 37 | IAM User Guide. Managing access using policies 120 Amazon Translate Developer 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. By default, users and roles have no permissions. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. 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 Define custom IAM permissions with customer managed policies 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 Choose between managed policies and inline policies 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 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. Managing access using policies 121 Amazon Translate Access control lists (ACLs) Developer Guide 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 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 an 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 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 Service control policies in the AWS Organizations User Guide. • Resource control policies (RCPs) – RCPs are JSON policies that you can use to set the maximum available permissions for resources in your accounts without updating the IAM policies attached to each resource that you own. The RCP limits permissions for resources in member accounts and can impact the effective permissions for identities, including the AWS account root user, regardless of whether they belong to your organization. For more information about Organizations and RCPs, including a list of AWS services that support RCPs, see Resource control policies (RCPs) in the AWS Organizations User Guide. • Session policies – Session policies |
translate-dg-038 | translate-dg.pdf | 38 | Resource control policies (RCPs) – RCPs are JSON policies that you can use to set the maximum available permissions for resources in your accounts without updating the IAM policies attached to each resource that you own. The RCP limits permissions for resources in member accounts and can impact the effective permissions for identities, including the AWS account root user, regardless of whether they belong to your organization. For more information about Organizations and RCPs, including a list of AWS services that support RCPs, see Resource control policies (RCPs) 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 Managing access using policies 122 Amazon Translate Developer Guide 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 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 in the IAM User Guide. How Amazon Translate works with IAM Before you use IAM to manage access to Amazon Translate, learn what IAM features are available to use with Amazon Translate. IAM features you can use with Amazon Translate IAM feature Amazon Translate support Identity-based policies Resource-based policies Policy actions Policy resources Policy condition keys (service-specific) ACLs Yes No Yes Yes Yes No ABAC (tags in policies) Partial Temporary credentials Forward access sessions (FAS) Service roles Service-linked roles Yes Yes Yes No How Amazon Translate works with IAM 123 Amazon Translate Developer Guide To get a high-level view of how Amazon Translate and other AWS services work with most IAM features, see AWS services that work with IAM in the IAM User Guide. Identity-based policies for Amazon Translate Supports identity-based policies: Yes 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 Define custom IAM permissions with customer managed policies in the IAM User Guide. 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. You can't specify the principal in an identity-based policy because it applies to the user or role to which it is attached. To learn about all of the elements that you can use in a JSON policy, see IAM JSON policy elements reference in the IAM User Guide. Identity-based policy examples for Amazon Translate To view examples of Amazon Translate identity-based policies, see Identity-based policy examples for Amazon Translate. Resource-based policies within Amazon Translate Supports resource-based policies: No 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 in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. Adding a cross-account principal to a resource- based policy is only half of establishing the trust relationship. When the principal and the resource How Amazon Translate works with IAM 124 Amazon Translate Developer Guide are in different AWS accounts, an IAM administrator in the trusted account must also grant the principal entity (user or role) permission to access the resource. They grant permission by attaching an identity-based policy to the entity. However, if a resource-based policy grants access to a principal in the same account, no additional identity-based policy is required. For more information, see Cross account resource access in IAM in the IAM User Guide. Policy actions for Amazon Translate Supports policy actions: Yes 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 |
translate-dg-039 | translate-dg.pdf | 39 | entity. However, if a resource-based policy grants access to a principal in the same account, no additional identity-based policy is required. For more information, see Cross account resource access in IAM in the IAM User Guide. Policy actions for Amazon Translate Supports policy actions: Yes 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. To see a list of Amazon Translate actions, see Actions Defined by Amazon Translate in the Service Authorization Reference. Policy actions in Amazon Translate use the following prefix before the action: translate To specify multiple actions in a single statement, separate them with commas. "Action": [ "translate:ListLanguages", "translate:TranslateText" ] You can specify multiple actions using wildcards (*). For example, to specify all actions that begin with the word List, include the following action: How Amazon Translate works with IAM 125 Amazon Translate Developer Guide "Action": "translate:List*" Don't use wildcards to specify all of the actions for a service. Use the best practice of granting least privilege when you specify the permissions in a policy. To view examples of Amazon Translate identity-based policies, see Identity-based policy examples for Amazon Translate. Policy resources for Amazon Translate Supports policy resources: Yes 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 Resource JSON policy element specifies the object or objects to which the action applies. Statements must include either a Resource or a NotResource element. As a best practice, specify a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific resource type, known as resource-level permissions. For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources. "Resource": "*" To see a list of Amazon Translate resource types and their ARNs, see Resources Defined by Amazon Translate in the Service Authorization Reference. To learn with which actions you can specify the ARN of each resource, see Actions Defined by Amazon Translate. For examples of how to use resources in Amazon Translate policies, see Specify resources in a policy. Policy condition keys for Amazon Translate Supports service-specific policy condition keys: Yes 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. How Amazon Translate works with IAM 126 Amazon Translate Developer Guide 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, 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 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 in the IAM User Guide. To see a list of Amazon Translate condition keys, see Condition Keys for Amazon Translate in the Service Authorization Reference. To learn with which actions and resources you can use a condition key, see Actions Defined by Amazon Translate. To view examples of Amazon Translate identity-based policies, see Identity-based policy examples for Amazon Translate. ACLs in Amazon Translate Supports ACLs: No 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. ABAC with Amazon Translate Supports ABAC (tags in policies): Partial Attribute-based access control (ABAC) is an |
translate-dg-040 | translate-dg.pdf | 40 | Keys for Amazon Translate in the Service Authorization Reference. To learn with which actions and resources you can use a condition key, see Actions Defined by Amazon Translate. To view examples of Amazon Translate identity-based policies, see Identity-based policy examples for Amazon Translate. ACLs in Amazon Translate Supports ACLs: No 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. ABAC with Amazon Translate Supports ABAC (tags in policies): Partial Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes. In AWS, these attributes are called tags. You can attach tags to IAM entities (users or roles) and to many AWS resources. Tagging entities and resources is the first step of ABAC. Then How Amazon Translate works with IAM 127 Amazon Translate Developer Guide you design ABAC policies to allow operations when the principal's tag matches the tag on the resource that they are trying to access. ABAC is helpful in environments that are growing rapidly and helps with situations where policy management becomes cumbersome. To control access based on tags, you provide tag information in the condition element of a policy using the aws:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys. If a service supports all three condition keys for every resource type, then the value is Yes for the service. If a service supports all three condition keys for only some resource types, then the value is Partial. For more information about ABAC, see Define permissions with ABAC authorization in the IAM User Guide. To view a tutorial with steps for setting up ABAC, see Use attribute-based access control (ABAC) in the IAM User Guide. For more information about tagging Amazon Translate resources, see Tagging your resources. Using temporary credentials with Amazon Translate Supports temporary credentials: Yes Some AWS services don't work when you sign in using temporary credentials. For additional information, including which AWS services work with temporary credentials, see AWS services that work with IAM in the IAM User Guide. You are using temporary credentials if you sign in to the AWS Management Console using any method except a user name and password. For example, when you access AWS using your company's single sign-on (SSO) link, that process automatically creates temporary credentials. You also automatically create temporary credentials when you sign in to the console as a user and then switch roles. For more information about switching roles, see Switch from a user to an IAM role (console) in the IAM User Guide. You can manually create temporary credentials using the AWS CLI or AWS API. You can then use those temporary credentials to access AWS. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see Temporary security credentials in IAM. How Amazon Translate works with IAM 128 Amazon Translate Developer Guide Forward access sessions for Amazon Translate Supports forward access sessions (FAS): Yes When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. Service roles for Amazon Translate Supports service roles: Yes A service role is an IAM role 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 Create a role to delegate permissions to an AWS service in the IAM User Guide. Warning Changing the permissions for a service role might break Amazon Translate functionality. Edit service roles only when Amazon Translate provides guidance to do so. To use the Amazon Translate asynchronous operations, you must grant Amazon Translate access to the Amazon S3 bucket that contains your input documents. You do this by creating a service role in your account with a trust policy to trust the Amazon Translate service principal. For a policy example, see Prerequisites for batch translation jobs. Service-linked roles for Amazon Translate Supports service-linked roles: No 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 AWS account and are owned by the service. An IAM administrator can |
translate-dg-041 | translate-dg.pdf | 41 | Amazon Translate access to the Amazon S3 bucket that contains your input documents. You do this by creating a service role in your account with a trust policy to trust the Amazon Translate service principal. For a policy example, see Prerequisites for batch translation jobs. Service-linked roles for Amazon Translate Supports service-linked roles: No 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 AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. How Amazon Translate works with IAM 129 Amazon Translate Developer Guide For details about creating or managing service-linked roles, see AWS services that work with IAM. Find a service in the table that includes a Yes in the Service-linked role column. Choose the Yes link to view the service-linked role documentation for that service. Identity-based policy examples for Amazon Translate By default, 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 permission to perform specific API operations on the specific resources that they need. The administrator must then attach those policies to the users or roles 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 in the IAM User Guide. Topics • Identity-based policy best practices • Allow access to the Amazon Translate console • Allow users to view their own permissions • Specify resources in a policy • Permissions for using customer managed keys with custom terminologies 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 or AWS managed policies for job functions 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 Identity-based policy examples 130 Amazon Translate Developer Guide information about using IAM to apply permissions, see Policies and permissions in IAM 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 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 Validate policies with IAM Access Analyzer in the IAM User Guide. • Require multi-factor authentication (MFA) – If you have a scenario that requires IAM users or a root user in your AWS 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 Secure API access with MFA in the IAM User Guide. For more information about best practices in IAM, see Security best practices in IAM in the IAM User Guide. Allow access to 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 (users, groups or roles) with that policy. |
translate-dg-042 | translate-dg.pdf | 42 | see Secure API access with MFA in the IAM User Guide. For more information about best practices in IAM, see Security best practices in IAM in the IAM User Guide. Allow access to 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 (users, groups or roles) with that policy. For Amazon Translate console permissions, you can attach the TranslateFullAccess AWS managed policy to the entities. For more information, see AWS managed policies for Amazon Translate. You also need permissions for the actions shown in the following policy. These permissions are included in the TranslateFullAccess policy. { "Version": "2012-10-17", Identity-based policy examples 131 Amazon Translate Developer Guide "Statement": [ { "Effect": "Allow", "Action": [ "iam:ListRoles", "iam:GetRole", "s3:ListAllMyBuckets", "s3:ListBucket", "s3:GetBucketLocation" ], "Resource": "*" } ] } 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 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}"] }, { Identity-based policy examples 132 Amazon Translate Developer Guide "Sid": "NavigateInConsole", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ] } Specify resources in a policy For many Amazon Translate API actions, you can restrict the scope of a policy by specifying resources that are allowed (or not allowed) for the action. For a list of the actions that can specify resources, see Actions Defined by Amazon Translate. You can specify the following resources in a policy: • Custom terminology – Use the following ARN format: arn:partition:translate:region:account:terminology/terminology-name/ LATEST • Parallel data – Use the following ARN format: arn:partition:translate:region:account:parallel-data/parallel-data-name You can use the wildcard character to specify multiple resources in the policy. The following example policy allows all custom terminology resources for all Amazon Translate actions. Example { "Sid": "Example1", "Effect": "Allow", "Action": "translate:*", Identity-based policy examples 133 Amazon Translate "Resource": [ "arn:aws:translate:us-west-2:123456789012:terminology/*" ] } Developer Guide The following example policy denies access to a specific parallel data resource for the GetParallelData action. Example { "Sid": "Example2", "Effect": "Deny", "Action": "translate:GetParallelData", "Resource": [ "arn:aws:translate:us-west-2:123456789012:parallel-data/test-parallel- data" ] } 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", Identity-based policy examples 134 Amazon Translate Developer Guide "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", Identity-based policy examples 135 Amazon Translate "Statement": [ { "Sid": "Allow access for use with Amazon Translate", "Effect": "Allow", "Principal": { "AWS": "IAM USER OR ROLE ARN" Developer Guide }, "Action": [ "kms:CreateGrant", "kms:Decrypt", "kms:DescribeKey", "kms:GenerateDataKey", "kms:GetKeyPolicy", "kms:PutKeyPolicy", "kms:RetireGrant" ], "Resource": "*" } ] } For details about the Amazon Translate operations and resources, see Actions, resources, and condition keys for Amazon Translate in the Service Authorization Reference. AWS managed policies for Amazon Translate An AWS managed policy is a standalone policy that is created and administered by |
translate-dg-043 | translate-dg.pdf | 43 | following permissions in the KMS key policy. { "Id": "key-consolepolicy-3", "Version": "2012-10-17", Identity-based policy examples 135 Amazon Translate "Statement": [ { "Sid": "Allow access for use with Amazon Translate", "Effect": "Allow", "Principal": { "AWS": "IAM USER OR ROLE ARN" Developer Guide }, "Action": [ "kms:CreateGrant", "kms:Decrypt", "kms:DescribeKey", "kms:GenerateDataKey", "kms:GetKeyPolicy", "kms:PutKeyPolicy", "kms:RetireGrant" ], "Resource": "*" } ] } For details about the Amazon Translate operations and resources, see Actions, resources, and condition keys for Amazon Translate in the Service Authorization Reference. AWS managed policies for Amazon Translate An AWS managed policy is a standalone policy that is created and administered by AWS. AWS managed policies are designed to provide permissions for many common use cases so that you can start assigning permissions to users, groups, and roles. Keep in mind that AWS managed policies might not grant least-privilege permissions for your specific use cases because they're available for all AWS customers to use. We recommend that you reduce permissions further by defining customer managed policies that are specific to your use cases. You cannot change the permissions defined in AWS managed policies. If AWS updates the permissions defined in an AWS managed policy, the update affects all principal identities (users, groups, and roles) that the policy is attached to. AWS is most likely to update an AWS managed policy when a new AWS service is launched or new API operations become available for existing services. For more information, see AWS managed policies in the IAM User Guide. AWS managed policies 136 Amazon Translate Topics • AWS managed policy: TranslateFullAccess • AWS managed policy: TranslateReadOnly • Amazon Translate updates to AWS managed policies AWS managed policy: TranslateFullAccess Developer Guide This policy grants full access to Amazon Translate resources, the Amazon Comprehend DetectDominantLanguage API operation, and required CloudWatch API operations. The policy also grants list and get permissions for Amazon S3 buckets and IAM roles. { "Version": "2012-10-17", "Statement": [ { "Action": [ "translate:*", "comprehend:DetectDominantLanguage", "cloudwatch:GetMetricStatistics", "cloudwatch:ListMetrics", "s3:ListAllMyBuckets", "s3:ListBucket", "s3:GetBucketLocation", "iam:ListRoles", "iam:GetRole" ], "Effect": "Allow", "Resource": "*" } ] } AWS managed policy: TranslateReadOnly This policy grants permission to access the Amazon Translate API operations that do not modify resources associated with your account. The policy also grants permission to access the Amazon Comprehend DetectDominantLanguage API operation and required CloudWatch API operations. { AWS managed policies 137 Amazon Translate Developer Guide "Version": "2012-10-17", "Statement": [ { "Action": [ "translate:TranslateText", "translate:TranslateDocument", "translate:GetTerminology", "translate:ListTerminologies", "translate:ListTextTranslationJobs", "translate:DescribeTextTranslationJob", "translate:GetParallelData", "translate:ListParallelData", "comprehend:DetectDominantLanguage", "cloudwatch:GetMetricStatistics", "cloudwatch:ListMetrics" ], "Effect": "Allow", "Resource": "*" } ] } Amazon Translate updates to AWS managed policies View details about updates to AWS managed policies for Amazon Translate since this service began tracking these changes. For automatic alerts about changes to this page, subscribe to the RSS feed on the Amazon Translate Document history page. Change Description Date TranslateReadOnly – Update to an existing policy Amazon Translate now allows May 23, 2023 the TranslateDocument action in the Translate ReadOnly policy Amazon Translate started tracking changes Amazon Translate started tracking changes for its AWS May 23, 2023 managed policies. AWS managed policies 138 Amazon Translate Developer Guide 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 IAM. Topics • I am not authorized to perform an action in Amazon Translate • I am not authorized to perform iam:PassRole • I want to allow people outside of my AWS account to access my Amazon Translate resources I am not authorized to perform an action in Amazon Translate If you receive an error that you're not authorized to perform an action, your policies must be updated to allow you to perform the action. The following example error occurs when the mateojackson IAM user tries to use the console to view details about a fictional my-example-widget resource but does not have the fictional translate:GetWidget permissions. User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: translate:GetWidget on resource: my-example-widget In this case, Mateo's policy must be updated to allow him to access the my-example-widget resource using the translate:GetWidget action. If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. 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 Troubleshooting |
translate-dg-044 | translate-dg.pdf | 44 | 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 Troubleshooting 139 Amazon Translate Developer Guide 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 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. • 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 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 in the IAM User Guide. • To learn how to provide access through identity federation, see Providing access to externally authenticated users (identity federation) in the IAM User Guide. • To learn the difference between using roles and resource-based policies for cross-account access, see Cross account resource access in IAM in the IAM User Guide. 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. Monitoring 140 Amazon Translate Developer Guide 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 in the Amazon CloudWatch User Guide. The following table describes each of the preconfigured graphs provided by Amazon Translate. Graph Description Successful request count The number of successful requests made to Amazon Translate during the specified time period. Throttled request count The 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. Monitoring 141 Amazon Translate Graph Developer Guide Description Average response time The average length of time that it took Amazon Translate to process your request during the specified time period. Character count The 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. User error count The number of user errors that occurred during the specified time period. User errors are in the HTTP error code range 400-499. Monitoring 142 Amazon Translate Graph Developer Guide Description System error count The 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 |
translate-dg-045 | translate-dg.pdf | 45 | HTTP error code range 400-499. Monitoring 142 Amazon Translate Graph Developer Guide Description System error count The 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. Monitoring with CloudWatch 143 Amazon Translate Developer Guide 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 Successfu lRequestCount metric Know if my application has reached its maximum throughput The sum statistic of the ThrottledCount metric Find the response time for my application Find the number of errors for my application Find the number of billable characters The average statistic of the ResponseTime metric The sum statistic of the ServerErrorCount and UserErrorCount metrics 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 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/. 2. Choose Metrics, choose All Metrics, and then choose AWS/Translate. 3. Choose the dimension, choose a metric name, and choose Add to graph. Monitoring with CloudWatch 144 Amazon Translate Developer Guide 4. Choose a value for the date range. The metric count for the specified date range is displayed in the graph. 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 entity 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. Topics • Amazon Translate information in CloudTrail • Understanding Amazon Translate log file 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. 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 • CloudTrail Supported services and integrations Logging Amazon |
translate-dg-046 | translate-dg.pdf | 46 | 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 • CloudTrail Supported services and integrations Logging Amazon Translate API calls with AWS CloudTrail 145 Amazon Translate Developer Guide • Configuring Amazon SNS notifications for CloudTrail • Receiving CloudTrail log files from multiple tegions and Receiving CloudTrail log files from multiple accounts All Amazon Translate actions are logged by CloudTrail and are documented in the API reference section. 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 the root 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. 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", Logging Amazon Translate API calls with AWS CloudTrail 146 Amazon Translate Developer Guide "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" } 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 CloudWatch metrics and dimensions for Amazon Translate 147 Amazon Translate Developer Guide Metric Description 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 SuccessfulRequestC ount 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 Throttled Count 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 in the Amazon Web Services General Reference. Valid dimension: Operation Valid statistics: Average, Sum Unit: Count CloudWatch metrics and dimensions for Amazon Translate 148 Amazon Translate Developer Guide Metric Description 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. 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 |
translate-dg-047 | translate-dg.pdf | 47 | 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 Monitoring with EventBridge 149 Amazon Translate Developer Guide For more information, see Creating Amazon EventBridge rules that react to events 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 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 operation. Monitoring with EventBridge 150 Amazon Translate Developer Guide 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 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 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", Monitoring with EventBridge 151 Amazon Translate Developer Guide "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. 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. 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: Compliance validation 152 Amazon Translate Developer Guide • Security and Compliance Quick Start Guides – 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 – This whitepaper describes how companies can use AWS to create HIPAA-compliant applications. • AWS Compliance Resources – This collection of workbooks and guides might apply to your industry and location. • AWS Config – This AWS service assesses how well your resource configurations comply with internal practices, industry guidelines, and regulations. • AWS Security Hub – 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 |
translate-dg-048 | translate-dg.pdf | 48 | • Architecting for HIPAA Security and Compliance Whitepaper – This whitepaper describes how companies can use AWS to create HIPAA-compliant applications. • AWS Compliance Resources – This collection of workbooks and guides might apply to your industry and location. • AWS Config – This AWS service assesses how well your resource configurations comply with internal practices, industry guidelines, and regulations. • AWS Security Hub – 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. For general information, see AWS Compliance Programs. 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. 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 whitepaper. To access Amazon Translate through the network, you use AWS published API calls. Clients must support 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. Resilience 153 Amazon Translate Developer Guide 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 (AWS STS) to generate temporary security credentials to sign requests. 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, 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 in your subnets. For more information, see Interface VPC endpoints (AWS PrivateLink) 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 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 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. VPC endpoints (AWS PrivateLink) 154 Amazon Translate Developer Guide For more information, see Accessing a service through an interface 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 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. Creating a VPC endpoint policy for |
translate-dg-049 | translate-dg.pdf | 49 | 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. Creating a VPC endpoint policy for Amazon Translate 155 Amazon Translate Developer Guide { "Statement":[ { "Principal":"*", "Effect":"Allow", "Action":[ "translate:StartTextTranslationJob", "iam:PassRole" ], "Resource":"*" } ] } Creating a VPC endpoint policy for Amazon Translate 156 Amazon Translate Developer Guide Guidelines and quotas The following sections contain information about Amazon Translate guidelines and quotas. Topics • Supported AWS Regions • Compliance • Throttling • Guidelines • Service quotas Supported AWS Regions For a list of AWS Regions that support Amazon Translate, see Amazon Translate endpoints and quotas in the AWS General Reference. Compliance For more information about Amazon Translate compliance programs, see AWS Compliance, AWS Compliance Programs, and AWS Services in Scope by Compliance Program. Throttling Amazon Translate scales to serve customer operational traffic. If you encounter sustained throttling, contact AWS Support. Guidelines To continuously improve the quality of its analysis models, Amazon Translate might store your data. To learn more, see the Amazon Translate FAQ. You can request that we delete your data and that future data associated with your account isn't stored by contacting AWS Support. However, because deleting your data can also delete unique Supported AWS Regions 157 Amazon Translate Developer Guide training data that is helpful in improving translation, doing so might reduce the quality of your translations. Service quotas Amazon Translate has the following service guidelines and quotas. Synchronous real-time translation quotas Description Character encoding Maximum input text Limit UTF-8 10,000 bytes Maximum number of characters per document 100,000 Maximum document size 100,000 bytes Asynchronous batch translation quotas Description Character encoding Maximum number of characters per document Maximum size per document Limit UTF-8 1,000,000 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 Maximum number of concurrent batch translation jobs Maximum number of queued batch translation jobs 5 GB 10 1000 Service quotas 158 Developer Guide Amazon Translate Description Transactions per second for the StartTextTranslationJob API action Transactions per second for the DescribeTextTranslationJob API action Transactions per second for the ListTextTranslationJobs API action Transactions per second for the StopTextTranslationJob API action Custom terminology quotas Description Maximum custom terminology file size Maximum number of custom terminology files per AWS account per AWS Region Limit 5 10 10 5 Limit 10 MB 100 Maximum number of target languages per custom terminology file 10 Maximum source and target text length per custom terminolo gy term 200 bytes Maximum number of terminology files per TranslateText or StartTextTranslationJob request. Transactions per second for the ImportTerminology API action Transactions per second for the GetTerminology API action Transactions per second for the ListTerminologies API action 1 5 10 10 Transactions per second for the DeleteTerminology API action 5 Service quotas 159 Developer Guide Amazon Translate Parallel data quotas Description Maximum number of parallel data resources per AWS account per AWS Region Maximum parallel data input file size Maximum number of source languages in a parallel data resource Limit 1000 5 GB 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 Transactions per second for the CreateParallelData API action Transactions per second for the GetParallelData API action Transactions per second for the ListParallelData API action Transactions per second for the UpdateParallelData API action Transactions per second for the DeleteParallelData API action 1 5 10 10 5 5 Service quotas 160 Amazon Translate Developer Guide Document history for Amazon Translate The following table describes the documentation for this release of Amazon Translate. Change Description Date New feature: Brevity October 31, 2023 Translate now supports brevity for real-time text translations. Brevity reduces the length of the translation output for most translations (compared to the translation output without brevity). For more information, see Using brevity in Amazon Translate. Language auto-detection for document input to real-time You can now use language auto-detection when you August 3, 2023 translations input a document to real-time translations (console or API). For more information, see Real-time translations. Word (.docx) files as input to real-time translations You can now use .docx files (in addition to text files and July 17, |
translate-dg-050 | translate-dg.pdf | 50 | Change Description Date New feature: Brevity October 31, 2023 Translate now supports brevity for real-time text translations. Brevity reduces the length of the translation output for most translations (compared to the translation output without brevity). For more information, see Using brevity in Amazon Translate. Language auto-detection for document input to real-time You can now use language auto-detection when you August 3, 2023 translations input a document to real-time translations (console or API). For more information, see Real-time translations. Word (.docx) files as input to real-time translations You can now use .docx files (in addition to text files and July 17, 2023 Enhancements to custom terminology HTML files) as input to real- time translations (console or API). For more information, see Real-time translations. Translate now supports enhancements to the custom terminology feature that improve translation fluency and accuracy. For more information, see Customizing June 30, 2023 161 Amazon Translate Developer Guide your translations with custom terminology. Text or HTML files as input to real-time translations You can now use text files or HTML files as input to real- May 23, 2023 New action allowed in the TranslateReadOnly policy time translations (console or API). For more information, see Real-time translations. Amazon Translate now May 23, 2023 allows the Translate Document action in the TranslateReadOnly managed policy. For more information, see AWS managed policy: TranslateReadOnly. Translate now supports additional regions for Translate now supports additional regions for March 28, 2023 asynchronous batch processin asynchronous batch processin g. g. For more information, see Asynchronous batch processin g with Amazon Translate. Increased input size for real- time translations You can now input up to 10,000 characters for real- December 16, 2022 Support for nested input folders for batch mode time translations. For more information, see Getting started in Amazon Translate (console). You can now provide nested input folders to batch translation jobs. For more information, see Running a batch translation job in Amazon Translate. November 18, 2022 162 Amazon Translate Developer Guide Support for auto-language detection for batch mode November 18, 2022 You can now auto-dete ct 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 in Amazon Translate. Support for multiple target languages You can now specify multiple target languages in batch October 10, 2022 Support for tags Formality support for additional languages translation jobs. For more information, see Running a batch translation job in Amazon Translate. You can now tag ParallelD ata and Custom Terminology resources in Amazon Translate . For more information, see Tagging your resources in Amazon Translate. You can now set the translati on formality level for Dutch, Korean, and Mexican Spanish in Amazon Translate. For more information, see Setting formality in Amazon Translate . October 6, 2022 October 5, 2022 163 Amazon Translate Separate API Reference New feature New feature AWS PrivateLink support Developer Guide August 25, 2022 February 22, 2022 November 24, 2021 November 24, 2021 The Amazon Translate API Reference is now a separate document from the Developer Guide. For more informati on, see Amazon Translate API Reference. You can now set the formality level for your translation output. For more informati on, see Setting formality in Amazon Translate. You can now mask profane words and phrases in your translation output. For more information, see Masking profane words and phrases in Amazon Translate. 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). 164 Amazon Translate Parallel data update Developer Guide November 15, 2021 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 informati on about parallel data, see Customizing your translati ons with parallel data (Active Custom Translation). Custom terminology direction ality You can now create multi- directional terminology, in November 11, 2021 New languages which any language can be the source language or a target language. For more information, see Creating a custom terminology. 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. November 10, 2021 165 Amazon Translate Developer Guide New custom encryption settings New file format support EventBridge integration New quota November 5, 2021 June 9, 2021 June 4, 2021 April 23, 2021 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 Amazon Translate now supports XML Localization Interchange File Format (XLIFF) files for asynchron ous |
translate-dg-051 | translate-dg.pdf | 51 | following languages: Irish, Marathi, Portuguese (Portugal), and Punjabi. For all of the languages that Amazon Translate supports, see Supported languages and language codes. November 10, 2021 165 Amazon Translate Developer Guide New custom encryption settings New file format support EventBridge integration New quota November 5, 2021 June 9, 2021 June 4, 2021 April 23, 2021 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 Amazon Translate now supports XML Localization Interchange File Format (XLIFF) files for asynchron ous batch processing. For all supported formats, see Supported file formats. Amazon Translate now sends events to Amazon EventBrid ge 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. Amazon Translate now supports up to 1000 queued batch translation jobs. For all Amazon Translate quotas, see Guidelines and limits. 166 Amazon Translate Quota increase New languages Developer Guide March 31, 2021 November 23, 2020 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. Amazon Translate now supports the following languages: Armenian, Catalan, Farsi (Persian), Filipino Tagalog, Gujarati, Haitian Creole, Icelandic, Kannada, Kazakh, Lithuania n, Macedonian, Malayalam, Maltese, Mongolian, Sinhala, Telugu, Uzbek, and Welsh. For all of the languages that Amazon Translate supports, see Supported languages and language codes. 167 Amazon Translate New feature New file format support New language 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 Translati on jobs. During these jobs, Amazon Translate adapts the translation output to reflect the examples in the parallel data. For more information, see Customizing your translati ons with parallel data (Active Custom Translation). Amazon Translate now supports the following Office Open XML file formats as input for asynchronous batch processing: Word document (.docx), PowerPoint presentat ion (.pptx), Excel workbook (.xlsx). For more information, see Starting a batch translati on job. Amazon Translate now supports the Spanish (Mexico) language for translation. For all supported languages, see Supported languages and language codes. Developer Guide November 23, 2020 July 29, 2020 April 30, 2020 168 Amazon Translate New region New feature New regions Developer Guide April 20, 2020 December 23, 2019 November 25, 2019 Amazon Translate supports asynchronous batch processin g in the Europe (London) Region. For all of the AWS regions where asynchronous batch processing is available, see Region availability. Amazon Translate adds asynchronous batch translati on functionality. For more information, see Asynchron ous batch processing. 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 or AWS Regions and Endpoints in the Amazon Web Services General Reference. 169 Amazon Translate New languages New languages New feature New feature Developer Guide November 25, 2019 October 3, 2019 July 31, 2019 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 combinati ons that Amazon Translate can translate directly, see Supported languages. Amazon Translate adds new languages for translation: Greek, Hungarian, Romanian, Thai, Ukrainian, Urdu, and Vietnamese. For a list of the language combinati ons that Amazon Translate can translate directly, see Supported languages. Amazon Translate adds FedRAMP compliance. For more information, see Compliance. Amazon Translate adds SOC compliance. For more information, see Compliance. May 30, 2019 170 Amazon Translate New regions New languages New region New feature 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 or AWS Regions and Endpoints in the Amazon Web Services General Reference. Amazon Translate adds new languages for translation: Hindi, Malay, Norwegian , and Persian. For a list of the language combinati ons that Amazon Translate can translate directly, see Supported languages. Amazon Translate adds support for the EU (Frankfur t) and Asia Pacific (Seoul) Regions. For a complete list of the AWS Regions supported by Amazon Translate, see the AWS Region Table or AWS Regions and Endpoints in the Amazon Web Services General Reference. Amazon Translate adds PCI compliance. For more information, see Compliance. Developer Guide May 8, 2019 May 6, 2019 February 28, 2019 December 12, 2018 171 Amazon Translate New feature New languages Developer Guide November |
translate-dg-052 | translate-dg.pdf | 52 | Hindi, Malay, Norwegian , and Persian. For a list of the language combinati ons that Amazon Translate can translate directly, see Supported languages. Amazon Translate adds support for the EU (Frankfur t) and Asia Pacific (Seoul) Regions. For a complete list of the AWS Regions supported by Amazon Translate, see the AWS Region Table or AWS Regions and Endpoints in the Amazon Web Services General Reference. Amazon Translate adds PCI compliance. For more information, see Compliance. Developer Guide May 8, 2019 May 6, 2019 February 28, 2019 December 12, 2018 171 Amazon Translate New feature New languages Developer Guide November 27, 2018 November 20, 2018 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 translate d exactly the way you want it, every time, regardless of the standard translation or context. For more informati on, see Custom terminology. 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 unsupport ed language pairs. For the language combinations that Amazon Translate can translate directly, see Supported languages. 172 Amazon Translate New feature New feature New feature New feature New guide Developer Guide October 29, 2018 October 25, 2018 July 17, 2018 April 4, 2018 November 29, 2017 Amazon Translate adds direct translation between supported languages other than English. For the language combinati ons that Amazon Translate can translate directly, see Supported languages. Amazon Translate adds HIPAA compliance. For more information, see Compliance. Amazon Translate adds multiple new languages for translation: Chinese (Traditio n), Czech, Italian, Japanese, Russian, and Turkish. For a list of languages that Amazon Translate supports, see Supported languages. Amazon Translate adds support for automatic source language detection. For more information, see How Amazon Translate works. This is the first release of the Amazon Translate Developer Guide. 173 Amazon Translate Developer Guide API reference The Amazon Translate API Reference is now a separate document. For more information, see Amazon Translate API Reference. 174 Amazon Translate Developer Guide AWS Glossary For the latest AWS terminology, see the AWS glossary in the AWS Glossary Reference. 175 |
twinmaker-guide-001 | twinmaker-guide.pdf | 1 | User Guide AWS IoT TwinMaker Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. AWS IoT TwinMaker User Guide AWS IoT TwinMaker: User Guide Copyright © 2025 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. AWS IoT TwinMaker Table of Contents User Guide What is AWS IoT TwinMaker? ......................................................................................................... 1 How it works ................................................................................................................................................. 1 Key concepts and components .................................................................................................................. 2 Workspace ................................................................................................................................................. 3 Entity-component model ...................................................................................................................... 3 Visualization ............................................................................................................................................. 5 Getting started with AWS IoT TwinMaker ..................................................................................... 8 Create and manage a service role for AWS IoT TwinMaker ................................................................. 9 Assign trust ............................................................................................................................................... 9 Amazon S3 permissions ......................................................................................................................... 9 Assign permissions to a specific Amazon S3 bucket ..................................................................... 10 Permissions for built-in connectors .................................................................................................. 12 Permissions for a connector to an external data source .............................................................. 15 Modify your workspace IAM role to use the Athena data connector ......................................... 16 Create a workspace .................................................................................................................................... 18 Create your first entity ............................................................................................................................. 20 Setting up an AWS account ..................................................................................................................... 23 Sign up for an AWS account .............................................................................................................. 23 Create a user with administrative access ......................................................................................... 24 Using and creating component types .......................................................................................... 26 Built-in component types ......................................................................................................................... 26 Core features of AWS IoT TwinMaker component types ................................................................... 27 Creating property definitions .................................................................................................................. 28 Creating functions ...................................................................................................................................... 29 Example component types ....................................................................................................................... 30 Alarm (abstract) ..................................................................................................................................... 30 Timestream telemetry ......................................................................................................................... 32 Alarm (inherits from abstract alarm) ................................................................................................ 32 Equipment examples ............................................................................................................................ 33 Bulk operations ............................................................................................................................. 37 Key concepts and terminology ................................................................................................................ 37 AWS IoT TwinMaker metadataTransferJob functionality ............................................................. 38 Performing bulk import and export operations .................................................................................. 39 metadataTransferJob prerequisites ................................................................................................... 40 iii AWS IoT TwinMaker User Guide IAM permissions .................................................................................................................................... 40 Run a bulk operation ........................................................................................................................... 44 Error handling ........................................................................................................................................ 47 Import metadata templates ............................................................................................................... 48 AWS IoT TwinMaker metadataTransferJob examples ................................................................... 51 AWS IoT TwinMaker metadata transfer job schema ........................................................................... 53 Data connectors ............................................................................................................................. 70 Data connectors .......................................................................................................................................... 70 Schema initializer connector .............................................................................................................. 71 DataReaderByEntity .............................................................................................................................. 72 DataReaderByComponentType ........................................................................................................... 73 DataReader ............................................................................................................................................. 75 AttributePropertyValueReaderByEntity ............................................................................................ 76 DataWriter .............................................................................................................................................. 77 Examples ................................................................................................................................................. 78 Athena tabular data connector ............................................................................................................... 87 AWS IoT TwinMaker Athena data connector prerequisites .......................................................... 87 Using the Athena data connector ..................................................................................................... 88 Using the Athena tabular data connector JSON reference .......................................................... 92 Using the Athena data connector ..................................................................................................... 93 Visualize Athena tabular data in Grafana ........................................................................................ 93 AWS IoT TwinMaker time-series data connector ................................................................................. 95 AWS IoT TwinMaker time-series data connector prerequisites .................................................... 96 Time-series data connector background .......................................................................................... 96 Developing a time-series data connector ........................................................................................ 98 Improving your data connector ....................................................................................................... 107 Testing your connector ...................................................................................................................... 107 Security ................................................................................................................................................. 108 Creating AWS IoT TwinMaker resources ........................................................................................ 108 What's next .......................................................................................................................................... 110 AWS IoT TwinMaker cookie factory data connector ................................................................... 110 Creating AWS IoT TwinMaker scenes ......................................................................................... 116 Before creating scenes ............................................................................................................................ 116 Optimize your resources before importing them into AWS IoT TwinMaker ........................... 116 Best practices for performance in AWS IoT TwinMaker ............................................................. 117 Learn more ........................................................................................................................................... 117 iv AWS IoT TwinMaker User Guide Uploading resources in AWS IoT TwinMaker ...................................................................................... 118 Upload files to the Resource Library using the console ............................................................. 118 Create your scenes ................................................................................................................................... 118 Use 3D navigation in your AWS IoT TwinMaker in scenes ......................................................... 119 Add fixed cameras ................................................................................................................................... 121 Enhanced editing ..................................................................................................................................... 121 Targeted placement of scene objects ............................................................................................ 122 Submodel selection ............................................................................................................................ 122 Edit entities in the scene hierarchy ................................................................................................ 123 Add annotations to entities ............................................................................................................. 124 Add overlays to Tags ......................................................................................................................... 128 Edit your scenes ....................................................................................................................................... 136 Add models .......................................................................................................................................... 136 Add widgets ......................................................................................................................................... 137 Adding tags .......................................................................................................................................... 141 Optimize your 3D model ........................................................................................................................ 141 Using 3D Tiles in your scene ............................................................................................................ 141 Dynamic scenes ........................................................................................................................................ 144 Static versus dynamic scenes ........................................................................................................... 144 Scene component types and entities ............................................................................................. 145 Dynamic scene concepts ................................................................................................................... 146 AWS IoT TwinMaker app kit integration .................................................................................... 147 Switch AWS IoT TwinMaker pricing modes ............................................................................... 148 Knowledge graph ........................................................................................................................ 150 AWS IoT TwinMaker knowledge graph core concepts ...................................................................... 150 Using knowledge graph .......................................................................................................................... 151 Generate a scene graph ......................................................................................................................... 153 AWS IoT TwinMaker scene graph prerequisites ............................................................................ 154 Bind 3D nodes in your scene ........................................................................................................... 155 Create a web application .................................................................................................................. 157 Knowledge graph Grafana panel .......................................................................................................... 159 AWS IoT TwinMaker query editor prerequisites ........................................................................... 159 Knowledge graph Grafana permissions ......................................................................................... 160 Knowledge graph additional resources ............................................................................................... 164 Asset synchronization with AWS IoT SiteWise .......................................................................... 178 Using asset sync with AWS IoT SiteWise ............................................................................................ 178 v AWS IoT TwinMaker User Guide Using |
twinmaker-guide-002 | twinmaker-guide.pdf | 2 | pricing modes ............................................................................... 148 Knowledge graph ........................................................................................................................ 150 AWS IoT TwinMaker knowledge graph core concepts ...................................................................... 150 Using knowledge graph .......................................................................................................................... 151 Generate a scene graph ......................................................................................................................... 153 AWS IoT TwinMaker scene graph prerequisites ............................................................................ 154 Bind 3D nodes in your scene ........................................................................................................... 155 Create a web application .................................................................................................................. 157 Knowledge graph Grafana panel .......................................................................................................... 159 AWS IoT TwinMaker query editor prerequisites ........................................................................... 159 Knowledge graph Grafana permissions ......................................................................................... 160 Knowledge graph additional resources ............................................................................................... 164 Asset synchronization with AWS IoT SiteWise .......................................................................... 178 Using asset sync with AWS IoT SiteWise ............................................................................................ 178 v AWS IoT TwinMaker User Guide Using a custom workspace ............................................................................................................... 178 Using the IoTSiteWiseDefaultWorkspace ....................................................................................... 184 Differences between custom and default workspaces ..................................................................... 185 Resources synced from AWS IoT SiteWise .......................................................................................... 185 Custom and default workspaces ..................................................................................................... 186 Default workspace only ..................................................................................................................... 187 Resources not synced ........................................................................................................................ 187 Use synced entities and component types in AWS IoT TwinMaker .......................................... 188 Analyze sync status and errors ............................................................................................................. 189 Sync job statuses ................................................................................................................................ 189 Delete a sync job ..................................................................................................................................... 191 Asset sync limits ....................................................................................................................................... 192 Setting up Grafana dashboards .................................................................................................. 194 CORS configuration ................................................................................................................................. 195 Setting up your Grafana environment ................................................................................................ 196 Amazon Managed Grafana ............................................................................................................... 196 Self-managed Grafana ...................................................................................................................... 197 Creating a dashboard role ..................................................................................................................... 198 Create an IAM policy ......................................................................................................................... 198 Upload video from the edge ........................................................................................................... 201 Add more permissions ....................................................................................................................... 202 Creating the Grafana Dashboard IAM role .................................................................................... 203 Creating an AWS IoT TwinMaker Video Player policy ...................................................................... 204 Scope down access to your resources ............................................................................................ 206 Scope down GET permissions .......................................................................................................... 206 Scope down AWS IoT SiteWise BatchPutAssetPropertyValue permission .............................. 207 Connect Alarms to Grafana dashboards .................................................................................... 210 AWS IoT SiteWise alarm configuration prerequisites ....................................................................... 210 Define the AWS IoT SiteWise alarm component IAM role ............................................................. 210 Query and update through the AWS IoT TwinMaker API ................................................................ 212 Configure your Grafana dashboard for alarms .................................................................................. 213 Use Grafana dashboard for alarm visualization ................................................................................ 215 Matterport integration ................................................................................................................ 218 Integration overview ............................................................................................................................... 219 Matterport integration prerequisites ................................................................................................... 220 Matterport SDK credentials ................................................................................................................... 221 vi AWS IoT TwinMaker User Guide Store Matterport credentials in AWS Secrets Manager ................................................................... 222 Matterport scans in AWS IoT TwinMaker scenes ............................................................................... 225 Matterport in your AWS IoT TwinMaker Grafana dashboard .......................................................... 231 Matterport integration with the AWS IoT app kit ............................................................................ 231 Streaming video to AWS IoT TwinMaker ................................................................................... 232 Use the edge connector for Kinesis video stream to stream video in AWS IoT TwinMaker ....... 232 Prerequisites ........................................................................................................................................ 232 Create video components for AWS IoT TwinMaker scenes ........................................................ 233 Add video and metadata from Kinesis video stream to a Grafana dashboard ............................ 233 Using the AWS IoT TwinMaker Flink library .............................................................................. 235 Logging and monitoring ............................................................................................................. 236 Monitoring with Amazon CloudWatch metrics .................................................................................. 236 Metrics ................................................................................................................................................... 237 Logging API calls with AWS CloudTrail ............................................................................................... 239 AWS IoT TwinMaker information in CloudTrail ............................................................................ 240 Security ........................................................................................................................................ 242 Data protection ........................................................................................................................................ 242 Encryption at rest ............................................................................................................................... 243 Encryption in transit .......................................................................................................................... 244 Identity and Access Management ........................................................................................................ 244 Audience ............................................................................................................................................... 245 Authenticating with identities ......................................................................................................... 245 Managing access using policies ....................................................................................................... 249 How AWS IoT TwinMaker works with IAM .................................................................................... 251 Identity-based policy examples ....................................................................................................... 257 Troubleshooting .................................................................................................................................. 260 Using service-linked roles ................................................................................................................. 262 AWS managed policies ...................................................................................................................... 264 VPC endpoints (AWS PrivateLink) ........................................................................................................ 269 Considerations for AWS IoT TwinMaker VPC endpoints ............................................................. 269 Creating an interface VPC endpoint for AWS IoT TwinMaker ................................................... 271 Accessing AWS IoT TwinMaker through an interface VPC endpoint ........................................ 272 Creating a VPC endpoint policy for AWS IoT TwinMaker ........................................................... 273 Compliance Validation ............................................................................................................................ 274 Resilience ................................................................................................................................................... 275 Infrastructure Security ............................................................................................................................ 276 vii AWS IoT TwinMaker User Guide Endpoints and quotas ................................................................................................................. 277 AWS IoT TwinMaker endpoints and quotas ....................................................................................... 277 Additional endpoint information .................................................................................................... 277 Document history ........................................................................................................................ 278 ................................................................................................................................................. cclxxix viii AWS IoT TwinMaker User Guide What is AWS IoT TwinMaker? AWS IoT TwinMaker is an AWS IoT service that you can use to build operational digital twins of physical and digital systems. AWS IoT TwinMaker creates digital visualizations using measurements and analysis from a variety of real-world sensors, cameras, and enterprise applications to help you keep track of your physical factory, building, or industrial plant. You can use this real-world data to monitor operations, diagnose and correct errors, and optimize operations. A digital twin is a live digital representation of a system and all of its physical and digital components. It is dynamically updated with data to mimic the true structure, state, and behavior of the system. You can use it to drive business outcomes. End users interact with data from your digital twin by using a user interface application. How it works To fulfill the minimum requirements for creating a digital twin, you must do the following. • Model devices, equipment, spaces, and processes in a physical location. • Connect |
twinmaker-guide-003 | twinmaker-guide.pdf | 3 | to monitor operations, diagnose and correct errors, and optimize operations. A digital twin is a live digital representation of a system and all of its physical and digital components. It is dynamically updated with data to mimic the true structure, state, and behavior of the system. You can use it to drive business outcomes. End users interact with data from your digital twin by using a user interface application. How it works To fulfill the minimum requirements for creating a digital twin, you must do the following. • Model devices, equipment, spaces, and processes in a physical location. • Connect these models to data sources that store important contextual information, such as sensor data camera feeds. • Create visualizations that help users understand the data and insights in order to make business decisions more efficiently. • Make digital twins available to end users to drive business outcomes. AWS IoT TwinMaker addresses these challenges by providing the following capabilities. • Entity component system knowledge graph: AWS IoT TwinMaker provides tools for modeling devices, equipment, spaces, and processes in a knowledge graph. This knowledge graph contains metadata about the system and can connect to data in different locations. AWS IoT TwinMaker provides built-in connectors for data stored in AWS IoT SiteWise and Kinesis Video Streams. You can also create custom connectors to data stored in other locations. The knowledge graph and connectors together provide a single interface for querying data in disparate locations. How it works 1 AWS IoT TwinMaker User Guide • Scene composer: The AWS IoT TwinMaker console provides a scene composition tool for creating scenes in 3D. You upload your previously built 3D/CAD models, optimized for web display and converted to .gltf or .glb format. You then use the scene composer to place multiple models in a single scene, creating visual representations of their operations. You can also overlay data in the scene. For example, you can create a tag in a scene location that connects to temperature data from a sensor. This associates the data with the location. • Applications: AWS IoT TwinMaker provides a plug-in for Grafana and Amazon Managed Grafana that you can use to build dashboard applications for end users. • Third-party tools: Mendix partners with AWS IoT TwinMaker to provide complete solutions for industrial IoT. See the workshop Lean Daily Management Application with Mendix and AWS IoT TwinMaker to get started with using the Mendix Low Code Application Development Platform (LCAP) with AWS services like AWS IoT TwinMaker, Kinesis Video Streams and AWS IoT SiteWise. Key concepts and components The following diagram illustrates how the key concepts of AWS IoT TwinMaker fit together. Key concepts and components 2 AWS IoT TwinMaker Note User Guide Asterisks (*) in the diagram indicate one-to-many relationships. For the quotas for each of these relationships, see AWS IoT TwinMaker endpoints and quotas. The following sections describe the concepts illustrated in the diagram. Workspace A workspace is a top-level container for your digital twin application. You create a logical set of entities, components, scene assets, and other resources for your digital twin inside this workspace. It also serves as a security boundary to manage access to the digital twin application and the resources it contains. Each workspace is linked to the Amazon S3 bucket where your workspace data is stored. You use IAM roles to restrict access to your workspace. A workspace can contain multiple components, entities, scenes and resources. A component type, entity, scene or resource exists only within one workspace. Entity-component model AWS IoT TwinMaker provides tools that you use to model your system by using an entity- component-based knowledge graph. You can use the entity-component architecture to create a representation of your physical system. This entity component model consists of entities, components, and relationships. For more information about entity-component systems, see Entity component system. Entity Entities are digital representations of the elements in a digital twin that capture the capabilities of that element. This element can be a piece of physical equipment, a concept, or a process. Entities have components associated with them. These components provide data and context for the associated entity. With AWS IoT TwinMaker, you can organize entities into custom hierarchies for more efficient management. The default view of the entity and component system is hierarchical. Workspace 3 AWS IoT TwinMaker Component User Guide Components provide context and data for entities in a scene. You add components to entities. The lifetime of a component is tied to the lifetime of an entity. Components can add static data, such as a list of documents or the coordinates of a geographic location. They can also have functions that connect to other systems, including systems that contain time series data such as AWS IoT SiteWise and other time-series cloud historians. Components are defined by JSON documents that |
twinmaker-guide-004 | twinmaker-guide.pdf | 4 | management. The default view of the entity and component system is hierarchical. Workspace 3 AWS IoT TwinMaker Component User Guide Components provide context and data for entities in a scene. You add components to entities. The lifetime of a component is tied to the lifetime of an entity. Components can add static data, such as a list of documents or the coordinates of a geographic location. They can also have functions that connect to other systems, including systems that contain time series data such as AWS IoT SiteWise and other time-series cloud historians. Components are defined by JSON documents that describe the connection between a data source and AWS IoT TwinMaker. Components can describe external data sources or data sources that are built in to AWS IoT TwinMaker. A component accesses an external datasource by using a Lambda function that is specified in the JSON document. A workspace can contain many components. Components provide data to tags through associated entities. AWS IoT TwinMaker provides several built-in components that you can add from the console. You can also create your own custom components to connect to sources of data such as timestream telemetry and geospatial coordinates. Examples of these include TimeStream Telemetry, Geospatial components, and connectors to third party data sources such as Snowflake. AWS IoT TwinMaker provides the following types of built-in components for common use cases: • Document, such as user manuals or images located at specified URLs. • Time series, such as sensor data from AWS IoT SiteWise. • Alarms, such as time-series alarms from external data sources. • Video, from IP cameras connected to Kinesis Video Streams. • Custom components to connect to additional data sources. For example, you can create a custom connector to connect your AWS IoT TwinMaker entities to time-series data stored externally. Data sources A data source is the location of your digital twin’s source data. AWS IoT TwinMaker supports two types of data sources: • Hierarchy connectors, which allow you to continually sync an external model to AWS IoT TwinMaker. Entity-component model 4 AWS IoT TwinMaker User Guide • Time-series connectors, which allow you to connect to time-series databases such as AWS IoT SiteWise. Property Properties are the values, both static and time-series backed, contained in components. When you add components to entities, the properties in the component describe details about the current state of the entity. AWS IoT TwinMaker supports three kinds of properties: • Single value, non-time-series properties— These properties are typically static key-value pairs and are directly stored in AWS IoT TwinMaker with the metadata of the associated entity. • Time-series properties— AWS IoT TwinMaker stores a reference to the time-series store for these properties. This defaults to the latest value. • Relationship properties— These properties store a reference to another entity or component. For example, seen_by is a relationship component that might relate a camera entity to another entity that is directly visualized by that camera. You can query property values across heterogeneous data sources by using the unified data query interface. Visualization You use AWS IoT TwinMaker to augment a three-dimensional representation of your digital twin, and then view it in Grafana. To create scenes, use existing CAD or other 3D file types. You then use data overlays to add relevant data for your digital twin. Scenes Scenes are three-dimensional representations that provide visual context for the data connected to AWS IoT TwinMaker. Scenes can be created by using a single gltf (GL Transmission Format) or glb 3D model for the entire environment, or by using a composition of multiple models. Scenes also include tags to denote points of interest in the scene. Scenes are the top level containers for visualizations. A scene consists of one or more nodes. A workspace can contain multiple scenes. For example, a workspace can contain one scene for each floor of a facility. Visualization 5 AWS IoT TwinMaker Resources User Guide Scenes display resources, which are displayed as nodes in the AWS IoT TwinMaker console. A scene can contain many resources. Resources are images and glTF-based, three-dimensional models used to create a scene. A resource can represent a single piece of equipment, or a complete site. You place resources into a scene by uploading a .gltf or .glb file to your workspace resource library and then adding them to your scene. Augmented user interface With AWS IoT TwinMaker you can augment your scenes with data overlays that add important context and information, such as sensor data, to locations in the scene. Nodes: Nodes are instances of tags, lights, and three-dimensional models. They can also be empty to add structure to your scene hierarchy. For example, you can group multiple nodes together under a single empty node. Tags: A tag is a type of node that represents data from a component (through |
twinmaker-guide-005 | twinmaker-guide.pdf | 5 | scene by uploading a .gltf or .glb file to your workspace resource library and then adding them to your scene. Augmented user interface With AWS IoT TwinMaker you can augment your scenes with data overlays that add important context and information, such as sensor data, to locations in the scene. Nodes: Nodes are instances of tags, lights, and three-dimensional models. They can also be empty to add structure to your scene hierarchy. For example, you can group multiple nodes together under a single empty node. Tags: A tag is a type of node that represents data from a component (through an entity). A tag can be associated with only one component. A tag is an annotation added to a specific x,y,z coordinate position of a scene. The tag connects this scene part to the knowledge graph by using an entity property. You can use a tag to configure the behavior or visual appearance of an item in the scene, such as an alarm. Lights: You can add lights to a scene to bring certain objects into focus, or cast shadows on objects to indicate their physical location. Three-dimensional models: A three-dimensional model is a visual representation of a .gltf or .glb file imported as a resource. Note AWS IoT TwinMaker is not intended for use in, or in association with, the operation of any hazardous environments or critical systems that may lead to serious bodily injury or death or cause environmental or property damage. Data collected through your use of AWS IoT TwinMaker should be evaluated for accuracy as appropriate for your use case. AWS IoT TwinMaker should not be used as a substitute for Visualization 6 AWS IoT TwinMaker User Guide human monitoring of physical systems for purposes of assessing whether such systems are operating safely. Visualization 7 AWS IoT TwinMaker User Guide Getting started with AWS IoT TwinMaker The topics in this section describe how to do the following. • Create and set up a new workspace. • Create an entity and add a component to it. Prerequisites: To create your first workspace and scene, you need the following AWS resources. • An AWS account. • An IAM service role for AWS IoT TwinMaker. This role is automatically generated by default, when you create a new AWS IoT TwinMaker workspace in the AWS IoT TwinMaker console. If you don't choose to let AWS IoT TwinMaker automatically create a new IAM service role, you must specify one that you have already created. For instructions on creating and managing this service role, see ???. For more information about IAM service roles, see Creating a role to delegate permissions to an AWS service. Important This service role must have an attached policy that grants permission for the service to read and write to an Amazon S3 bucket. AWS IoT TwinMaker uses this role to access other services on your behalf. You will also need to assign a trust relationship between this role and AWS IoT TwinMaker so that the service can assume the role. If your twin interacts with other AWS services, add the necessary permissions for those services as well. Topics • Create and manage a service role for AWS IoT TwinMaker • Create a workspace • Create your first entity • Setting up an AWS account 8 AWS IoT TwinMaker User Guide Create and manage a service role for AWS IoT TwinMaker AWS IoT TwinMaker requires that you use a service role to allow it to access resources in other services on your behalf. This role must have a trust relationship with AWS IoT TwinMaker. When you create a workspace, you must assign this role to the workspace. This topic contains example policies that show you how to configure permissions for common scenarios. Assign trust The following policy establishes a trust relationship between your role and AWS IoT TwinMaker. Assign this trust relationship to the role that you use for your workspace. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "iottwinmaker.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } Amazon S3 permissions The following policy allows your role to read and delete from and write to an Amazon S3 bucket. Workspaces store resources in Amazon S3, so the Amazon S3 permissions are required for all workspaces. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetBucket*", Create and manage a service role for AWS IoT TwinMaker 9 User Guide AWS IoT TwinMaker "s3:GetObject", "s3:ListBucket", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::*" ] }, { "Effect": "Allow", "Action": [ "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::*/DO_NOT_DELETE_WORKSPACE_*" ] } ] } Note When you create a workspace, AWS IoT TwinMaker creates a file in your Amazon S3 bucket that indicates it's being used by a workspace. This policy gives AWS IoT TwinMaker permission to delete that file when you delete the workspace. AWS |
twinmaker-guide-006 | twinmaker-guide.pdf | 6 | Amazon S3 permissions are required for all workspaces. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetBucket*", Create and manage a service role for AWS IoT TwinMaker 9 User Guide AWS IoT TwinMaker "s3:GetObject", "s3:ListBucket", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::*" ] }, { "Effect": "Allow", "Action": [ "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::*/DO_NOT_DELETE_WORKSPACE_*" ] } ] } Note When you create a workspace, AWS IoT TwinMaker creates a file in your Amazon S3 bucket that indicates it's being used by a workspace. This policy gives AWS IoT TwinMaker permission to delete that file when you delete the workspace. AWS IoT TwinMaker places other objects related to your workspace. It's your responsibility to delete these objects when you delete a workspace. Assign permissions to a specific Amazon S3 bucket When you create a workspace in the AWS IoT TwinMaker console, you can choose to have AWS IoT TwinMaker create an Amazon S3 bucket for you. You can find information about this bucket by using the following AWS CLI command. aws iottwinmaker get-workspace --workspace-id workspace name The following example shows the format of the output of this command. Assign permissions to a specific Amazon S3 bucket 10 AWS IoT TwinMaker { User Guide "arn": "arn:aws:iottwinmaker:region:account Id:workspace/workspace name", "creationDateTime": "2021-11-30T11:30:00.000000-08:00", "description": "", "role": "arn:aws:iam::account Id:role/service role name", "s3Location": "arn:aws:s3:::bucket name", "updateDateTime": "2021-11-30T11:30:00.000000-08:00", "workspaceId": "workspace name" } To update your policy so that it assigns permissions for a specific Amazon S3 bucket, use the value of bucket name. The following policy allows your role to read and delete from and write to a specific Amazon S3 bucket. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetBucket*", "s3:GetObject", "s3:ListBucket", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::bucket name", "arn:aws:s3:::bucket name/*" ] }, { "Effect": "Allow", "Action": [ "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::iottwinmakerbucket/DO_NOT_DELETE_WORKSPACE_*" ] Assign permissions to a specific Amazon S3 bucket 11 AWS IoT TwinMaker } ] } User Guide Permissions for built-in connectors If your workspace interacts with other AWS services by using built-in connectors, you must include permissions for those services in this policy. If you use the com.amazon.iotsitewise.connector component type, you must include permissions for AWS IoT SiteWise. For more information about component types, see ???. Note If you interact with other AWS services by using a custom component type, you must grant the role permission to run the Lambda function that implements the function in your component type. For more information, see ???. The following example shows how to include AWS IoT SiteWise in your policy. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetBucket*", "s3:GetObject", "s3:ListBucket", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::bucket name", "arn:aws:s3:::bucket name/*" ] }, { "Effect": "Allow", "Action": [ Permissions for built-in connectors 12 AWS IoT TwinMaker User Guide "iotsitewise:DescribeAsset" ], "Resource": "asset ARN" }, { "Effect": "Allow", "Action": [ "iotsitewise:DescribeAssetModel" ], "Resource": "asset model ARN" }, { "Effect": "Allow", "Action": [ "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::*/DO_NOT_DELETE_WORKSPACE_*" ] } ] } If you use the com.amazon.iotsitewise.connector component type and need to read property data from AWS IoT SiteWise, you must include the following permission in your policy. ... { "Action": [ "iotsitewise:GetPropertyValueHistory", ], "Resource": [ "AWS IoT SiteWise asset resource ARN" ], "Effect": "Allow" }, ... If you use the com.amazon.iotsitewise.connector component type and need to write property data to AWS IoT SiteWise, you must include the following permission in your policy. Permissions for built-in connectors 13 AWS IoT TwinMaker User Guide ... { "Action": [ "iotsitewise:BatchPutPropertyValues", ], "Resource": [ "AWS IoT SiteWise asset resource ARN" ], "Effect": "Allow" }, ... If you use the com.amazon.iotsitewise.connector.edgevideo component type, you must include permissions for AWS IoT SiteWise and Kinesis Video Streams. The following example policy shows how to include AWS IoT SiteWise and Kinesis Video Streams permissions in your policy. ... { "Action": [ "iotsitewise:DescribeAsset", "iotsitewise:GetAssetPropertyValue" ], "Resource": [ "AWS IoT SiteWise asset resource ARN for the Edge Connector for Kinesis Video Streams" ], "Effect": "Allow" }, { "Action": [ "iotsitewise:DescribeAssetModel" ], "Resource": [ "AWS IoT SiteWise model resource ARN for the Edge Connector for Kinesis Video Streams" ], "Effect": "Allow" }, { Permissions for built-in connectors 14 AWS IoT TwinMaker "Action": [ "kinesisvideo:DescribeStream" ], "Resource": [ "Kinesis Video Streams stream ARN" ], "Effect": "Allow" }, ... User Guide Permissions for a connector to an external data source If you create a component type that uses a function that connects to an external data source, you must give your service role permission to use the Lambda function that implements the function. For more information about creating component types and functions, see ???. The following example gives permission to your service role to use a Lambda function. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetBucket*", "s3:GetObject", "s3:ListBucket", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::bucket name", "arn:aws:s3:::bucket name/*" ] }, { "Action": [ "lambda:invokeFunction" ], "Resource": [ "Lambda |
twinmaker-guide-007 | twinmaker-guide.pdf | 7 | User Guide Permissions for a connector to an external data source If you create a component type that uses a function that connects to an external data source, you must give your service role permission to use the Lambda function that implements the function. For more information about creating component types and functions, see ???. The following example gives permission to your service role to use a Lambda function. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetBucket*", "s3:GetObject", "s3:ListBucket", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::bucket name", "arn:aws:s3:::bucket name/*" ] }, { "Action": [ "lambda:invokeFunction" ], "Resource": [ "Lambda function ARN" ], Permissions for a connector to an external data source 15 User Guide AWS IoT TwinMaker "Effect": "Allow" }, { "Effect": "Allow", "Action": [ "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::*/DO_NOT_DELETE_WORKSPACE_*" ] } ] } For more information about creating roles and assigning policies and trust relationships to them by using the IAM console, the AWS CLI, and the IAM API, see Creating a role to delegate permissions to an AWS service. Modify your workspace IAM role to use the Athena data connector To use the AWS IoT TwinMaker Athena tabular data connector, you must update your AWS IoT TwinMaker workspace IAM role. Add the following permissions to your workspace IAM role: Note This IAM change only works for Athena tabular data stored with AWS Glue and Amazon S3. To use Athena with other data sources, you must configure an IAM role for Athena, see Identity and access management in Athena. { "Effect": "Allow", "Action": [ "athena:GetQueryExecution", "athena:GetQueryResults", "athena:GetTableMetadata", "athena:GetWorkGroup", "athena:StartQueryExecution", "athena:StopQueryExecution" ], Modify your workspace IAM role to use the Athena data connector 16 AWS IoT TwinMaker User Guide "Resource": [ "athena resouces arn" ] },// Athena permission { "Effect": "Allow", "Action": [ "glue:GetTable", "glue:GetTables", "glue:GetDatabase", "glue:GetDatabases" ], "Resource": [ "glue resouces arn" ] },// This is an example for accessing aws glue { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetObject" ], "Resource": [ "Amazon S3 data source bucket resources arn" ] }, // S3 bucket for storing the tabular data. { "Effect": "Allow", "Action": [ "s3:GetBucketLocation", "s3:GetObject", "s3:ListBucket", "s3:ListBucketMultipartUploads", "s3:ListMultipartUploadParts", "s3:AbortMultipartUpload", "s3:CreateBucket", "s3:PutObject", "s3:PutBucketPublicAccessBlock" ], "Resource": [ "S3 query result bucket resources arn" ] } // Storing the query results Modify your workspace IAM role to use the Athena data connector 17 AWS IoT TwinMaker User Guide Read the Identity and access management in Athena for more information on Athena IAM configuration. Create a workspace To create and configure your first workspace, use the following steps. Note This topic shows you how to create a simple workspace with a single resource. For a fully featured workspace with multiple resources, try the sample setup in the AWS IoT TwinMaker samples Github repository. 1. On the AWS IoT TwinMaker console home page, choose Workspaces in the left navigation pane. 2. On the Workspaces page, choose Create workspace. 3. On the Create a Workspace page, enter a name for your workspace. 4. (Optional) Add a description for your workspace. 5. Under S3 resource, choose Create an S3 bucket. This option creates an Amazon S3 bucket where AWS IoT TwinMaker stores information and resources related to the workspace. Each workspace requires its own bucket. 6. Under Execution role, choose either Auto-generate a new role or the custom IAM role that you created as for this workspace. If you choose Auto-generate a new role, AWS IoT TwinMaker attaches a policy to the role that grants permission to the new service role to access other AWS services, including permission to read and write to the Amazon S3 bucket that you specify in the previous step. For information about assigning permissions to this role, see ???. 7. Choose Create Workspace. The following banner appears at the top of the Workspaces page. 8. Choose Get json. We recommend you add the IAM policy you see to the IAM role that AWS IoT TwinMaker created for users and accounts that view the Grafana dashboard. The name of this role follows this pattern: workspace-nameDashboardRole, For instructions on how to create a policy and attach it to a role, see Modifying a role permissions policy (console). Create a workspace 18 AWS IoT TwinMaker User Guide The following example contains the policy to add to the dashboard role. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject" ], "Resource": [ "arn:aws:s3:::iottwinmaker-workspace-workspace-name-lower-case-account-id", "arn:aws:s3:::iottwinmaker-workspace-workspace-name-lower-case-account-id/ *" ] }, { "Effect": "Allow", "Action": [ "iottwinmaker:Get*", "iottwinmaker:List*" ], "Resource": [ "arn:aws:iottwinmaker:us-east-1:account-id:workspace/workspace-name", "arn:aws:iottwinmaker:us-east-1:account-id:workspace/workspace-name/*" ] }, { "Effect": "Allow", "Action": "iottwinmaker:ListWorkspaces", "Resource": "*" } ] } You're now ready to start creating a data model for your workspace with your first entity. For instructions on how to do this, see Create your first entity. Create a workspace 19 AWS IoT TwinMaker User Guide Create your first entity To create your first entity, use the following steps. |
twinmaker-guide-008 | twinmaker-guide.pdf | 8 | policy to add to the dashboard role. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject" ], "Resource": [ "arn:aws:s3:::iottwinmaker-workspace-workspace-name-lower-case-account-id", "arn:aws:s3:::iottwinmaker-workspace-workspace-name-lower-case-account-id/ *" ] }, { "Effect": "Allow", "Action": [ "iottwinmaker:Get*", "iottwinmaker:List*" ], "Resource": [ "arn:aws:iottwinmaker:us-east-1:account-id:workspace/workspace-name", "arn:aws:iottwinmaker:us-east-1:account-id:workspace/workspace-name/*" ] }, { "Effect": "Allow", "Action": "iottwinmaker:ListWorkspaces", "Resource": "*" } ] } You're now ready to start creating a data model for your workspace with your first entity. For instructions on how to do this, see Create your first entity. Create a workspace 19 AWS IoT TwinMaker User Guide Create your first entity To create your first entity, use the following steps. 1. On the Workspaces page, choose your workspace, and then in the left pane choose Entities. 2. On the Entities page, choose Create, and then choose Create entity. 3. In the Create an entity window, enter a name for your entity. This example uses a CookieMixer entity. 4. (Optional) Enter a description for your entity. 5. Choose Create entity, Entities contain data about each item in your workspace. You put data into entities by adding components. AWS IoT TwinMaker provides the following built-in component types. • Parameters: Adds a set of key-value properties. • Document: Adds a name and a URL for a document that contains information about the entity. • Alarms: Connects to an alarm time-series data source. Create your first entity 20 AWS IoT TwinMaker User Guide • SiteWise connector: Pulls time-series properties that are defined in an AWS IoT SiteWise asset. • Edge Connector for Kinesis Video Streams AWS IoT Greengrass: Pulls video data from the Edge Connector for KVS AWS IoT Greengrass. For more information, see AWS IoT TwinMaker video integration. You can see these component types and their definitions by choosing Component types in the left pane. You can also create a new component type on the Component types page. For more information about creating component types, see Using and creating component types. In this example, we create a simple document component that adds descriptive information about your entity. 1. On the Entities page, choose the entity, and then choose add component. 2. In the Add component window, enter a name for your component. Since this example uses a cookie mixer entity, we enter MixerDescription in the Name field. Create your first entity 21 AWS IoT TwinMaker User Guide 3. Choose Add a doc, then enter values for the doc Name and External Url. With the documents component, you can store a list of external URLs that contain important information about the entity. Create your first entity 22 AWS IoT TwinMaker 4. Choose Add component. User Guide You're now ready to create your first scene. For instructions on how to do this, see Creating and editing AWS IoT TwinMaker scenes. Setting up an AWS account If you do not have an AWS account, complete the following steps to create one. To sign up for an AWS account 1. Open https://portal.aws.amazon.com/billing/signup. 2. 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 a user, and use only the root user to perform tasks that require root user access. Sign up for an AWS account If you do not have an AWS account, complete the following steps to create one. To sign up for an AWS account 1. Open https://portal.aws.amazon.com/billing/signup. 2. 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 a user, and use only the root user to perform tasks that require root user access. Setting up an AWS account 23 AWS IoT TwinMaker User Guide AWS sends you a confirmation email after the sign-up process is complete. At any time, you can view your current account activity and manage your account by going to https://aws.amazon.com/ and choosing My Account. Create a user with administrative access After you sign up for an AWS account, secure your AWS account root user, enable AWS IAM Identity Center, and create an administrative user so that you don't use the root user for everyday tasks. Secure your AWS account root user 1. Sign in to the AWS Management Console as the account owner by choosing Root user and entering your AWS account email address. On the next page, enter your password. For help signing in by using |
twinmaker-guide-009 | twinmaker-guide.pdf | 9 | view your current account activity and manage your account by going to https://aws.amazon.com/ and choosing My Account. Create a user with administrative access After you sign up for an AWS account, secure your AWS account root user, enable AWS IAM Identity Center, and create an administrative user so that you don't use the root user for everyday tasks. Secure your AWS account root user 1. Sign in to the AWS Management Console as the account owner by choosing Root user and entering your AWS account email address. On the next page, enter your password. For help signing in by using root user, see Signing in as the root user in the AWS Sign-In User Guide. 2. Turn on multi-factor authentication (MFA) for your root user. For instructions, see Enable a virtual MFA device for your AWS account root user (console) in the IAM User Guide. Create a user with administrative access 1. Enable IAM Identity Center. For instructions, see Enabling AWS IAM Identity Center in the AWS IAM Identity Center User Guide. 2. In IAM Identity Center, grant administrative access to a user. For a tutorial about using the IAM Identity Center directory as your identity source, see Configure user access with the default IAM Identity Center directory in the AWS IAM Identity Center User Guide. Sign in as the user with administrative access • To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email address when you created the IAM Identity Center user. Create a user with administrative access 24 AWS IoT TwinMaker User Guide For help signing in using an IAM Identity Center user, see Signing in to the AWS access portal in the AWS Sign-In User Guide. Assign access to additional users 1. In IAM Identity Center, create a permission set that follows the best practice of applying least- privilege permissions. For instructions, see Create a permission set in the AWS IAM Identity Center User Guide. 2. Assign users to a group, and then assign single sign-on access to the group. For instructions, see Add groups in the AWS IAM Identity Center User Guide. Create a user with administrative access 25 AWS IoT TwinMaker User Guide Using and creating component types This topic walks you through the values and structures that you use to create an AWS IoT TwinMaker component type. It shows you how to create a request object that you can pass to the CreateComponentType API or by using the component type editor in the AWS IoT TwinMaker console. Components provide context for properties and data for their associated entities. Built-in component types In the AWS IoT TwinMaker console, when you choose a workspace and then choose Component types in the left pane, you see the following component types. • com.amazon.iotsitewise.resourcesync: A component type that automatically syncs your AWS IoT SiteWise assets and asset models and converts them into AWS IoT TwinMaker entities components and component types. For more information on using AWS IoT SiteWise asset sync, see Asset sync with AWS IoT SiteWise. • com.amazon.iottwinmaker.alarm.basic: A basic alarm component that pulls alarm data from an external source to an entity. This component doesn't contain a function that connects to a specific data source. This means that the alarm component is abstract and can be inherited by another component type that specifies a data source and a function that reads from that source. • com.amazon.iottwinmaker.documents: A simple mapping of titles to URLs for documents that contain information about an entity. • com.amazon.iotsitewise.connector.edgevideo: A component that pulls video from an IoT device using the Edge Connector for Kinesis Video Streams AWS IoT Greengrass component into an entity. The Edge Connector for Kinesis Video Streams AWS IoT Greengrass component is not an AWS IoT TwinMaker component, but rather a prebuilt AWS IoT Greengrass component that is deployed locally on your IoT device. • com.amazon.iotsitewise.connector: A component that pulls AWS IoT SiteWise data into an entity. • com.amazon.iottwinmaker.parameters: A component that adds static key-value pairs to an entity. • com.amazon.kvs.video: A component that pulls video from Kinesis Video Streams into an AWS IoT TwinMaker entity. Built-in component types 26 AWS IoT TwinMaker User Guide Core features of AWS IoT TwinMaker component types The following list describes the core features of component types. • Property definitions: The PropertyDefinitionRequest object defines a property that you can populate in the scene composer or it can be populated with data pulled from external data sources. Static properties that you set are stored in AWS IoT TwinMaker. Time-series properties and other properties that are pulled from data sources are stored externally. You specify property definitions inside a string to the PropertyDefinitionRequest map. Each string must be unique to the map. • Functions: The FunctionRequest object specifies a Lambda function that reads from and potentially |
twinmaker-guide-010 | twinmaker-guide.pdf | 10 | TwinMaker component types The following list describes the core features of component types. • Property definitions: The PropertyDefinitionRequest object defines a property that you can populate in the scene composer or it can be populated with data pulled from external data sources. Static properties that you set are stored in AWS IoT TwinMaker. Time-series properties and other properties that are pulled from data sources are stored externally. You specify property definitions inside a string to the PropertyDefinitionRequest map. Each string must be unique to the map. • Functions: The FunctionRequest object specifies a Lambda function that reads from and potentially writes to an external data source. A component type that contains a property with a value that is stored externally but that doesn't have a corresponding function to retrieve the values is an abstract component type. You can extend concrete component types from an abstract component type. You can't add abstract component types to an entity. They don't appear in the scene composer. You specify functions inside a string to FunctionRequest map. The string must specify one of the following predefined function types. • dataReader: A function that pulls data from an external source. • dataReaderByEntity: A function that pulls data from an external source. When you use this type of data reader, the GetPropertyValueHistory API operation supports only entity-specific queries for properties in this component type. (You can only request the property value history for componentName + entityId.) • dataReaderByComponentType: A function that pulls data from an external source. Core features of AWS IoT TwinMaker component types 27 AWS IoT TwinMaker User Guide When you use this type of data reader, the GetPropertyValueHistory API operation supports only cross-entity queries for properties in this component type. (You can only request the property value history for componentTypeId.) • dataWriter: A function that writes data to an external source. • schemaInitializer: A function that automatically initializes property values whenever you create an entity that contains the component type. One of the three types of data reader functions is required in a non-abstract component type. For an example of a Lambda function that implements time-stream telemetry components, including alarms, see the data reader in AWS IoT TwinMaker Samples. Note Because the alarm connector inherits from the abstract alarm component type, the Lambda function must return the alarm_key value. If you don't return this value, Grafana won't recognize it as an alarm. This is required for all components that return alarms. • Inheritance: Component types promote code reusability through inheritance. A component type can inherit up to 10 parent component types. Use the extendsFrom parameter to specify the component types from which your component type inherits properties and functions. • isSingleton: Some components contain properties, such as location coordinates, that can't be included more than once in an entity. Set the value of the isSingleton parameter to true to indicate that your component type can be included only once in an entity. Creating property definitions The following table describes the parameters of a PropertyDefinitionRequest. Parameter isExternalId Description A Boolean that specifies whether the property is a unique identifier (such as an AWS IoT Creating property definitions 28 AWS IoT TwinMaker Parameter isStoredExternally isTimeSeries isRequiredInEntity dataType defaultValue configuration User Guide Description SiteWise asset Id) of a property value that is stored externally. The default value of this property is false. A Boolean that specifies whether the property value is stored externally. The default value of this property is false. A Boolean that specifies whether the property stores time-series data. The default value of this property is false A Boolean that specifies whether the property must have a value in an entity that uses the component type. A DataType object that specifies the data type (such as string, map, list, and unit of measure) of the property. A DataValue object that specifies the default value of the property. A string-to-string map that specifies additiona l information that you need to connect to an external data source. Creating functions The following table describes the parameters of a FunctionRequest. Creating functions 29 AWS IoT TwinMaker Parameter implementedBy requiredProperties scope User Guide Description A DataConnector object that specifies the Lambda function that connects to the external data source. A list of properties that the function needs in order to read from and write to an external data source. The scope of the function. Use Workspace for functions with a scope that spans an entire workspace. Use Entity for functions with a scope that is limited to the entity that contains the component. For examples that show how to create and extend component types, see ???. Example component types This topic contains examples that show how to implement key concepts of component types. Alarm (abstract) The following example is the abstract alarm component type that appears in the AWS IoT |
twinmaker-guide-011 | twinmaker-guide.pdf | 11 | list of properties that the function needs in order to read from and write to an external data source. The scope of the function. Use Workspace for functions with a scope that spans an entire workspace. Use Entity for functions with a scope that is limited to the entity that contains the component. For examples that show how to create and extend component types, see ???. Example component types This topic contains examples that show how to implement key concepts of component types. Alarm (abstract) The following example is the abstract alarm component type that appears in the AWS IoT TwinMaker console. It contains a functions list that consists of a dataReader that has no implementedBy value. { "componentTypeId": "com.example.alarm.basic:1", "workspaceId": "MyWorkspace", "description": "Abstract alarm component type", "functions": { "dataReader": { "isInherited": false } }, Example component types 30 User Guide AWS IoT TwinMaker "isSingleton": false, "propertyDefinitions": { "alarm_key": { "dataType": { "type": "STRING" }, "isExternalId": true, "isRequiredInEntity": true, "isStoredExternally": false, "isTimeSeries": false }, "alarm_status": { "dataType": { "allowedValues": [ { "stringValue": "ACTIVE" }, { "stringValue": "SNOOZE_DISABLED" }, { "stringValue": "ACKNOWLEDGED" }, { "stringValue": "NORMAL" } ], "type": "STRING" }, "isRequiredInEntity": false, "isStoredExternally": true, "isTimeSeries": true } } } Notes: Values for componentTypeId and workspaceID are required. The value of componentTypeId must be unique to your workspace. The value of alarm_key is a unique identifier that a function can use to retrieve alarm data from an external source. The value of the key is required and stored in AWS IoT TwinMaker. The alarm_status time series values are stored in the external source. More examples are available in AWS IoT TwinMaker Samples. Alarm (abstract) 31 AWS IoT TwinMaker Timestream telemetry User Guide The following example is a simple component type that retrieves telemetry data about a specific type of component (such as an alarm or a cookie mixer) from an external source. It specifies a Lambda function that component types inherit. { "componentTypeId": "com.example.timestream-telemetry", "workspaceId": "MyWorkspace", "functions": { "dataReader": { "implementedBy": { "lambda": { "arn": "lambdaArn" } } } }, "propertyDefinitions": { "telemetryType": { "dataType": { "type": "STRING" }, "isExternalId": false, "isStoredExternally": false, "isTimeSeries": false, "isRequiredInEntity": true }, "telemetryId": { "dataType": { "type": "STRING" }, "isExternalId": false, "isStoredExternally": false, "isTimeSeries": false, "isRequiredInEntity": true } } } Alarm (inherits from abstract alarm) The following example inherits from both the abstract alarm and the timestream telemetry component types. It specifies its own Lambda function that retrieves alarm data. Timestream telemetry 32 AWS IoT TwinMaker { "componentTypeId": "com.example.cookiefactory.alarm", User Guide "workspaceId": "MyWorkspace", "extendsFrom": [ "com.example.timestream-telemetry", "com.amazon.iottwinmaker.alarm.basic" ], "propertyDefinitions": { "telemetryType": { "defaultValue": { "stringValue": "Alarm" } } }, "functions": { "dataReader": { "implementedBy": { "lambda": { "arn": "lambdaArn" } } } } } Note Because the alarm connector inherits from the abstract alarm component type, the Lambda function must return the alarm_key value. If you don't return this value, Grafana won't recognize it as an alarm. This is required for all components that return alarms. Equipment examples The examples in this section show how to model potential pieces of equipment. You can use these examples to get some ideas about how to model equipment in your own processes. Equipment examples 33 AWS IoT TwinMaker Cookie mixer User Guide The following example inherits from the timestream telemetry component type. It specifies additional time-series properties for a cookie mixer's rotation rate and temperature. { "componentTypeId": "com.example.cookiefactory.mixer", "workspaceId": "MyWorkspace", "extendsFrom": [ "com.example.timestream-telemetry" ], "propertyDefinitions": { "telemetryType": { "defaultValue" : { "stringValue": "Mixer" } }, "RPM": { "dataType": { "type": "DOUBLE" }, "isTimeSeries": true, "isStoredExternally": true }, "Temperature": { "dataType": { "type": "DOUBLE" }, "isTimeSeries": true, "isStoredExternally": true } } } Water tank The following example inherits from the timestream telemetry component type. It specifies additional time-series properties for a water tank's volume and flow rate. { "componentTypeId": "com.example.cookiefactory.watertank", "workspaceId": "MyWorkspace", "extendsFrom": [ "com.example.timestream-telemetry" ], Equipment examples 34 AWS IoT TwinMaker "propertyDefinitions": { "telemetryType": { "defaultValue" : { "stringValue": "WaterTank" } User Guide }, "tankVolume1": { "dataType": { "type": "DOUBLE" }, "isTimeSeries": true, "isStoredExternally": true }, "tankVolume2": { "dataType": { "type": "DOUBLE" }, "isTimeSeries": true, "isStoredExternally": true }, "flowRate1": { "dataType": { "type": "DOUBLE" }, "isTimeSeries": true, "isStoredExternally": true }, "flowrate2": { "dataType": { "type": "DOUBLE" }, "isTimeSeries": true, "isStoredExternally": true } } } Space location The following example contains properties, the values of which are stored in AWS IoT TwinMaker. Because the values are specified by users and stored internally, no function is required to retrieve them. The example also uses the RELATIONSHIP data type to specify a relationship with another component type. This component provides a lightweight mechanism for adding context to a digital twin. You can use it to add metadata indicating where something is located. You can also use this information in logic used for determining which cameras can see a piece of equipment |
twinmaker-guide-012 | twinmaker-guide.pdf | 12 | true, "isStoredExternally": true } } } Space location The following example contains properties, the values of which are stored in AWS IoT TwinMaker. Because the values are specified by users and stored internally, no function is required to retrieve them. The example also uses the RELATIONSHIP data type to specify a relationship with another component type. This component provides a lightweight mechanism for adding context to a digital twin. You can use it to add metadata indicating where something is located. You can also use this information in logic used for determining which cameras can see a piece of equipment or space, or for knowing how to dispatch someone to a location. { Equipment examples 35 AWS IoT TwinMaker User Guide "componentTypeId": "com.example.cookiefactory.space", "workspaceId": "MyWorkspace", "propertyDefinitions": { "position": {"dataType": {"nestedType": {"type": "DOUBLE"},"type": "LIST"}}, "rotation": {"dataType": {"nestedType": {"type": "DOUBLE"},"type": "LIST"}}, "bounds": {"dataType": {"nestedType": {"type": "DOUBLE"},"type": "LIST"}}, "parent_space" : { "dataType": {"type": "RELATIONSHIP"}} } } Equipment examples 36 AWS IoT TwinMaker User Guide AWS IoT TwinMaker bulk operations Use a metadataTransferJob to transfer and manage your AWS IoT TwinMaker resources at scale. A metadataTransferJob allows you to perform bulk operations and transfer resources between AWS IoT TwinMaker and AWS IoT SiteWise and Amazon S3. You can use bulk operations in the following scenarios: • Mass migration of assets and data between accounts, for example migrating from a development account to a production account. • Large scale asset management, such as uploading, and editing AWS IoT assets at scale. • Mass import of your assets into AWS IoT TwinMaker and AWS IoT SiteWise. • Bulk import of AWS IoT TwinMaker entities from existing ontology files such as revit or BIM files. Topics • Key concepts and terminology • Performing bulk import and export operations • AWS IoT TwinMaker metadata transfer job schema Key concepts and terminology AWS IoT TwinMaker bulk operations use the following concepts and terminology: • Import: The action of moving resources into an AWS IoT TwinMaker workspace. For example, from a local file, a file in an Amazon S3 bucket, or from AWS IoT SiteWise to an AWS IoT TwinMaker workspace. • Export: The action of moving resources from an AWS IoT TwinMaker workspace to a local machine or an Amazon S3 bucket. • Source: The starting location from where you want to move resources. For example, an Amazon S3 bucket is an import source, and an AWS IoT TwinMaker workspace is an export source. • Destination: The desired location where you want to move your resources to. Key concepts and terminology 37 AWS IoT TwinMaker User Guide For example, an Amazon S3 bucket is an export destination, and an AWS IoT TwinMaker workspace is an import destination. • AWS IoT SiteWise Schema: A schema used to import and export resources to and from AWS IoT SiteWise. • AWS IoT TwinMaker Schema: A schema used to import and export resources to and from AWS IoT TwinMaker. • AWS IoT TwinMaker top-level resources: Resources used in existing APIs. Specifically, an Entity or a ComponentType. • AWS IoT TwinMaker sub-level resources: Nested resource types used in metadata definitions. Specifically, a Component. • Metadata: Key information required to successfully import or export AWS IoT SiteWise and AWS IoT TwinMaker resources. • metadataTransferJob: The object created when you run CreateMetadataTransferJob. AWS IoT TwinMaker metadataTransferJob functionality This topic explains the behavior AWS IoT TwinMaker follows when you run a bulk operation– how a metadataTransferJob is processed. It also explains how to define a schema with the metadata required to transfer your resources. AWS IoT TwinMaker bulk operations support the following functionality: • Top-level resource create or replace: AWS IoT TwinMaker will create new resources or replace all existing resources that are uniquely identified by a resource ID. For example, if an entity exists in the system, the entity definition will be replaced by the new one defined in the template under the Entity key. • Sub-resource create or replace: From the EntityComponent level, you can only create or replace a component. The entity must already exist, otherwise, the action will produce a ValidationException. From the property or relationship level, you can only create or replace a property or relationship, and the containing EntityComponent must already exist. • Sub-resource delete: AWS IoT TwinMaker metadataTransferJob functionality 38 AWS IoT TwinMaker User Guide AWS IoT TwinMaker also supports sub-resource deletion. A sub-resource can be a component, property, or relationship. If you want to delete a component, you must do it from the entity level. If you want to delete a property or relationship, you must do it from the Entity or EntityComponent level. To delete a sub-resource, you update the higher level resource and omit the definition of the sub-resource. • No top-level resource deletion: AWS IoT TwinMaker will never delete top-level resources. A top- level resource refers |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.