Alexa, ask the bank to say hello
introduce yourself
Before we get into the skill itself, I’d like to set the scene to give a little context
The year is 2017
So at this point, I’m feeling a little lost and in 2017, I’ve been at AWS for about 2 years having recently joined the SA team from the cloud support engineering org.
I’d like to think I knew my way around the AWS Serverless stack and bit of python, but apart from that nothing.
I’m going to take on this challenge, and im going to smash it. And the only real requirements that I got to set the scope for the demo were pretty flexible.
Luckily in 2017, Alexa or Echo wasn’t available in Australia so that automatically made anything I did with Alexa cool.
Pretty low bar to meet, but I was going to take it nevertheless
I quickly learned that a cowboy approach probably wasn’t going to work, and I had to read the Alexa documentation to figure out just what was an utterance, intent and slots.
Along the way, I had to also cut my teeth in interacting with DynamoDB from Lambda and how to query and insert new records.
- Yes, it was a simple hard coded speech response back from Lambda, but I was so happy that something was finally starting to work
And once I got my first intent and response to work, I started getting momentum and everything was starting to make sense.
I was churning out new intents and features pretty quickly and starting to use slots and session attribute for authentication, as I knew people was going to be asking about that
What if somebody breaks in and transfers all my money over using my echo.
Of course, things just doesn’t happen smoothly.
Something I quickly realized was that in loud environments with background chatter – Alexa can get confused. Alexa Voice Remote.
For testing, I figured out that text based smoke test and actually saying it verbally had different results – I’m guessing Australian accent, where my skill was set for US English. So that made my wife a little bit upset as I was talking to Alexa more than her.
Lastly, manual deployments to zip up my lambda and upload to the console or syncing my s3 static site was making me crazy and sometimes I’d mess something up and then try to figure out where it went wrong before realizing I was uploading older version of the code. – Got around this by using serverless framework to deploy API GW and Lambda, Now, you can use codepipeline to push frontend code for the S3 site
By the day of the conference, I was pretty tired at the point but very happy and had an absolute blast talking to customers about how Alexa worked, and how it worked with the AWS services in the background and the way they talked to each other.
Some intents require authenticated session, whilst some don’t like introducing itself
What accounts do I have. Authenticate and try again. What accounts do I have?
How much do I have in my savings account
How much money can I spend at the pub tonight?
DynamoDB money transfer
Transfer money
List currency exchange rates
- Very annoying to reauthenticate using session attribute which lasts 5-6 seconds
Lambda handler is a monolith stack. Break down per microservice or per lambda in a fan out process with its own data storage if required
Less Spagetthi code, reduce boiler plate and simplify codebase with SDK
Increase efficiency for new deploys and include tests as current way of testing via echo sim, developer console or verbally is too slow