Technology is changing very rapidly now. You can design, develop and make your application up and available within minutes(depends how quick you are at designing and coding).
I came across LEX recently. It is very easy to create your chatbot within minutes. You can teach your chatbot and then integrate with other services to deliver the desired result.
I have created a chatbot which helps you to start and stop AWS instance just by using chat. I have integrated this with Facebook chat, slack and twilio also. It is very easy.
Let’s get started.
Before you start you will need aws account. You can create free tier account here.
Login to you aws account and search for LEX service.
Select Create, on next screen you can create your own custom bot or select one of given samples for your understanding.
Let’s click on “Custom Bot”. Under that there is text box for bot name, enter StartStopBot as bot name.
Leave other options as default and select create at end. A new IAM role would be created with required permissions.
I have created a lambda function which you can find here.
You need to create two intents StartServer and StopServer. For StartServer screenshot are below same needs to be done for StopServer.
Please note the lambda function we created earlier is integrated here. Same function is called in both StartServer anf StopServer.
Once you have configured you can start chatting with your bot.
Server is started 🙂
Now let us stop server.
Server is stopped 🙂
I hope you enjoyed this.
Happy coding 🙂