1
votes

I am using Amazon Lex and AWS Lambda (implemented in Python 3.6) to build and interact with a chat bot.

So far, my workflow has been creating an example Lex response that is passed to my Lambda function. I "invoke" (not being run on anywhere other than my machine) the Lambda function locally and then inspect the result.

However, this workflow doesn't scale very well. I need to be able to mock Amazon Lex so that I can interact with it locally and inspect the response for local debugging.

Does anyone know of an Amazon Lex mock or any ideas on how to get an instance of Lex running on my local machine? Many thanks in advance.

1
you could use placebo to record and playback API calls github.com/garnaat/placebo Not sure how well it would work with Lex however. Give it a try, it might fit some test cases - Vorsprung
Thanks @Vorsprung! I'm going to take a look at this :) - blakeyoder

1 Answers

1
votes

You can't download the copy of Amazon Services when you need to test it locally.

I guess you have to rethink your testing strategy. Check out how to test Amazon Lex bot in the next article - Test a Bot

BTW: it is possible to mock a lot of other Amazon Services with Moto.