Alexa — Deploy my service !!!

Ritresh Girdhar
6 min readMay 18, 2020

Doesn’t it sound cool 😎 !! . How we have improvised our DevOps culture by utilising Alexa.

Photo by Grant Ritchie on Unsplash

Recently we had a requirement to enable 360 degree digitisation and End to End business automation for one of our clients.

The application was for a Retail business which was supposed to be widely used by the customers/cashiers/distributors. The client had four squads who were adding incremental features in the application. They also had SREs & Operation team to support production applications, databases and servers (on premise plus hosted on cloud) apart from providing support to the business and analytics team in fetching daily feeds and reports generation. Team was spending lot of time and effort in generating these customized reports.

Want to read this story later? Save it in Journal.

Rapid Response Force — we tried to meet the above requirement with a different approach. Instead of deploying more workforce, we created teams of senior full stack developers who had a sound experience in different technologies/domain and named it as Rapid Response Force(s). I was also a part of one of the RRFs.

The core responisibility of the RRF team was to automate and streamline the processes by eliminating the NVAs.

In this article I will walk you through the automation initiatives taken which had a humungous impact on the cycle time of the project.

Improvisation of DevOps

DevOps played one of the major roles in digitisation. We enabled CI/CD pipeline to maintain the code in deployable state.

Also, we created a report generation framework (with UI) to help the business/program and stake holders to generate reports as per their requirement.

RRF and DevOps team was already using Alexa for CI/CD, database back up generation and triggering pipeline to generate few reports. To leverage Alexa’s capabilities to the fullest, we decided to build Smart Ops!

Eventually we extended this approach by modifying our report generation pipeline and integrating with AWS Lambda for serving Alexa Skills. We then shared the updated Alexa skills with few of the business spocs and stake holders. Now there was no more need of sending multiple reports for each LOB which earlier used to bombard the end-users inbox.

With the new approach the end user could generate and send a report either by applying the required filters on UI or by Alexa. On UI, users were also given an option to link their respective Alexa devices.

How to create Alexa Skills ?

Go to Alexa developer console. Create new skill.

Provide skill name - below I am creating one skill — Deploy my service

Here we will choose Custom Model and for backend resources we will select “Provision your own” .

We are not selecting pre-built templates and starting from the scratch.

Provide Invocation Name — “deploy my service”. Alexa users will use this for invoking your Alexa skill.

Create Custom intent

Provide Utterence

Provide Slot Type :

Here i am defining slot type — server , its value could be (dev, uat , pre-prod,prod,test,stage). Check this to understand what Slots are.

Create Lambda Function

Let’s create Backend resource which will handle Alexa device requests and respond back.

Create Lambda function — Select Java 8

Create AWS S3 Bucket and upload build code.

Copy file location and configure in Function Code.

Configure Trigger source and provide Alexa skill ID

Configure Lambda & Test Alexa Skills

Configure Lambda in Alexa skill.

Lets test it via UI Test tab. Either use microphone or type skill invocation Name i.e “deploy my service”

Publish skill to public or a closed group.

Provide all Privacy & Complaince details

Provide Availability details.

Lets test skill via “Echo” device

Open Alexa App on your device. Select “Skills & Games” .

Go to “Your skills” -> check your skills under dev section and enable it.

Lets test it “Alexa, deploy my release”

Few moments later , you will find below build pipeline job triggered by AWS Lambda.

For complete code refer — AWS-Lambda-jenkins-deployment-pipeline

Similarly we created few more requests handler to handle report generation requests.

Thanks for reading !

Hope you have enjoyed reading the article.

Hit 👏 button (up to 50 times) . It encourages me to keep writing :)

Checkout my another articles :

📝 Save this story in Journal.

@ 👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. Read the Noteworthy in Tech newsletter.

--

--

Ritresh Girdhar

Father || Coder || Engineer || Learner || Reader || Writer || Silent Observer