Build a Serverless Web Application on AWS Cloud- Part1

Build a Serverless Web Application on AWS Cloud- Part1



This video shows how to build a serverless web application in AWS cloud using API gateway, Lambda function, DynamoDB and S3.
The only prerequisite for this course is an AWS free tier account. You don’t need to have any prior experience on any of the AWS services.

28 thoughts on “Build a Serverless Web Application on AWS Cloud- Part1

  1. It is very helpful to create a dynamic webpage with serverless computing, database, API… 🙂 thank you so much!

  2. Lambda test only works with email id.. if i change key and testkey with name or any other column name of dynamodb..it shows validation error schema error. Strange.. do you know what could be the issue? Please let me know..m waiting.

  3. I was able to host the website with the bucket but I am getting the error –
    Uncaught TypeError: Cannot read property 'FirstName' of undefined

    at Object.success ((index):27)

    at i (jquery-3.1.1.min.js:2)

    at Object.fireWith [as resolveWith] (jquery-3.1.1.min.js:2)

    at A (jquery-3.1.1.min.js:4)

    at XMLHttpRequest.<anonymous> (jquery-3.1.1.min.js:4)

    Need help.

  4. On executing the html, if you are not getting any data from dynamodb then there is fault on api side. After clicking on deploy api and selecting the stage, remember to save changes to stage option which is on the bottom. Then copy the static url and paste it again. You will get the response.

  5. I used the below Java script to connect to my Get api. But always getting status as 0. It will be helpful if someone cal help me to get it resolved please.

    function CallFunc(RollNumber){

    var xhttp = new XMLHttpRequest();

    xhttp.setRequestHeader('Access-Control-Allow-Origin','*');

    xhttp.onreadystatechange = function() {

    if (this.readyState == 4 && this.status == 200){

    document.getElementById("res").innerHTML=this.responseText;

    }

    };

    xhttp.open("GET","https://r01wbf8esh.execute-api.us-east-1.amazonaws.com/Dev/$$$$$?Roll="+RollNumber,true);

    xhttp.send();

    }

  6. Hello Vijay,

    I keep receiving HTTP status code as 0. What do I miss in this? Can someone please help me on this.

    Thanks
    Praveen

  7. Thanks Mr Vijay. Your project is all well, but from node.js version 10 there should be a little change in the Lambda code.
    The updated & tested Lambda code is-
    const AWS = require('aws-sdk');
    var docClient = new AWS.DynamoDB.DocumentClient();
    var tableName = "StudentDetails";

    exports.handler = (event, context, callback) => {

    var params = {
    TableName : tableName,
    Key:{
    "Roll" : event.Roll
    }
    };
    docClient.get(params, function(err,data){
    callback(err, data);
    }) ;
    } ;

    Thanks 🙂

  8. Hi Vijay
    I am getting this error while testing the lambda function (your video time 46:03). please suggest what is the problem
    {

    "errorMessage": "2020-07-21T11:32:02.198Z 279d5e5f-14ae-4026-9655-a32a5d7c9805 Task timed out after 3.00 seconds"

    }
    output log
    START RequestId: 279d5e5f-14ae-4026-9655-a32a5d7c9805 Version: $LATEST

    END RequestId: 279d5e5f-14ae-4026-9655-a32a5d7c9805

    REPORT RequestId: 279d5e5f-14ae-4026-9655-a32a5d7c9805 Duration: 3003.17 ms Billed Duration: 3000 ms Memory Size: 128 MB Max Memory Used: 21 MB

    2020-07-21T11:32:02.198Z 279d5e5f-14ae-4026-9655-a32a5d7c9805 Task timed out after 3.00 seconds

  9. Hi Vijay, Great Explanation,Can you please make some more video on Query, Batch getitems and Delete Items in Dynamodb .

  10. Hi Vijay , I followed each and every step and working fine till the integration of Lambda with Api and Dynamo DB. Also i have configured S3 bucket and uploaded the frontend code with my Api URL but when i to try fetch the data by clicking on GetCustomerDetail button then it is not returning anything. Please advise.

  11. Thankyou Vijay for such a great explanation … Actually i need to understand if i am having any external DB other than dynamo DB then how can i connect it with Lambda and how to define the table names and Key. As there might be so many tables into the DB. Please advise.

  12. Thank you, great video! I just want to point out that if you come across an issue while running Lambda function (minute 45) "errorMessage": "Missing required key", the fix is that k should be capital K in key

  13. Thank you. I would like to add "Age " in the database. what will be the code in HTML in node.js for age? self.age = ko.observable(" ") and self.age(data.Item.Age),?

  14. Great video, thanks a lot! Minute 56:16…Front end code from himself in github: https://github.com/vnathv/serverless-webapp

  15. I found a very good video that explains this!
    Title: AWS FullStack Serverless Application Setup Using Lambda, API Gateway, RDS-Postgres, S3, React Cheers
    Link: https://www.youtube.com/watch?v=dZQbRLL7qxE

Leave a Reply

Your email address will not be published. Required fields are marked *