Spring Cloud Function on AWS Lambda using API Gateway | Tech Primers

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ค. 2024
  • This video covers how to deploy Spring Cloud Functions to AWS Lambda and trigger then using Amazon API Gateway
    📌 Related Playlist
    ================
    🔗Kubernetes Primer - • Kubernetes Primer
    🔗Spring Boot Primer - • Spring Boot Primer
    🔗Spring Cloud Primer - • Spring Cloud Primer
    🔗Spring Microservices Primer - • Spring Microservices P...
    🔗Spring JPA Primer - • Spring JPA Primer
    🔗Java 8 Streams - • Java 8 Streams
    🔗Spring Security Primer - • Spring Security Primer
    🔗Containers Primer - • Containers Primer
    🔗AWS Primer - • AWS Primer
    💥Join TechPrimers Slack Community: bit.ly/JoinTechPrimers
    💥Telegram: t.me/TechPrimers
    💥TechPrimer HindSight (Blog): / techprimers
    💥Website: techprimers.com
    💥Slack Community: techprimers.slack.com
    💥Twitter: / techprimers
    💥Facebook: TechPrimers
    💥GitHub: github.com/TechPrimers or techprimers.github.io/
    🎬Video Editing: iMovie
    🎼Background Music:
    Dyalla
    Joakin Karud
    ---------------------------------------------------------------
    🔥 Disclaimer/Policy:
    The content/views/opinions posted here are solely mine and the code samples created by me are open sourced.
    You are free to use the code samples in Github after forking and you can modify it for your own use.
    All the videos posted here are copyrighted. You cannot re-distribute videos on this channel in other channels or platforms.
    #SpringCloudFunction #AWSLambda #TechPrimers
  • แนวปฏิบัติและการใช้ชีวิต

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

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

    Thank you so much for going step by step mate. I found some code on the web that somehow didn't work on lambda. Cheers for the excellent explanation and not cutting off things!

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

    Thank you for making this video. Request you to please add more videos such as use cases for this kind of function in a serverless architecture or advanced techniques for spring cloud functions.

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

    Very clear explanation! Tks for sharing!

  • @vivekkannan3642
    @vivekkannan3642 5 ปีที่แล้ว +3

    Nice session on Aws with Spring cloud.
    Awesome Job!! To make this look so simple.
    May I request for the future, a session on how to enhance this to handle exceptions on spring cloud and passing it through API to the user. Like http 4xx or 5xx errors.

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

    Thanks, easy to understand!

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

    Thank you... I was expecting to try out myself....

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

    Good one ajay :). Thank you

  • @sang-son
    @sang-son 4 ปีที่แล้ว +1

    Thank you so much!!!

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

    No function defined: java.lang.IllegalStateException
    java.lang.IllegalStateException: No function defined
    at org.springframework.cloud.function.adapter.aws.SpringFunctionInitializer.apply(SpringFunctionInitializer.java:191)
    at org.springframework.cloud.function.adapter.aws.SpringBootRequestHandler.handleRequest(SpringBootRequestHandler.java:48)
    Am facing this exception. Could someone help me out here?

  • @ILyaCyclone
    @ILyaCyclone 5 ปีที่แล้ว +3

    Nice new intro music ;)

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

    It's very useful

  • @abhishektyagi4428
    @abhishektyagi4428 5 ปีที่แล้ว +4

    Sir Could you please make a video explaining the resources you use to learn or enhance your programming skills

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

    Thank you so much

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

    Thank you very much .... from performance perspective could you please explain how this Lambda services will handle application traffic ? if not how this lambda service will integrate with load balancer in aws to handle the request's ?

  • @iftekharkhan4652
    @iftekharkhan4652 4 ปีที่แล้ว

    trying to call the local APIs using postman but it does not work..any idea y?

  • @balajithiru1907
    @balajithiru1907 4 ปีที่แล้ว

    -aws jar is not coming for gradle Projects ..Am I missing something in gradle Project

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

    Two excellent videos sir. Now for the next step. Spring Native with GraalVM backing. I see your startup time for the lambda is around 11 seconds. Can we make this native and get the super fast startup times needed for Lmbda's?

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

    Awesome video..please do with azure adapter

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

    Thanks, nice video. This week I am working on task with API gateway/aws lambda. I find it easier to create API in Gateway and create new resources/methods and assign lambda functions for methods. But I think you should create everything with AWS cloudformation templates.
    Do you have any experience with AWS CDK ? Could you create video maybe?

  • @ssswdon
    @ssswdon 4 ปีที่แล้ว

    How about using SAM and localstack?

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

    please upload one video extension of this project, store the data into amazon dynamodb

  • @HarshaVardhan-jf9sd
    @HarshaVardhan-jf9sd 2 ปีที่แล้ว

    Can you provide a gradle version of this project?

  • @vaibhavrawat5655
    @vaibhavrawat5655 4 ปีที่แล้ว

    Sir will you please an api call in simple jsp page.... Using dynamodb and api gateway without lambda...

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

    How -aws jar got created for you? Since if I create jar it is getting created as a normal jar. Also, Can you please let us know how to trigger the SNS event to lambda using spring cloud functions.

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

    Hey bro .. you’re doing a good job .. one question ... what’s the best way to read 40.000 email from any micoservice ?

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

    Spring Cloud Function with cold start: 13200ms
    Spring Cloud Function with hot start: 100ms
    Hopefully GraalVM and Spring will reduce the cold start startup time in the future. Otherwise the better options for Lambda will be Java + Dagger, NodeJs or Python.

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

      Ron Hollander plain core Java 8 based lambda having 300 to 400 ms cold start. And yes node is much faster. Spring boot 2.3 improved a lot.

  • @rajidipuneeth9900
    @rajidipuneeth9900 3 ปีที่แล้ว

    Need plugin code.Anyone help me in getting that

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

    Great explanation. Would have been lost without it. Can you tell me how you did the auto completion for the plugin? My intellij doesn't offer it to me.

    • @TechPrimers
      @TechPrimers  3 ปีที่แล้ว

      I preloaded them using Live Template feature in IntelliJ. You can check my intellij playlist to see tips n tricks in IntelliJ

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

    Thanks for this video. It was great. I found below observations: we have to use Spring cloud function context version 3.0.3 and above. Earlier versions may not work. My maven downloaded the earlier version and it was not working.
    I used Lombok for printing the logs to make sure that logs are printed. My request is, Can you please post a video for use cases where the Spring cloud functions can be used effectively and more functions like post, database calls etc. Overall, Big thanks for this video it was good one.

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

      Sure will do mukul

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

    Why create 2 classes AWSLambdaHandler & Hello? Can't it be one class?

  • @maheshchowdary2195
    @maheshchowdary2195 3 ปีที่แล้ว

    Could you please share source code of this example

  • @jeraldlawrence5605
    @jeraldlawrence5605 4 ปีที่แล้ว

    We can use the java8 code itself in AWS lambda. what is the advantage over in Sping cloud function to deployed in AWS lambda?

    • @TechPrimers
      @TechPrimers  4 ปีที่แล้ว

      It's another framework. That's it. Which is similar to spring boot n has good integrations with spring cloud libraries

    • @jeraldlawrence5605
      @jeraldlawrence5605 4 ปีที่แล้ว

      @@TechPrimers ThanksT

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

    what is the dev environment i have to set to run it locally?

    • @VoathnakLim
      @VoathnakLim 3 ปีที่แล้ว

      I got the same question

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

    I am getting ClassNotFoundException, I am generating AWS jar file that I am uploading in Lambda, but still am getting ClassNotFoundException

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

      I'm getting this:
      Error loading class com.javadsalgo.serverless.AwsLambdaHandler: org/springframework/cloud/function/adapter/aws/SpringBootRequestHandler: java.lang.NoClassDefFoundError
      java.lang.NoClassDefFoundError: org/springframework/cloud/function/adapter/aws/SpringBootRequestHandler

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

    Can you please show this for post function as well

    • @movingtoweb
      @movingtoweb 5 ปีที่แล้ว

      Anirban Roy its there buddy. Check after the get

    • @anirbanroy1524
      @anirbanroy1524 5 ปีที่แล้ว

      Ajay Kumar S it's not there

  • @amitprasad6982
    @amitprasad6982 4 ปีที่แล้ว

    How to have multiple endpoints with a single jar

    • @UCTNX4PiSl496AhgUyGlB5wg
      @UCTNX4PiSl496AhgUyGlB5wg 3 ปีที่แล้ว

      Amit Prasad FUNCTION_NAME=Endpoint function name. Provide this in environment variable

  • @rupeshpatil6957
    @rupeshpatil6957 3 ปีที่แล้ว

    Hi Friend,
    1) You are using Version 1 i.e. com.amazonaws of AWS Java SDK. What dependencies we need use for Version 2 i.e. software.amazon.awssdk?
    2) You have added the lambda dependencies but where are you using them in your spring boot app?
    Your handler is also extending springbootrequesthandler
    Thanks in advance