- Newest
- Most votes
- Most comments
This issue with your Alexa Smart Home Skill Lambda function appears to be related to request validation or handling of specific percentage values.
For Alexa Smart Home Skills, it's important to validate all request and response payloads against the JSON schema for all possible Alexa Smart Home messages. The inconsistent behavior with specific percentage values (2%, 5%, 7%, 25%, 50%, 55%, 77%) suggests there might be an issue with how these values are being processed or validated.
A few things to check:
-
Ensure your Lambda function timeout is set to less than eight seconds, as the Alexa Service has an eight-second timeout. If your function takes too long to process certain percentage values, it might result in the error you're seeing.
-
Validate your request and response payloads against the JSON schema for Alexa Smart Home messages. There might be an issue with how specific percentage values are being handled in your code.
-
Check if there's any conditional logic in your code that might be treating these specific percentage values differently.
-
Consider using the skill beta testing tool to collect feedback and test these specific percentage values more systematically.
-
If you're storing state in DynamoDB, ensure your table is configured optimally. For skills with heavy reads, consider using DynamoDB Accelerator (DAX) to improve response times.
Since the Lambda logs don't show errors during these failed attempts, the issue might be occurring before your code is executed or in how Alexa is interpreting the responses from your Lambda function. The fact that retrying sometimes works suggests there might be a timing or race condition issue.
Sources
Alexa skills - Serverless Applications Lens
Relevant content
- asked a year ago
- asked 3 years ago
- AWS OFFICIALUpdated 3 years ago
