Second exercise! Good job!
In this exercise you should create and read logs from your chatbot. Knowing how to log is useful, in case you make some mistakes long the way.
In this exercise, your task is to set console.log
as your log
function. Then on the beginning of your chatbot, invoke it and pass some log message, such as "Logging from Starman bot!".
Then open your browser and go to AWS web console. There open up your AWS CloudWatch service and find your chatbot Lambda logs.
Here are a few tips that can help you to do this exercise:
- You can use CloudWatch from AWS Web Console.
- You can also access CloudWatch logs using AWS CLI, using
aws logs get-log-events
andaws logs filter-log-events
commands. - Add
help
option to the AWS CLI command to see command usage. For example,aws logs get-log-events help
will show you the info aboutget-log-events
command. - To update your chatbot code use the
claudia update
command.
You can see our solution in a code section of this repository.
or go back.