Agile multi-platform development using AWS
High level design for Read My Tweets Alexa Skill by utopianapps.ca

Agile multi-platform development using AWS

My third Alexa Skill is now published. It is called Read My Tweets. The skill reads the latest three Tweets of the leader of your country (or I should say the leader of the country where the Echo device is registered to). In Canada it will be the tweets from @JustinTrudeau, in the US it will read tweets from @realDonaldTrump, in the UK it will be @theresa_may, in India it will be @narandramodi, and in the Australia it will be @TurnbullMalcolm. Of course the user can change all this and listen to Alexa read tweets from their three favourite tweeters.

Agile framework

The design is comprised of three main functions. First we need to have a TwitterBot to read the tweets, then we need Alexa function to read the tweets, and finally we would want the users to be able to update their preferences. This allowed me to divide the work into three chunks. Without going into too much detail about the Agile framework, the key to a rapid development was to design the chunks in such a way that the first chunk satisfied most of the functions of the second/third chunks, and the second chunk satisfied most of the functions of the third, and the third completed the whole project.

For example, the first and the second chunks had a simple HTML form interface on my utopianapps.ca website, where I allowed the users to simply send me an email for their user preferences and I would manually update their preferences. This allowed me to publish the skill, and as it was going through the Certification process, I was able to complete the third chunk, automating the user preferences. (As I definitely do not want to manually update tons of user preferences!)

This was all done in 12 days!

Technology and Security Layers (The recipe)

I used Amazon's NoSQL database called DynamoDB, which is extremely flexible, fast and easy to use. I then wrapped it in AWS IAM (Identity and Access Management) using the "Grant Least Privilege" policy.

Next, came the TwitterBot, which is a Node JS Lambda function that uses Twitter API to read the tweets. The code runs on a 2 hour schedule to retrieve the latest tweets.

Having the tweets, I next had to build the Alexa Skill to read them. This involved the usual AMS Lambda, S3 for storage, and a few more technologies that I mentioned in my previous Article.

And last, but not least the user preferences

The utopianapps website is already secured using SSL, so all I needed was to securely call my Lambda function to read and update user preferences. This is where AWS's Cognito came into play. It allowed me to use identity pools (federated identities) to grant temporary limited-privilege access to my AWS function.

Key design features (requirements)

  • NoSQL, no schema DB
  • No direct external access to the database
  • Rapid development using Agile Framework concepts
  • Grant Least Privilege security policy
  • Use JSON for data communication


To view or add a comment, sign in

More articles by Farid (Fred) Bahrabadi

  • Software engineering best practices

    As we all continue our journey into software engineering we encounter issues and obstacles. We always find a way to…

  • Replacing IVR with Alexa

    We are all very familiar with the Interactive Voice Response. Many companies that we deal with use it to provide some…

  • Rapid development using AWS

    After publishing my first Amazon Skill called "Fancy Quiz", I decided to test the rapid development claims made by…

Others also viewed

Explore content categories