0

I am a unity developer who has been hired to make a game on the amazon alexa. It has been a mostly smooth process so far, but I now need to call the day's date into my IDE (pullstring), and was told by pullstring support that the solution is to make an endpoint api call to a lambda function that I will create and host.

I have tried finding some basic tutorials along the lines of making a very basic lambda function, but most of the videos and tutorials I've found assume I am already a web developer and know my way around node js and amazon's service environment, which I do not.

The function that I need is simple enough (I think?), as I just need to call the current date as a number and then look up that date on a json I have set up (which is working, I just need to get the actual real date instead of a dummy variable) and have written this:

let dateObj = new Date(); 
let day = dateObj.getDate();

but within how a lambda function works, I'm unsure how to set up the service and call this date (day) to be returned.

Does anyone have any resources that outline constructing and using a lambda function in the most basic, most essential way possible? Will the code I wrote serve the purpose I need? I'm a little out of my element and just need a few gaps filled in before I can learn the rest on my own.

Thank you!

  • 1
    Here's a very basic example: https://medium.freecodecamp.org/going-serverless-how-to-run-your-first-aws-lambda-function-in-the-cloud-d866a9b51536 – jarmod Nov 26 '18 at 00:45
  • The stack answer provides multiple methods including utilizing the most accurate way for each potential users time zone. especially important because lambda calls from AWS will shift all calls to UTC and create a real coding challenge. https://stackoverflow.com/questions/50714782/how-to-get-the-time-zone-or-local-time-of-alexa-device – Chuck LaPress Nov 27 '18 at 01:14

1 Answers1

0

This Node.js/Lambda tutorial might help get you going: https://dev.to/adnanrahic/getting-started-with-aws-lambda-and-nodejs-1kcf

bspeagle
  • 827
  • 7
  • 7