rp346
rp346

Reputation: 7058

AWS Alexa Smart Home regular expression mismatch

I am setting up Alexa Skills for Alexa Smart Home through UI with following confirmation enter image description here

When I hit save, I get following error

 - String instance with value
   "arn:aws:lambda:us-west-2:123456789012:function:ab-xyz-alexa-qa:7" at
   property path "$.manifest.apis.smartHome.regions.NA.endpoint.uri"
   does not match the regular expression:
   "arn:aws:lambda:us-east-1:[0-9]{12}:function:[a-zA-Z0-9-_]+(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?(:[a-zA-Z0-9-_]+)?".


 - Please make sure that "Alexa Smart Home" is selected for the event   
   source type, for provided arn [Invalid value] :   
   arn:aws:lambda:us-west-2:123456789012:function:ab-xyz-alexa-qa:7

What is wrong in this setup ?

Upvotes: 1

Views: 614

Answers (1)

KirkC
KirkC

Reputation: 306

When it comes to smart home skills specifically, Alexa is very picky.

The AWS region being used by your Lambda function is us-west-2, which is not supported for the "North America" box. For the "North America" box your AWS Lambda function must reside in US East (N. Virginia), which is us-east-1.

https://developer.amazon.com/en-US/docs/alexa/smarthome/develop-smart-home-skills-in-multiple-languages.html#deploy

To fix this then, you'll want to sign into the AWS Console, click the region dropdown menu in the upper-right, choose "US East (N. Virginia)", and re-create your Lambda function there and add the "Alexa Smart Home" trigger. Once that new Lambda function is created, use the ARN of that new Lambda function, located in us-east-1, in the "North America" box instead.

Upvotes: 3

Related Questions