Spring Boot Serverless Architecture using AWS Lambda | Spring Cloud Function | JavaTechie
Ғылым және технология
This tutorial will guide you How to run Spring cloud function in AWS Lambda | Serverless Architecture
#javatechie #AWS #Lambda #SpringBoot
GitHub:
github.com/Java-Techie-jt/spr...
Blogs:
/ javatechie
Facebook:
/ 919464521471923
guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
Disclaimer/Policy:
--------------------------------
Note : All uploaded content in this channel is mine and its not copied from any community , you are free to use source code from above mentioned GitHub account
Пікірлер: 149
Thanks a lot! It´s a valueable knowledge to the ones (like me) that are beggining into Lambda!
Once again fantastic tutorial. I have never used Cloud Functions before so it might take time to wrap my head around it but this is giving me a good idea. Thanks
Thanks for this topic. I have learnt some of the concepts from your video demos. Please continue this series with more topics on AWS + Springboot. Also can you please give one example on Scaling with Lambda usage
Basant sir you no need to ask thanks for watching, we would like to thank you always to provide such complex technologies in simplified way. thanks a lot.
@Javatechie
Жыл бұрын
My goodness buddy 😊
Thank you sir for uploading lecture on Aws Lambda
Nice explanation. Thank you for sharing such a valuable information.
just started watching your AWS series, concise and clear, thank you. By the way I also learnt a lot from your other topics too. keep the good work going.
you are the super teacher...
Good explanation and more informative
thanks lord for share your knowledge
Sir , thanks for your videos and support
God bless you!!
Great video, hands on coding with demo .
Excellent video
Excellent 🔥
Thank you for this great example from you. Would you mind if you can also create an example of a step function which invoke this function and other AWS service in sequence? Thanks again in advance!
Very nice.
Hi Sir, You are doing a awesome job. If possible please add how to use VPC with subnet and internet gateway and route table .
Hey Basant, once again a greate topic and very well explained, few points if you could amplify on - can you demo the client side calling or invoking of such severless function , does it need any AWS configs (IAM role etc) - what the design trade off one lambda function for all end points, or seperate for each end point ~ty
Thank you so much for useful video
@Javatechie
6 ай бұрын
Glad it was helpful!
Let's suppose we need to build 5 Handlers (Employee Handler, Department Handler, etc.) then, is we have to create 5 different projects having spring cloud function and lambda functions as well? Please answer.
Thanks 🎉🎉🎉
Ultimate
Hi @Basant/#javatechie, Here while testing the 2nd function in lambda, you replaced the first function name with 2nd function name and also the parameter required for that function. My question, is there any way to test both the functions sequentially without manually replacing function name? Please do suggest.
Hi I tried with a string reversal one which is working fine... If I want to send two int as input and find out the sum facing issue like LinkedHashMap cannot cast to class entity.MyData. pls help me out to find the sum of two numbers with AWS lambda
Can we use filter with spring code as authorisation API gateway authorizer . I want to write code in sping boot and used lamda once token is available .and then will create Auth permission to give roles
Thanks for such a lovely video! Just one question: in the latest version in 2024 has SpringBootRequestHandler been replaced by org.springframework.cloud.function.adapter.aws.FunctionInvoker ?
Please share some video content where microservices orchestration using AWS step functions. Thanks.
12 sec for first execution is a bad response time. Ideal response time for rest api is below 2 sec.. So is this lambda function can be feasible for UI app?
thanks for the tutorial, I have two questions: I have created a lambda function and I have launched tests, will they charge me something? how can you invoke the lambda function from outside the aws consla, for example from postman?
@Javatechie
4 жыл бұрын
1. if you are using free tire and if you will exceed the threshold limit then you need to pay 2. We can't directly test it through postman but you an integrate API gateway and then access it from postman
Hi Basant , in continuation to this series, please add trigger and integration with API gateway topics as well.
@Javatechie
4 жыл бұрын
Yup it's my upcoming tutorial
@Javatechie
4 жыл бұрын
Adde please check
SpringBootRequestHandler is Deprecated now. which one is alternative to use?
Awesome video, thank you so much, I spent several nights looking for how to do this! Please, if want to expose these two methods on Lambda, do we have to deploy 2 different lambda, each with it's method in the Environment FUNCTION_NAME value?
@prashhanthnelakanti4992
3 жыл бұрын
Even I have the same question
@Javatechie
3 жыл бұрын
Yes you need to deploy separate method by mention function name
@prashhanthnelakanti4992
3 жыл бұрын
@@Javatechie is it like every time we need to upload the jar for a new function
Hi, Thanks for this topic but could you explain how to cosume JSON request please?
Hey bro im trying to connect a lambda to a rds database using JPA, but im struggling so much because the Repositories are Null when I @Autowired them to my lambdahandler class, and I cant really find a tutorial that shows how to do it as simple as JDBC tutorials, I dont think that it is 100% neccesary to use annotation @SpringBootApplication, but idk, would appreciate if you have any tutorial of that or you can make it sometime it would be nice, cause every tutorial around shows JDBC, but JPA would be nice too
While creating spring boot micro service architecture do we need to create different project or in single project all this services we can create? I mean product catalog is one service does it mean it is created as different starter project?
@Javatechie
4 жыл бұрын
Yes each service means different project
Bro is it sufficient for interviews if we follow your AWS tutorial.
JT... was does JAR size need to be reduced ? tks
That was very helpful .. just to confirm one thing .. here the RequestHandler has fixed types(String and List) since the functions are using so .. if i use another function in the same applicatio which returns a String or Number , do i have to create anothere RequestHandler specifying the new type.
@Javatechie
4 жыл бұрын
Then make your handler generic rather than specify data type we can add object as request and response
Iam getting class not found exception in AWS lamda once runs the test button
Have a doubt . Spring Cloud Functions accepts only Supplier , Function and Consumer as endpoints. These interfaces do not have any support for exception handling like throwing exceptions back to user. How would you handle it.
@Javatechie
3 жыл бұрын
Hi Shahul , nice one i didn't notice this. will update you
Why we are using curl only? Can't we use postman?
Thanks! I hope you do a follow up connecting a database (NoSQL or SQL) and authentication. Is it DynomoDB that's usually used?
How to handle the function if I have Map or list as a input?
Hello techie gi
Nice tutorial. Do you know how we can integrate it with AWS Fargate for task executions?
@Javatechie
3 жыл бұрын
Hi it's already there please checkout my AWS playlist
Very usefull content!! Could you continue this video by showing how to call this function by api gateway?
@Javatechie
3 жыл бұрын
Yes already uploaded how to call function using API gateway trigger
@heenamanglani3558
3 жыл бұрын
@@Javatechie Can you share a link on how to upload Spring boot 2 API's in AWS LAMBDA?
@Javatechie
3 жыл бұрын
Yes am using spring boot 2.3.x version please cross verify once
@denilsonmarcos8863
3 жыл бұрын
@@Javatechie I really apreciate you hard working. But, where is the step by step on how to setup ApiGateway calling a lamda function?
@denilsonmarcos8863
3 жыл бұрын
@@Javatechie Does this functions supports SpringBootApiGatewayRequestHandler? I am trying to get request parameters and restApiBody .
ending up class not found exception with OrderHandler. Can you please help
@Javatechie
4 жыл бұрын
Please build jar properly and deploy the jar which end with -aws
Server is closing automatically when I am running spring cloud function local , doing simple start from IDE
Thanks a lot for content. one question How can we achieve same thing using terraform if you can make video or share script for the same
@Javatechie
3 жыл бұрын
I am not aware about this terafom but I will check and update
@vinaygarg2171
3 жыл бұрын
@@Javatechie thanks..and can you share light weight jar solution as well
Hi, thank you for the video... can we also deploy an enitre appliction with spring boot as back end and Angular as front end in the same jar file? if so can you do a small app? Thank you!!
@Javatechie
3 жыл бұрын
Okay I will do that
@gs-rc3eq
3 жыл бұрын
Java Techie great, thank you!!!!
Hi Techies, if I have a spring-boot Scheduler project how can I deploy it on lambada (Example: I have below method which runs for every 5 sec how can I run this.? @Scheduled(fixedRate = 5000) public void printDate() { System.out.println("============Current Date is============"+ dateFormat.format(new Date())); }) Any Suggestions Appreciated.
after integrating this lambda function with api i am facing this error {"message": "Internal server error"}
@18.00 how to call from postman any idea?
Hi, may I know which screen recorder you are using to record videos?
@Javatechie
4 жыл бұрын
Screenpresso
@datta5188
4 жыл бұрын
@@Javatechie thanks
Hi Sir amazing content and very good explanation. Sir, I am trying to run an OCR(in my case Tesseract). I am taking a png file from my S3 bucket. But I am not getting how to give that input to the OCR which in turn is running on AWS lambda. Please can you help? Is there any email which I can show you my progress? Thanks in advance.
@Javatechie
2 жыл бұрын
Please connect javatechie4u@gmail.com
Can we have a function to take some payload just like a POST endpoint in REST ?
@Javatechie
2 жыл бұрын
For that you need to use spring cloud function concept with Function interface (java 8)
Can we use bufferedInputStream to read file from S3 in lambda function?
@Javatechie
2 жыл бұрын
Not tried buddy
@JavaTechie Lambda internally run on EC2 or containers?
@Javatechie
6 ай бұрын
Ec2 only
Other than curl how will you test this? Why on AWS you reused that environment you used just one function name? Can't you add one more for other method?
@Javatechie
3 жыл бұрын
Please check my AWS lambda and API gateway integration video I added more method
Can we add more (key,value)s in Configuration so that everytime I no need to change the configuration value with my java class function name ?
@Javatechie
Жыл бұрын
Yes you can
Can you provide video on light weight jar deploy on lambda
Nice video..how can we have more than one function here ?
Sir can you help me that docker image is OS dependent or not
@Javatechie
3 жыл бұрын
No it's not
I am trying out the example in this video. SpringBootRequestHandler is deprecated. What should I do with OrderHandler class?
@darylle6731
2 жыл бұрын
Instead of using OrderHandler class, I used org.springframework.cloud.function.adapter.aws.FunctionInvoker class. It works.
How we can integrate swagger with lambda service? can you share any sample
@Javatechie
3 жыл бұрын
I never tried let me check
any EKS video you have?
@Javatechie
3 жыл бұрын
I didn't tried it yet .
Can we have multiple Funtion_Name in AWS lambda function for single project?
@Javatechie
7 ай бұрын
Yes you can
Please make a video to retrieve data from mysql database using aws lambda in java.
Sir...if possible pls provide with document also...becz some statments and annotations are not understanding getting adouts...sir plzzz..
@Javatechie
4 жыл бұрын
This is simple application I shown please mention your doubts here
Can you please do one tutorial with integrating with the database?
@Javatechie
Жыл бұрын
It's already there please check with RDS and dynamodb
Can you do video on spring boot rest API application with AWS lambda (deploy). please
Thanks! but when i trie to run the application it's not bringing up the embedded tomcat. Am i missing something here?
@Javatechie
3 жыл бұрын
Any error or consol log
@jayakanthan.durairaj
3 жыл бұрын
@@Javatechie no error just the main method runs and completes without the tomcat not loaded!
@Javatechie
3 жыл бұрын
@@jayakanthan.durairaj server not required here Please try to understand what I explained about serverless , just expose your api as function without connect with any serve (tomcat)
@rajank2806
2 жыл бұрын
@@Javatechie for me also when i tried to run the application it's not bringing up the embedded tomcat. no error just the main method runs and completes without the tomcat not loaded!. since application is not ruuning so it can't expose any api
@rajank2806
2 жыл бұрын
after adding- spring-cloud-starter-function-web, it working
If this theme resonates with you, there's a book that'll likely echo in the same way. "AWS Unleashed: Mastering Amazon Web Services for Software Engineers" by Harrison Quill
Db connection examples also pls upload
@Javatechie
2 жыл бұрын
It's already there please checkout my AWS playlist
@mareshkrishnanv4995
2 жыл бұрын
@@Javatechie pls provide the youtube link anna
@Javatechie
2 жыл бұрын
kzread.info/dash/bejne/hpaamahtYtfJcto.html
please upload lambda jwt auth in gateway request without Cognito
Valuing these revelations? There's a book I'd spotlight that delves just as deep. "AWS Unleashed: Mastering Amazon Web Services for Software Engineers" by Harrison Quill
Hi sir How we will maintain version ing
@Javatechie
4 жыл бұрын
Which versioning you are asking ? Am not getting it
Will this run in local?? I've downloaded from git but app is terminated and spring boot does not work. :(
@Javatechie
3 жыл бұрын
Yes we can run in local
@arijitchaudhury9583
3 жыл бұрын
@@Javatechie I am not able to run in my local machine. What's the fix?
@Javatechie
3 жыл бұрын
What error are you getting
@arijitchaudhury9583
3 жыл бұрын
@@Javatechie Exception in thread "main" java.lang.ClassNotFoundException: org.springframework.boot.loader.thin.ThinJarLauncher at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.springframework.boot.loader.wrapper.ThinJarWrapper.launch(ThinJarWrapper.java:117) at org.springframework.boot.loader.wrapper.ThinJarWrapper.main(ThinJarWrapper.java:90)
@Javatechie
3 жыл бұрын
Don't upload thin jar . Please try to upload jar which end with suffix .AWS
Great, we can test this from postman as well I have 2 queries. 1. Can we deploy 2 services and communicate each other using resttemplate or any other? 2. Can you make a spring boot crud app and do in aws lambda?
@Javatechie
4 жыл бұрын
Will do 🙂
Spring context takes a very long time to load.
You got it completely wrong with AWS lamba and spring boot. You use AWS correto jvm with plain java or micronaut. When using lambda static or beans is not a good idea. On every request a new lambda is churned out. Use SAM template to package and deploy.
how execute POST request using lambda?
@Javatechie
3 жыл бұрын
Use Function for post method
@seatconnect224
3 жыл бұрын
@@Javatechie ok, thanks, but how to execute POST request during executing lambda from UI
@Javatechie
3 жыл бұрын
In lambda console you need to pass payload .
@seatconnect224
3 жыл бұрын
@@Javatechie ok thanks
@seatconnect224
3 жыл бұрын
also question regarding OrderHandler, why do you not using StreamLambdaHandler? github.com/awslabs/aws-serverless-java-container/wiki/Quick-start---Spring-Boot
Can you please add this code git and share the url
@Javatechie
3 жыл бұрын
Git link mentioned in video description
Deprecated!!!!!!