Posts

Showing posts with the label amazon

Calling Lambda Function from another Lambda Function synchronously - Node.js

Image
AWS Lambda functions are very useful when you work with Alexa or SageMaker or for any serverless applications. But if you have multiple Lambdas & wanted to call one from another, how to do it? Lets find out. AWS sdk provides a way to invoke Lambda, so we first need to import AWS sdk. Here region is the region where the lambda to call resides. Now lets add a function to call our second lambda Here Function name is the name of function to call, InvocationType is RequestResponse for synchronous call and Payload is the data which we need to send. We now have sdk & function ready, lets call the lambda now, This will successfully return the result. One important point is, the Role which the calling Lambda function use, must have InvokeAsync & invokeFunction rights. Go to IAM dashboard & add these Lambda actions. Hope this helps. Happy Coding, Parshuram 

Alexa to the help

Image
I wanted to help my daughter with the maths multiplication tables, but it gets painful when you repeat it again & again :( I was thinking of creating something with Bot Framework or Cortana skills, but those does not seems to be fit for purpose due to my previous experiences. Then comes Amazon Echo, and Alexa seems more promising. Decided to create an Alexa skill so that daughter can invoke it and ask for the maths table by herself. First thing we need is Amazon Alexa skill developer account. Head to below url & register for your account. https://developer.amazon.com/ Once registered, we can create a new Alexa skill. Creating skill is a step by step process. 1. Skill Information In skill info, we need to select Languages to support. Also the Name & Invocation Name for the skill. 2. Interaction Model Next is the Interaction model. Here we have to configure our intent & sample utterances. These are the sentences which we are suppose to s...