Closed arshadcomp closed 6 years ago
Hey there, have you tried configuring your Timeout under Basic settings in Lambda? This link has AWS Lambda Setup and under instruction 11, it says 'Increase the Timeout to 30 seconds under Basic Settings.'
Let me know if you still have issues!
Yeah Thanks. Figured it out. The default timeout of 3 sec is too small.
I tried to run the sample code for Address API. Compiled it using Maven and uploaded it on AWS Lambda as per the instruction with the application ID for my skill. But the code is being timed out every time I run without any errors from the code. Here is the sample JSON:
{ "session": { "new": true, "sessionId": "SessionId.f5824a2e-ece5-403a-bfc6-2a722611baa1", "application": { "applicationId": "amzn1.ask.skill.cc13bce0-b434-44bd-8d0f-882fbd8c338f" }, "attributes": {}, "user": { "userId": "amzn1.ask.account.AHSRKEKDLTZTT35FBCMMFO744Z4YZJ45FLAJOPWT5SH7F4ZTZOM6H43LDO6SM6ZAKJ7C5DKQQNWUP33VVXZDFDABKTV2BW2ESW2C3KML7W6Z4CHYMLUJMV7O2HSLCPL6PYJX4N6FYBATSG2MOKHSJ2WLQMGVJDUR2IGPGQK2TKIQQNZBPDN3XMBFMVLJF6OCH4Z5DARRSSTPDBQ" } }, "request": { "type": "IntentRequest", "requestId": "EdwRequestId.71352e81-49f4-4d44-9222-f8111283f7c0", "intent": { "name": "GetAddress", "slots": {} }, "locale": "en-US", "timestamp": "2018-03-01T11:17:21Z" }, "context": { "AudioPlayer": { "playerActivity": "IDLE" }, "System": { "application": { "applicationId": "amzn1.ask.skill.cc13bce0-b434-44bd-8d0f-882fbd8c338f" }, "user": { "userId": "amzn1.ask.account.AHSRKEKDLTZTT35FBCMMFO744Z4YZJ45FLAJOPWT5SH7F4ZTZOM6H43LDO6SM6ZAKJ7C5DKQQNWUP33VVXZDFDABKTV2BW2ESW2C3KML7W6Z4CHYMLUJMV7O2HSLCPL6PYJX4N6FYBATSG2MOKHSJ2WLQMGVJDUR2IGPGQK2TKIQQNZBPDN3XMBFMVLJF6OCH4Z5DARRSSTPDBQ" }, "device": { "supportedInterfaces": {} } } }, "version": "1.0" }
and this is the response from AWS. I have set the handler as com.amazon.asksdk.address.DeviceAddressSpeechletRequestStreamHandler. :
START RequestId: d0144658-1d57-11e8-937a-712851130d1f Version: $LATEST END RequestId: d0144658-1d57-11e8-937a-712851130d1f REPORT RequestId: d0144658-1d57-11e8-937a-712851130d1f Duration: 3002.40 ms Billed Duration: 3000 ms Memory Size: 128 MB Max Memory Used: 37 MB 2018-03-01T13:52:46.055Z d0144658-1d57-11e8-937a-712851130d1f Task timed out after 3.00 seconds
Cannot figure out the reason as there is no error from the DeviceAddressSpeechletRequestStreamHandler class.