No video

Deploy a SpringBoot API on AWS Lambda in 10 minutes

SpringBoot is the most widely used application framework in Java, but did you know you can run your SpringBoot applications on AWS Lambda in as little as 10 minutes without changing a single line of code.
In this video we dive into taking an existing Spring API and deploying that to AWS Lambda in 10 minutes using the AWS Serverless Application Model.
00:00 - Introduction
00:35 - The Deployed API
01:40 - The Serverless Java Container
02:10 - Add a Lambda Handler
05:00 - AWS SAM Templates
07:20 - Compile your application
08:00 - SAM Deploy
10:00 - API in Action
Links
GitHub Repo - github.com/jea...
AWS Serverless Java Container - github.com/aws...
AWS Lambda - aws.amazon.com...
AWS SAM - aws.amazon.com...
Web - jameseastham.c...
Twitter - / plantpowerjames
LinkedIn - / james-eastham

Пікірлер: 50

  • @nebur43
    @nebur43 Жыл бұрын

    Excelent video. Thank you very much. For those who use free tier, some tips for no cost. 1 - for ddbb (DatabaseStack), change machine and use: InstanceClass.T4G, InstanceSize.MICRO 2 - dont use NAT gateway (NetworkingStack) 3 - Dont use awsSecret. Instead, use user/password directly (only for testing purpose)

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    I really appreciate the comment, and I've updated the GitHub repo to have the first 2. My preference is to keep the secret in place, purely to demonstrate the best practices. But The DB and Nat Gateways are done :)

  • @santiagobruno_t1581
    @santiagobruno_t15816 күн бұрын

    thanks for keeping it simple!

  • @VishwasSaxena
    @VishwasSaxena Жыл бұрын

    Thank you for wrapping up everything in such a short time and just show what is needed! Awesome!! 🙂

  • @YoAndroide
    @YoAndroideАй бұрын

    Thanks, great video!!

  • @RahulSingh-cl3wm
    @RahulSingh-cl3wm8 ай бұрын

    Awesome, great video.

  • @AlessiaCaraFans
    @AlessiaCaraFans Жыл бұрын

    pleaase do more videos about spring boot serverless architecture,dto to entity mapping etc ..thank youuuuuu

  • @mikhailurmich
    @mikhailurmich Жыл бұрын

    Wonderful video. Would you mind to explain how we can deploy it as native with GraalVM, PLEASE? 🥺

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    Hey Mikhail, I certainly will look at doing that in the future. Thanks for reaching out 🎉☺️

  • @sergiogv5107
    @sergiogv5107 Жыл бұрын

    thanks for this video, pretty clear n useful. new sub :)

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    Glad it helped, there will be plenty more coming in this series over the next few weeks. Thanks for subscribing :)

  • @miguelmallqui9472
    @miguelmallqui9472 Жыл бұрын

    thanks! great video

  • @bik8353
    @bik8353 Жыл бұрын

    Thanks fort his video!!

  • @markusfeljofsen8345
    @markusfeljofsen8345 Жыл бұрын

    Really nice vid thx

  • @WoodyPianoShack
    @WoodyPianoShack Жыл бұрын

    great video thanks, just so I understand, when the lambda is invoked is it starting up the spring boot application every time? seems like that would be pretty slow, so I hope not.

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    Thanks! Whenever a new Lambda execution environment is created then yes Sprint Boot needs to startup up every time. I have another video in the same playlist on Lambda SnapStart which prevents this though, its well worth checking that out as well 😀

  • @ktcoder
    @ktcoder Жыл бұрын

    Good video but I feel it lacks few explanations, for example, all pom.xml dependencies used, postgres configuration and its integration with lambda etc.

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    Great feedback, thanks. I try to keep my videos short and to the point, but these would have been good additions.

  • @Likrant
    @Likrant Жыл бұрын

    Please be care with sources for this video. It set up with xlarge2 database, which consumed from me $200 in several days without any usage!

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    Sorry to hear that, and thanks for pointing it out, I'll update the source code.

  • @Likrant

    @Likrant

    Жыл бұрын

    @@serverlessjames also $30 for NAT Gateway (VPC as I understood)

  • @ksdekamil

    @ksdekamil

    Жыл бұрын

    @Likrant Good to know. What a kind of DB it was? I plan to use DynamoDB which is free up to 25 GB so I hope that I will avoid such problems

  • @juliocesararbietochavez5890
    @juliocesararbietochavez5890 Жыл бұрын

    great video 👍

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    Thanks Julio 😄

  • @Diego-oe7fy
    @Diego-oe7fy Жыл бұрын

    Hi James! I've really appreciated your videos for learning about AWS Lambda. I've got an application on SpringBoot 3 that follows the aws-serverless-container, but for whatever reason the Lambda function keeps returning blank response body and headers. When I set it up to run locally (without AWS Lambda function), everything works perfectly. Could you please help me troubleshoot?

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    Do you have a GitHub repository or something you could share?

  • @Diego-oe7fy

    @Diego-oe7fy

    Жыл бұрын

    @@serverlessjames my github repo link seems to have gotten deleted. Is there any other way to send this to you?

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    @@Diego-oe7fy feel reach to reach out on social media? Twitter maybe. My username is @plantpowerjames

  • @Diego-oe7fy

    @Diego-oe7fy

    Жыл бұрын

    @@serverlessjames alright! I followed you

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    @@Diego-oe7fy Great, feel free to drop me a direct message.

  • @ashishtrivedi6426
    @ashishtrivedi6426 Жыл бұрын

    whats spins up springboot app ? is it main method of @Springbboot app or the one inside handler?

  • @coderlicious6565
    @coderlicious6565 Жыл бұрын

    Excellent vid. Do you know if there is a way to configure your AWS lambda account, to tell Amazon a max dollar amount you want to spend, and then if you accidentally exceed that amount with your resources, they either immediately notify you, or just simply shut down your site? I'd prefer it works that way. I'd hate to get a big surprise bill from amazon, because I didn't know my code was very inefficient, and the code was spending too much time during a function invocation.

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    You can set budgets on your account so that you get notified when your spend goes over a certain level. Link below. You can also use things like reserved concurrency in Lambda to control the scaling behaviours. If this is a personal AWS account you're using for learning you can also delete all of your infrastructure when you're not using it. Serverless resources are quick to spin up and tear down, so deleting them when you're not using them removes the risk completely. aws.amazon.com/aws-cost-management/aws-budgets/

  • @coderlicious6565

    @coderlicious6565

    Жыл бұрын

    @@serverlessjames Perfect, thanks a mil for your response.

  • @blockchain_bull
    @blockchain_bull Жыл бұрын

    Can CodePipeline, Codecommit auto deploy(CICD) springboot to AWS Lambda ?

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    Yes, absolutely!

  • @blockchain_bull

    @blockchain_bull

    Жыл бұрын

    ​@@serverlessjames Thank you, can you add a new video for that part?

  • @mdlwlmdd2dwd30
    @mdlwlmdd2dwd30 Жыл бұрын

    Im assuming you have lamba apigw proxy set up which requires very particular set up as response like status code, body, 64endcoding. Do you have send it back as httprespond type from springboot?

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    There's no manual configuration of the API Gateway. AWS SAM configures all of the API Gateway resources and then the serverless Java container manages the translation from API GW to Spring and back again

  • @EduardoMatoso-bx8if
    @EduardoMatoso-bx8if11 ай бұрын

    Thanks!

  • @faiz1449
    @faiz1449 Жыл бұрын

    Thanks

  • @muneshwarsingh9474
    @muneshwarsingh9474 Жыл бұрын

    Could you please give a way to deploy it through aws console as my organisation hasn't given me permission to use sam.

  • @serverlessjames

    @serverlessjames

    Жыл бұрын

    Is there another tool you are allowed to use? Terraform, CDK etc?

  • @muneshwarsingh9474

    @muneshwarsingh9474

    Жыл бұрын

    @@serverlessjames yes we are allowed to use terraform...but we can't use SAM. pls provide some solution..

  • @rathoreias
    @rathoreias5 ай бұрын

    waist of time.

  • @serverlessjames

    @serverlessjames

    5 ай бұрын

    Could I ask why?

  • @rathoreias

    @rathoreias

    5 ай бұрын

    @@serverlessjames waist of time for beginners. You didn't explain about some configuration like sam file some dependency and all. How can a beginner figure it out what happened in background. And how dependency is relevant to which part. And please this is only feedback not a hate about you.

  • @serverlessjames

    @serverlessjames

    5 ай бұрын

    @@rathoreias It's really great feedback, thank you for taking the time to reply :)

Келесі