How to Setup and Execute your First AWS Lambda function

Follow this blog to setup, deploy and test LAMBDA.

  • Go to Services > Lambda > Create a New Function

  • Select ‘Author from Scratch’ and provide basic information for the function.
    Default execution role can be left as it is.
    Hit Create Function

  • After creating the function,
    Update the Code in the Code source section, Hit the Deploy button to update your code.
    Monitor window can be opened in a new tab for CloudWatchLogs.

  • To TEST the function, click on Test then set up a test event.
    Event Data should provide parameters to your function if any in a JSON object format. If none, it should be an empty JSON object.

  • After Test Event setup, we can start with Testing our Lambda.
    Hit the Test Button.
    You will see execution logs.

  • Execution logs can also be accessed using CloudWatchLog.

    There you go, you have your LAMBDA ready for action.