NOTE: This is a fork of VoiceFoundry's GitHub repository that addresses deployment issues reported by users and provides ability to address any future user concerns.
This is a sample project that demonstrates using Amazon Translate with Amazon Connect chat to perform real-time translation on chat messages, allowing a user to support dozens of languages. The web app supports multi-chat allow an Amazon Connect Chat user to support multiple languages concurrently. Deployment is using the Amplify UI (No CLI access required) and is using serverless architecture. Deployment takes about 10 minutes.
Read the Amazon blog: https://www.amazon.com/livechattranslate
amazon-connect-chat-translate
Next: Permissions
> Next: Tags
> Next: Review
finally Create role
Create new environment
for backendEnvironment variables
and add the following:
REACT_APP_CONNECT_REGION
= AWS Region
(Example eu-west-2
)REACT_APP_CONNECT_INSTANCE_URL
= Amazon Connect URL
(Example https://<<INSTANCE_NAME>>.awsapps.com
or https://<<INSTANCE_NAME>>.my.connect.aws
)[Important, if you copy and paste, ensure there are no trailing whitespaces in the above 2 variable keys, or values. This will cause the web app to not load CCP and a rebuild will be required]
It will take about 10 minutes for the application to deploy. After successful deployment, add the hosting URL to the Amazon Connect Approved Origin list to allow the web application to embed the CCP as an iFrame.
Approved origins
then + Add origin
Add
(Example URL https://main.d13aaabbbccc.amplifyapp.com
; remove the trailing '/')https://<yourConnectInstanceURL>/connect/test-chat
)connectChatTranslate
connectChatTranslate
custom terminologies with the updated CSVx_lang
if set then the language will be set accordingly. (Supported languages for translation: https://docs.aws.amazon.com/translate/latest/dg/what-is.html)x_lang
contact attribute is set, the FIRST message from the customer will be used to perform language detection using Amazon Comprehend. (Supported languages for detection: https://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html)'en'
All the services used are included within the AWS Free tier offer. However, should you exceed this you will be charged for the services consumed. Please see the clean up section to delete all deployed infrastructure.
Outside of free tier you will be charged for the consumption of the services used. For example.
Amazon Connect Pricing for chat is : $0.004 per message Amazon Translate Pricing : $15 per million characters Amazon API Gateway : $1 per per million requests AWS Lambda : $0.20 per million requests AWS Amplify : $0.01 per build minute and $0.23 per GB stored per month and $0.15 per GB served
Therefore a very approximate cost for 100 users for a month, handling 59 chats per day each for 21 days (a month) we have:
Service | Costs (Month) |
---|---|
Amacon Connect Chat | $8,400.00 |
Amazon Translate | $425.25 |
Amazon Comprehend | $63.00 |
Amazon API Gateway | $2.10 |
AWS Lambda | $0.22 |
Amplify Build | $0.08 |
Amplify Hosting | $0.01 |
Amplify Served | $0.37 |
Total (124k chats) | $8,891.03 |
Assumptions.
Within the amplify UI navigate to your app, on the top right select Actions
and then Delete app
.