Amazon Connect - cannot debug error in Get Customer Input Stage - amazon-web-services

I am just new to Amazon Connect and Lex and have just starting creating simple projects. I already have created an entire contact flow which uses Lex and Lambda for routing. Problem is in the "Get Customer Input" stage, it seems to always go to the error output and I could not figure out why. I tried to check if there's any way I can find logs for each stages in the contact flow but could not find any.
Can anyone help me solve this issue? I need to see logs to find out the cause of the error.
EDIT: I got the contact flow logs from cloudwatch. See below. I can't find any significant error from it.
{
"Results": "Error",
"ContactId": "<contact-id>",
"ContactFlowId": "<the contact flow id>",
"ContactFlowModuleType": "GetUserInput",
"Timestamp": "2019-07-08T08:27:01.185Z"
}

You might be getting error because you are getting error from your Lex and that is why the flow is going in error.
You can check the logs for connect and Lex in Amazon service - Amazon CloudWatch.
You can also provide details from logs/screenshot what exactly error you are getting, so that I can help.

This might be due to language settings mismatch.
If you're using LexV2 make sure you set the proper Language Attribute as well. Easiest way is using the set Voice block in your Contact Flow, on the very bottom of the block you can enable "set language attribute".
Original answer: https://repost.aws/questions/QUn9bLLnclQxmD_DMBgfB9_Q/amazon-connect-error-using-lex-as-customer-input

Related

Amazon Connect error using Lex as customer input

I am trying to create a demo call centre using AWS connect.
Part of my contact flow makes use of the "Get Customer Input", as I want to use an Amazon lex bot. I have created to divert to a specific working queue. For example, if the user says "sales" they should be directed to the sales queue.
I have tested the Lex bot within the Lex console and it works as intended.
However when testing the Lex integration within AWS connect it will always follow the "error" path on the block after a user says something on the phone.
Here is the CloudWatch log showing the Error result of the module.
{
"Results": "Error",
"ContactFlowName": "Inbound Flow",
"ContactFlowModuleType": "GetUserInput",
"Timestamp": "2022-02-12T18:06:10.940Z"
}
Here is the contact flow:
Here is the settings for the "Get Customer Input Block":
Here is a test of the Lex bot in the Lex dashboard:
Any help would be greatly appreciated.
Turns out the solution was if you're using LexV2 make sure you set the proper Language Attribute as well. Easiest way is using the set Voice block in your Contact Flow, on the very bottom of the block you can enable "set language attribute".

Google Cloud Alert Policies - Include Error Message Within Documentation Body

I can't seem to find much information on this one. I have a requirement to include the error message body in the email alert that is sent out when the GCP alert policy is triggered.
Now I can see from the documentation page that certain variables can be added relating to the policy itself but does anyone know of any easy way to parse the log contents failure payload and pass it? This may be a failure of understanding on my part.
What I have tried is to setup a cloud function that raises an error with a specific message whenever the http request is made. I have setup a policy on the logs for this function that trigger for the error severity. This works fine but what I can't do is parse the error message in the email alert body. Does anyone know of a good work around for this or am I missing something?

How can I opt back in to receive SMS messages via Amazon Pinpoint

As part of some testing that I was doing, I replied STOP to an SMS message that was sent via Amazon's Pinpoint service. I received the acknowledgement that I had been removed from further notifications.
I want to opt back in to receiving those messages, but I can't figure out how to do that. I looked at the Pinpoint documentation and I did not see a way to do it. I looked in the Amazon Pinpoint Console and I did not see a way to remove a number from the blacklist. I have tried the standard terms that other SMS providers use such as UNSTOP, UNBLOCK, and START, but none of those work either. Does anyone have any suggestions. I do not want to contact Amazon support about this unless I have to.
As described here: https://docs.aws.amazon.com/cli/latest/reference/sns/opt-in-phone-number.html
aws sns opt-in-phone-number --phone-number ###-###-####
You can also use AWS Console -> Amazon SNS -> Mobile -> Text Messaging(SMS) section to see a list of opt-out phone numbers that was done through Pinpoint and choose to opt-in these numbers...
AWS Pinpoint has not come up with the APIs to check if the number is opted out or not. You can use the AWS SNS APIs for checking this as well for marking a mobile number as active again.
I've been trying to figure this out as well and I think I have a solution from a set of documentation I found about setting up Pinpoint. Below is python pseudocode; from my understanding we just have to update the "OptOut" status for the endpoint (i.e. the phone number that originally opted out).
# Python pseudo code with comments
import boto 3
import datetime
pinpoint = boto3.Session(**login_kwargs).client("pinpoint")
opt_in_response = pinpoint.update_endpoint(
ApplicationId="<App ID from your project>",
EndpointId="<Endpoint you are updating>", # Same as your phone number?
EndpointRequest={
"Address": "<Phone you are updating>",
"ChannelType": 'SMS',
"OptOut": "NONE", # Change from "ALL" (which is opt-out) to "NONE", opt-in
"EffectiveDate": datetime.datetime.utcnow().isoformat(),
"Attributes": {
"OptInTimestamp": [datetime.datetime.utcnow().isoformat()]
}
}
)
I attempted to follow this documentation https://docs.aws.amazon.com/pinpoint/latest/developerguide/pinpoint-dg.pdf (the relevant stuff starts on page 92), which happens to not be in Python.
I wasn't successful but I'm pretty sure this is how you should be able to opt back in (if anyone who knows node.js can verify this solution that'd be awesome).

AWS Lambda cloudwatch logs throw "Failed to load events" error

I have a lambda function with the following permissions
whenever the lambda function is triggered, I see a log file being added to the logstream in cloudwatch.
When I try to open any of the logs, it throws Failed to load events
Unexpected error loading events error. Please help with fixing the issue.
I had the same error. The issue was: my 'Authorization' header has been modified. In my case — I added it using chrome extension for the testing purposes
For what it's worth, I saw the same error using Firefox but got the expected results using Chrome. So use Chrome to view CloudWatch.
This just happened to me. I suspect it had something to do with AWS's recent DNS issues. I had to go into my router's settings and change from dynamic DNS to static DNS. I used servers 1.0.0.1 and 1.1.1.1. Hope this helps someone!

AWS Elastic Beanstalk GUI: Query failed to deserialize response

after running AWS Elastic Beanstalk application for few weeks suddenly I can't open my application. Page simply displays an error which doesn't provide much information how to fix it.
Error
A problem occurred while loading your page: AWS Query failed to deserialize response
(and there is no more information, Googling also haven't found any answer)
So before updating my subscription and starting paying to Amazon not insignificant amount of money for being able to contact their technical support I thought I will ask here first if someone here encountered this issue.
Thanks for any suggestions.
After receiving this generic error, I was able to dig into the actual error message by using the EB CLI. In my case the CLI threw "ZIP does not support timestamps before 1980".