Reputation: 6004
I'm using the online based Amazon Alexa Console test suite and AWS Lambda for the development of an Alexa skill. How to access the content of console.log('STATE: ' + stateAbbreviation)
?
Lambda Function Code:
function getSmallImage(stateAbbreviation) {
console.log('STATE: ' + stateAbbreviation);
return getImageUrl(400, 720, stateAbbreviation);
}
Upvotes: 5
Views: 4841
Reputation: 4387
CloudWatch is the one which you are looking for.
Each time when a Lambda code is executed in response to an event, it writes a log entry into the log group associated with a Lambda function, which is /aws/lambda/<function name>
. You can access this log entry using CloudWatch.
To access CloudWatch:
If you are under development and is using the in-line code editor of Lambda function, you can make use of Test feature to create a test event. In case of Alexa, you can create test events with the request JSON of Alexa. And when you fire a test event the Lambda function gets executed and the logs will be displayed right inside Execution Results tab of the code editor.
Upvotes: 5