question

newuser-1d3f7e25-2577-499f-b614-4a6cf03b2649 avatar image

Lambda function is not invoked when i press "discover devices"

I followed this instruction:
https://developer.amazon.com/docs/smarthome/steps-to-build-a-smart-home-skill.html
I followed it twice to be sure that i didn't miss something.
I've stack at the: Test your skill, item 5. When i press "DISCOVER DEVICES" nothing happened. Also i expect that i should see that my skill tried to invoke my lambda function in CloudWatch in AWS. No logs there.

P.S. Again, i've read the instruction and checked that:
- my skill have right lambda ARN
- add and configured Alexa Smart Home to lambda triggers
- My lambda region is N. Virginia, skill lang is English(us), i provided same ARN's for default and North America
- i implement account linking (Login with Amazon). Not sure that i did everything right here, but it liked, and that's it, right?

alexa smart homelambdasmart home
2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

can it be somehow connected with that fact that i'm trying to test it from Asia?

0 Likes 0 ·
KAIYIN@AMAZON.COM avatar image KAIYIN@AMAZON.COM newuser-1d3f7e25-2577-499f-b614-4a6cf03b2649 ·

How did you test it? Did you create another test account from any Asian region amazon.com or did you test under the same development account from your skill?

0 Likes 0 ·
newuser-87d8771e-af27-42cb-a9ec-942624492b23 avatar image
newuser-87d8771e-af27-42cb-a9ec-942624492b23 answered

On Lambda function, you print out all the requests received, and you should be able to see the request for device discovery.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nathan avatar image
Nathan answered

One thing that I was caught on was that the region of the Alexa device must also be set to match the endpoint of the lambda expression. For example my Alexa is set to Australian region and the matching lambda must then be in the US West (Oregon) region for it to be called. Might want to check the region setting on your Alexa to ensure they match.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-f177bb6f-f288-48bd-8c33-771946f19a3f avatar image
newuser-f177bb6f-f288-48bd-8c33-771946f19a3f answered

i am from asia as well. i had the same problem as well. what i did was copy pasted same aws lambda code for several regions. useast uswest eu and ap as well.


then provided the ARN of the lambda functions to the Smart home skill ARN fields. Got it to working. For some reason the Virginia server is used by my Home skill.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.