How do I acquire and return the date using an AWS lamba function












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!










share|improve this question


















  • 1





    Here's a very basic example: medium.freecodecamp.org/…

    – jarmod
    Nov 26 '18 at 0: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. stackoverflow.com/questions/50714782/…

    – Chuck LaPress
    Nov 27 '18 at 1:14
















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!










share|improve this question


















  • 1





    Here's a very basic example: medium.freecodecamp.org/…

    – jarmod
    Nov 26 '18 at 0: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. stackoverflow.com/questions/50714782/…

    – Chuck LaPress
    Nov 27 '18 at 1:14














0












0








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!










share|improve this question














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!







node.js amazon-web-services aws-lambda






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 26 '18 at 0:18









Kyle LaBonteKyle LaBonte

41




41








  • 1





    Here's a very basic example: medium.freecodecamp.org/…

    – jarmod
    Nov 26 '18 at 0: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. stackoverflow.com/questions/50714782/…

    – Chuck LaPress
    Nov 27 '18 at 1:14














  • 1





    Here's a very basic example: medium.freecodecamp.org/…

    – jarmod
    Nov 26 '18 at 0: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. stackoverflow.com/questions/50714782/…

    – Chuck LaPress
    Nov 27 '18 at 1:14








1




1





Here's a very basic example: medium.freecodecamp.org/…

– jarmod
Nov 26 '18 at 0:45





Here's a very basic example: medium.freecodecamp.org/…

– jarmod
Nov 26 '18 at 0: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. stackoverflow.com/questions/50714782/…

– Chuck LaPress
Nov 27 '18 at 1:14





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. stackoverflow.com/questions/50714782/…

– Chuck LaPress
Nov 27 '18 at 1:14












1 Answer
1






active

oldest

votes


















0














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






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53473331%2fhow-do-i-acquire-and-return-the-date-using-an-aws-lamba-function%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














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






    share|improve this answer




























      0














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






      share|improve this answer


























        0












        0








        0







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






        share|improve this answer













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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 12 '18 at 2:28









        bspeaglebspeagle

        835




        835
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53473331%2fhow-do-i-acquire-and-return-the-date-using-an-aws-lamba-function%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Wiesbaden

            Marschland

            Dieringhausen