<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Indeed, my main personal experience with Lambda so far has been in writing an Alexa skill in my spare time.  It’s been quite fun, and very instructive in the benefits and pitfalls of lambda.
<div class=""><br class="">
</div>
<div class="">My main takehomes so far:</div>
<div class=""><br class="">
</div>
<div class="">1.  I love the fact that there’s basically no code at all other than that required to deliver the actual skill. Just handler functions for the incoming requests (Intents, as Amazon call them)</div>
<div class=""><br class="">
</div>
<div class="">2.  Debugging is awkward.  There is no interactive debugging, as far as I can tell.   Log inspection is about all you have, and some errors are obtuse (for example, some valid Node.js constructs produce syntax errors on Lambda, and it’s very hard
 to track down when it happens - unit tests all pass locally but then you get a syntax error in the LogWatch logs, with a useless stack trace that doesn’t tell you where the syntax error is).  Debugging and unit testing on your laptop is hard to do; many Alexa
 APIs rely on real hardware functions and the simulators don’t handle them.</div>
<div class=""><br class="">
</div>
<div class="">3.  Persistence of data is fairly straightforward using S3 buckets or DynamoDB, and I haven’t noticed latency issues with those (of course the interactions are on a human timescale, so latency isn’t really much of an issue)</div>
<div class=""><br class="">
</div>
<div class="">4.  Interaction with external services can be problematic; Alexa lambda functions must return within 8 seconds, which can be fun if your skill needs to fetch data from some other source (in my case a rather sluggish data service in Azure run by
 my local council), and there’s no clean way to handle the event if you hit the 8 second limit, the function just gets terminated and Alexa returns a rather meaningless error to the user.</div>
<div class=""><br class="">
</div>
<div class="">Tim</div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On 25 Nov 2020, at 09:45, John Hearns <<a href="mailto:hearnsj@gmail.com" class="">hearnsj@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
BTW, I am sure everyone knows this but if you have a home assistant such as Alexa everytime you ask Alexa it is a lambda which is spun up </div>
<br class="Apple-interchange-newline">
</div>
</blockquote>
</div>
<br class="">
</div>



-- 
 The Wellcome Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

</body>
</html>