How to Create an API in AWS | API Gateway | Lambda | DynamoDB | Java

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 พ.ค. 2022
  • In this tutorial, we will create a serverless API that creates, reads, updates, and deletes items from a DynamoDB table.
    DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. This tutorial takes approximately 55 minutes to complete, and you can do it within the AWS Free Tier.
    First, we create a Lambda function using the AWS Lambda console. Then we create a DynamoDB table using the DynamoDB console. Next, we create REST API using the API Gateway console. Lastly, we test the API.
    When we invoke our REST API, API Gateway routes the request to your Lambda function. The Lambda function interacts with DynamoDB, and returns a response to API Gateway. API Gateway then returns a response to the user.
    #aws #awstutorial #java

ความคิดเห็น • 50

  • @user-zc4jk7uo4h
    @user-zc4jk7uo4h ปีที่แล้ว +2

    One of the best tutorial with complete in-depth knowledge. Thanks Mir for making things simple and crisp .

  • @sudhakartadepalli2523
    @sudhakartadepalli2523 ปีที่แล้ว

    One of the best tutorials. Thank you so much!!

  • @TVrook
    @TVrook ปีที่แล้ว +1

    Amazing tutorial, really well explained. Understood everything!! Thank you :)

  • @aspaksharif4376
    @aspaksharif4376 ปีที่แล้ว

    This is a hidden #Gem....thank you, keep up the good work.

  • @petertaylor9763
    @petertaylor9763 2 ปีที่แล้ว +2

    Video cover lotta different items that I wanted to learn thanks so much!

    • @pwm.
      @pwm.  2 ปีที่แล้ว

      Glad it was helpful!

  • @fidelvillanueva6422
    @fidelvillanueva6422 ปีที่แล้ว

    Amazing tutorial, please continue upload more videos with AWS and Java. Spring boot.

  • @vimalv6341
    @vimalv6341 ปีที่แล้ว

    A very good Tutorial for a beginner. Keep it up. God bless you. 🙂

  • @borispustilnik8900
    @borispustilnik8900 ปีที่แล้ว +1

    Thank you! It's very helpful!

    • @pwm.
      @pwm.  ปีที่แล้ว

      Glad it was helpful!

  • @Confusedcapybara8772
    @Confusedcapybara8772 11 หลายเดือนก่อน

    I dig the note style approach

  • @John-ug3il
    @John-ug3il ปีที่แล้ว +1

    Thank you, very help full.

    • @pwm.
      @pwm.  ปีที่แล้ว

      Glad it helped

  • @juanpablodavilabedoya5025
    @juanpablodavilabedoya5025 7 หลายเดือนก่อน

    that's a great tutorial, thanks u very much

  • @AjayRam-ts5iv
    @AjayRam-ts5iv ปีที่แล้ว +1

    Thanks for this video it is very useful for my project

    • @pwm.
      @pwm.  ปีที่แล้ว

      Most welcome 😊

  • @pwm.
    @pwm.  2 ปีที่แล้ว +2

    Thanks for watching. If you liked this video, make sure to subscribe for more!

  • @thevagabond85yt
    @thevagabond85yt 11 หลายเดือนก่อน +1

    I think to handle GET,POST,PUT different methods... we dont need to create as many times uber-jar.
    We need to create 1 handlre per methods i.e differnt handler for PUT and diff for GET..... but jars need not be complied separately every time . there can be 1 jar with all lambda functions in one.

  • @stephenlflf3871
    @stephenlflf3871 11 หลายเดือนก่อน +1

    Gold!

  • @mdlwlmdd2dwd30
    @mdlwlmdd2dwd30 ปีที่แล้ว

    It would be nice, if you show how to debug locally as you go. There is none in production will just go straight deploying code without checking the progress

  • @leonardolopezlarraquy1403
    @leonardolopezlarraquy1403 ปีที่แล้ว

    Excellent tutorial @ankit!!
    I understand that the method being call of the Java class is being done through reflection. I does not make any sense to me the use of the interface with this signature
    public interface RequestStreamHandler {
    /**
    * Handles a Lambda Function request
    * @param input The Lambda Function input stream
    * @param output The Lambda function output stream
    * @param context The Lambda execution environment context object.
    * @throws IOException
    */
    public void handleRequest(InputStream input, OutputStream output, Context context) throws IOException;
    }
    Am I correct?

  • @avinashshrivastava1512
    @avinashshrivastava1512 ปีที่แล้ว

    In infra module you created something else could you please provide link?

  • @nolediganamimadre5714
    @nolediganamimadre5714 2 ปีที่แล้ว +1

    you have to add audio...I think. Great Tutorial!

    • @pwm.
      @pwm.  2 ปีที่แล้ว

      Noted!

    • @subashkc2470
      @subashkc2470 2 ปีที่แล้ว

      @@pwm. Yes, this is a great Tutorial. Plzz add audio coz this great videos deserve more likes and support.

  • @himanshusingh9050
    @himanshusingh9050 ปีที่แล้ว

    Great video, just have small question do we need to create separate lambda for all the request methods , can we do it using only one lambda?

    • @pwm.
      @pwm.  ปีที่แล้ว

      You can use one lambda but then you have to use spark for aws.

  • @rohinit6249
    @rohinit6249 ปีที่แล้ว

    @Programming with Mir Could you please help me with tutorial text file u wrote on the notepad

  • @carlellis9647
    @carlellis9647 ปีที่แล้ว

    I don't know why he doesn't use the APIGatewayProxyRequestEvent as the input for the handler function. It would save a huge amount of coding in terms of not having to go through the InputStream and do all that work to get the data and the headers.

  • @avinashshrivastava1512
    @avinashshrivastava1512 ปีที่แล้ว

    Hello bro need help on aws lamda productApi code it's not here

  • @rajeevtripathi8607
    @rajeevtripathi8607 ปีที่แล้ว

    Excellent Video. Would it be possible to share the code ?

  • @richasingh3424
    @richasingh3424 2 ปีที่แล้ว +2

    Could you please share the git url for the code base, would be a great help

    • @pwm.
      @pwm.  2 ปีที่แล้ว +4

      github.com/programmingwithmir/pwm-crud-api

    • @uyenthanh3794
      @uyenthanh3794 ปีที่แล้ว

      @@pwm. thank you .

  • @user-tv2sl5se4o
    @user-tv2sl5se4o 5 หลายเดือนก่อน

    Can you share us github url of your code base

  • @PankajVLOGZZz
    @PankajVLOGZZz 2 ปีที่แล้ว +1

    Can we do with one lambda function?

    • @pwm.
      @pwm.  2 ปีที่แล้ว +1

      Yes, you can but its best practice to keep things seperate. As your code grow and add more routes, your Lambda function grows in size and deployments of new versions replace the entire function. It becomes harder for multiple developers to work on the same project.

    • @PankajVLOGZZz
      @PankajVLOGZZz 2 ปีที่แล้ว

      @@pwm. And how to generate id automatically

    • @pwm.
      @pwm.  2 ปีที่แล้ว +1

      @@PankajVLOGZZz You can use UUID as your key - possibly time based UUID which makes it unique
      or
      Use randomly generated number + timestamp

    • @PankajVLOGZZz
      @PankajVLOGZZz 2 ปีที่แล้ว

      Actually I tried with one lambda with one handler method but when I am doing get product it's getting the product then deleting it as I merge everything into one method.. do I need switch case to implement?
      Can you help with that !?

    • @pwm.
      @pwm.  2 ปีที่แล้ว

      @@PankajVLOGZZz you need to differentiate the calls. You can check the request method and work accordingly. For example, if the request method is GET then only return the product, if POST then add the product etc. Hope this help

  • @pramodbasu7732
    @pramodbasu7732 ปีที่แล้ว

    getting no class found exception

    • @pwm.
      @pwm.  ปีที่แล้ว

      Make sure function handler name is correct in aws

  • @user-tv2sl5se4o
    @user-tv2sl5se4o 5 หลายเดือนก่อน

    git hub url please

  • @berkcan3475
    @berkcan3475 ปีที่แล้ว +2

    youtuber still couldnt understand importance of sharing github repository of the video, hilarious

  • @pss6957
    @pss6957 9 หลายเดือนก่อน

    Good but no explanation.

  • @jerin4492
    @jerin4492 ปีที่แล้ว

  • @shivampal8449
    @shivampal8449 ปีที่แล้ว +1

    Bhai lambda function me code test me error aa rii h , not invoking api. Apna contact number do.