satvik kushwaha avatar image
satvik kushwaha asked

Smart Home skill unable to invoke lambda function

Smart home skill is not invoking lambda function , account linking is setup with firebase and working. Access token is also available when using custom model (scratch) . But when use smart home skill the cloudwatch have no logs , lambda function runs on test panel in aws lambda function .

I have used device discovery for this , but no results.

I have my alexa in english US and my lambda function in us-east-1 still it is not working .

alexaalexa smart homelambdadevice 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.

1 Answer

KirkC@Amazon avatar image
KirkC@Amazon answered

Normally in these cases, the root cause is that the Amazon account used to sign into your Echo device and Alexa app, is not associated with a "marketplace" correlating to the language of the skill.

Smart home skills are rather picky in this way. If for example I created an English (UK) smart home skill, but the Amazon account I used to sign into the Alexa app to configure my device is associated with the United States, then Alexa will still try to route my request to the "North America" endpoint (US East N. Virginia) for the skill, even if no such endpoint exists. The result is that when I try to check the CloudWatch logs for my Lambda function located in EU West (Ireland), there won't be any record at all as the Lambda function was never invoked.

In this case, because the skill is English (US), I suspect the inverse may be happening and that the Amazon account used to test the skill is not associated with the United States. You can update which country your Amazon account is associated with for testing purposes by doing the following:

  1. Sign into your Amazon retail account
  2. Navigate to the "Content and Devices" section of your account:
  3. Click "Preferences"
  4. Click "Country/Region Settings"
  5. Click "Change"
  6. Enter a new address located in the United States
  7. Click "Update"

Once that's been done, go ahead and try testing your smart home skill again. If this was the only issue at hand, you should see that your Lambda function located in US East (N. Virginia) is now successfully invoked.

Now, because these issues tend to be account specific, if further assistance is necessary I'd ask that you contact us directly using our contact us form here. That way, we'll be able to find information specific to your account and 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.