I am trying to get my lambda function to run in AWS. I am using the PyAlexa Skill Kit.
I created a test skill for Alexa using the PyAlexa Skill kit. This kit simply creates the necessary files and structure you need for aws lambda function for you. It also generates some basic test utterances and sample intent files to get you started.
The problem I am having is with the aws lambda function. I noticed that the script zips everything with deployment_n with n being increment number in front of the files name, which I assume is a version. Then there is a main.py and a AlexaHandler.py file. It also includes the files for pyalexa-skill and version.
The problem I am having is my main call to the base handler in main.py is returning an error that the module for main doesn't exists. After investigation it said this is a naming issue, so I'm confused to where the problem is. I've tried deployment_1main.lambda_function and I've tried main.lambda_function so im not sure how it is named wrong. Any thoughts?
Video on the package here:
https://www.youtube.com/watch?v=O-NaTeq_35s
my main.py code
import logging
from AlexaHandler import AlexaDeploymentTestHandler
# Main entry point for the Lambda function.
# In the AWS Lamba console, under the 'Configuration' tab there is an
# input field called, 'Handler'. That should be: main.lambda_handler
# Handler: main.lambda_handler
# Role: lambda_basic_execution
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def lambda_handler(event, context):
logging.info("Executing main lambda_handler for YourDeploymentHandler class")
deployment_handler = AlexaDeploymentTestHandler()
handler_response = deployment_handler.process_request(event, context)
return handler_response