Testing Our Serverless Slack Dicebot with Docker Locally

As we did in the Test hello_world step above, let's test our new events!

Remember to execute this command from the dicebot directory, and not the first_function or events directory!

Great, so the output shows a statusCode of 200 was returned when valid input was given, and statusCode of 400 when invalid input was given. If the function was to fail for a reason besides invalid input or output, we would expect to see a status code of 500 returned. If that happens, it means we messed up somewhere in our function code and need to check the log output!

Deploy dicebot to AWS#

Since we already did the initial deployment for (#hello-world-deploy], this section will actually be an update to that deployment, but the commands are exactly the same.

From the dicebot directory, re-package this update first.

This lesson preview is part of the Create a Serverless Slackbot with AWS Lambda and Python course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

Unlock This Course

Get unlimited access to Create a Serverless Slackbot with AWS Lambda and Python, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course Create a Serverless Slackbot with AWS Lambda and Python