Amazon RDS | Deploy Spring Boot + MySQL CRUD Application into Elastic Beanstalk | JavaTechie
ฝัง
- เผยแพร่เมื่อ 26 ส.ค. 2024
- This tutorial will guide you ,how to integrate Spring boot application with MySQL using Amazon RDS and how to Deploy Spring Boot + MySQL CRUD Application into Elastic Beanstalk
#javatechie #AWS #RDS #SpringBoot
GitHub:
github.com/Jav...
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
you are just too good, you make me understand any complex thing in such a way ,that it seems so easy. When ever I got stuck anywhere ,I just search with Java Techie. Thank you so much.
Thanks Joyatee , glad to hear this 😊
best tutorial, straight to the point but i see server.port = 5000 is required because elastic bean search for the same port
Yes exactly even I don't know logic behind it .
Hi, Its really an amazing explanation, Thank a lot for this...I was also getting the Bad Gateway Problem, but i simply saw the comment chain and seen your suggestions to everyone.
Hence i resolved my issue....Thanks a ton boss 😍
Best video , tried it and successfully deployed, Thanks a lot
this channel is really good
Definitely
Hi Basant, first I want to thank you for the tutorial,
I did not understand why you have configured the database when creating the application in Beanstalk, since I continue to use the rds database created in the first example, I have done the same configuration without adding the database to the beanstalk and it worked correctly for me.
Am not sure but without configure in elastic beanstalk I faced some error .
@@Javatechie jugad acha hai..😛😛
@@amargupta1728 not getting you
@@Javatechie Nothing just joking..chill bro..😀
Aman cool 😃
Nice ... Please take the full realtime project of microservice, aws, and all other tools merge
thank you again for concise and clear tutorials, great job.
Great vdo...🙌🏻
Thank you so much
Thankyou so much, I was having trouble in connecting rds with spring boot. Extremely informative video.
Can you also create a video where we consume an external api and store it's output or status etc to RDS .
Okay
As usual, nice video. Thanks java techie
Nice video. I've a question here - why do we need specify the DB details in elastic beanstalk ? Any specific reason? The DB connectivity would be part of the app
Even I had same question , in beanstalk we are giving just name and pwd is it creating new db instance if not how is it recognized particular db instance which got created
I am the big fan know thank you so much 🥰
Good source of learning. Loved it😍😍. Thanks for such a wonderful content...
Appreciated for your Work...Nice Tutorials
Amazing content on your channel, man.
Thanks a lot.
You made it easy man. Salute
Thanks for AWS Rds... When application is deployed on AWS Elastic Beans talk table is recreated??.. That's why old 2 records are not available...
Yes in we need to chsbte hbm2.auto.ddl=update
Thanks alot, great content, works perfectly.
Thanks for the video... I was looking for that.... thank you sir. It's really helpful video.
you save my life
Thank you so much it worked. Best tutorial.
Hi, thanks for your video. We did not create the additional database configuration in EBS to deploy app wiith DynamoDB but we did only for app with MySQL DB. whats the reason behind it?
Hi guys .. I was trying to run the above application as mentioned but was getting error like unknown schema javatechie. So find out that we need to connect to database using mysql workbench and need to manually create schema like - create database javatechie. After that i was successfully make connection from springboot to aws-rds. I thought if just sharing with this if anyone get the same error. Bu default it was not able to connect . Thanks
Thanks a lot :-) this is my first deployed app and it successful.
Thank you
It looks so really easy....
This is wonderful video. Thank you very much!!!
Very useful video...thanks
Superb video Thank you so much
Bhai, gote complete ecommerce project using spring and angular with customer and admin pages with spring security and delpoyment tutorials banantu.
Aapana bahut bhala padhanti, matey apanka tutorials bahut bhala lagey.
Please gote ecommerce application banantu. Please.
I will try to start one project series 😊.
But it may take some time most probably mid of next month
@@Javatechie sure, I will wait
Hi Basant,
Thanks for the tutorial. Very nicely explained. Just want to mention that git hub source code is missing pom.xml file. Please correct the source code file.
Thanks buddy let me check I will add
@@Javatechie The souce code is still missing the pom.xml file. Can you please add. Thanks
@@bhushangosavi435 please use below pom github.com/Java-Techie-jt/springboot-aws-secrets-manager/blob/main/pom.xml
deployed successfully, Thank u :)
Bro, Give some basic tips on how to crack interview (not regarding tech but just common basic) who is working on any other platform and who haven't worked in Full Stack in his/her career.
Like some basic questions:
1. What he/she checks first just after login to his system.
2. What will be his/her role and responsibilities as 2+ years experienced person
3. Shall we proceed to say that i am part of Agile? If not how can i deal the question..
4. What kind of calls do we have on daily basis? If Agile/Scrum or If not Agile/Scrum
5. What kind of instant requests we receive for troubleshooting? Frontend or Backend
6. How Full Stack Developer deploy the newly implemented feature into Production apart from PCF and other cloud technologies(AWS, Azure, Docker, Kubernetes)
Like a usual day to day life of a full stack Java developer including live deployement..
is there any another specification rules for JSP front-end for spring boot? As, I have tried everything, I can connect the MySQL rds hosted on aws from locally, but after deploying whole app, I am getting Whitelabel Error Page (404) error. But, all of my controller and jsp front-end works fine in local env, but not working on elasticbean
Good video
Super video
Very usefull
Hi Basant thanks for all your videos very good content .
I have a question here while deploying via bean stalk can we configure security groups like we did in your video of creating EC2 instance first Also can we see S3 bucket contents as well using beanstalk ? and how load balancing, versioning and deploy multiple instances done in aws .can you make some video on this as well ?
Yes of course we can as under the hood beanstalk also create an EC2 instance
It helped alot sir. thanks
How to deploy different microservices running on different ports ??
Great tutorial.Thanks
Great Tutorial!!
Hi just wanna know one thing instead of keeping yaml in code, can we put it in S3 bucket and can read from there. If yes ,how? --spring .config .location does not load.
Yes I believe it should work but not sure as I never tried this.will check this
Hi, I get 502 Bad Gateway
nginx/1.20.0 after deploying my springboot app. What's the cause of this... Please help?
Please change server port to 5000
Thank you very much for wonderful video.
please help
Elastic Beanstalk deploy working on postman and not on browser
same prblm too me also'
Thanks for this nice tutorial I have 2 questions though
Where I can find the .jar you did select in the target folder I just couldn't find it?
How much I should pay for the service at the beginning?
Run maven install then jar will be available in your target folder
Where can find the maven install option , in my sts it is not showing maven
Server. Port 5000 but still getting badway after deployment.. Help me out
Thank you ❤
I am getting "Access denied error using Password NO" while running the app even after entering correct master db password...please help
Have you configured secrets
thank you so much!
Thank you sir its really helpful but i am getting 502 bad gateway error. I have changed server port to 5000 and on my local everything working fine even with aws rds. Please help here
If you configure RDS specific datasource in your application.properties file
Will you able to access ?
does anyone know how to connect EBS with a PRIVATE RDS instance?
Hi, When I Am Uploading Jar File In Elastic Bean Stalk getting Exception No Source Code available And Jar File Not uploading Successfully, But Eecutable Jar Running in Cmd Prompt. Any Solution is There ?
Great video... thanks!! Can we how to upload the frontend to the aws?
It's there buddy th-cam.com/video/TLwMumqyGEQ/w-d-xo.html
Hello Sir
I can follow each and every step for.this videos everything is working good but at the end Showing this error in my pc screen 502 bad gateway error
Please change server.port 5000 in your application.properties
@@Javatechie okk sir
Can you please Show how to setup SSL for Java Elastic beanstalk AWS
Danke. sehr gut erklärt
Thanks!
Can we use ec2 instead of elastic bean stalk as it will be cost efficient 10:15
Yes you can even already I did that in video. Elastic beanstalk also internally create an EC2 instance
Hi, can i know any way to connect java app with rds mysql?
Yes you can do that Just use AWS SDK for java Even you can find the simple steps in AWS official page itself
POM file is not available in the github repo?? why??
Yeah Buddy not sure I also notice it now . Let me share you another reference
github.com/Java-Techie-jt/springboot-aws-secrets-manager/blob/main/pom.xml
Thank you bro.
Hi ... I created DB in RDS and able to connect from MySQL work bench. I also able to connect from my Spring Boot application when its start-up.
But when I trying connect controller method, its giving
"status": 404,
"error": "Not Found",
"path": "what ever path it is"
I checked same application without RDS working. Any clue?
404 means it's something wrong in your URL .share your code in GitHub and curl which you tried .
@@Javatechie , thanks for addressing fast. I tried freshly, this time all is good.
Great 👍🏻
Nice video sir, say we are using Nosql example couchbase, then in this case how can we use couchbase in AWS.
Am not sure about this need to check
Sure thank you
im getting 502 bad request what can i do
Check application health in elastic beanstalk
Hi Basant. Is it necessary to put ddl-auto, database-platform properties.
Thank you for the video.
database-platform we can ignore but ddl-auto we must need to specify if not you need to create table manually .
Thank you for your tutorial. Is it possible to host small spring boot microservice (Eureka server, Config Server, Multiple RestFul APIs) in the same way ?
Eureka server is not there in AWS but yes through API gateway we can host
@@Javatechie can we host user developed Eureka Server, user developed Config Server ?
Do we need All traffic rule in Inbound rules?
We should customize it in case of realtime application .this is just a demo
Hi, I am new to AWS. Are both the DB env (RDS and ElasticBeanstalk) different? As it does not show the previous records stored through Postman hit.
It should display
it's because we have "spring.jpa.hibernate.ddl-auto = create" in the application.properties (check 05:10). if we had it as "update" we could see the existing values. The value "create" enforces to re-create the schema on application start-up.
Hi, I have followed same steps and deployed application in Elastic Beanstalk but when I access URL I am getting 502 bad gateway nginx. Could you please let me know how to resolve it.
Please check server.port it should be 5000
@@Javatechie Hi, Thanks for your help its worked for me after changing server.port=5000 in application.properties file. But is it only 5000 or any range required in choosing port number?
Hi one more doubt I am getting in this example. Test purpose I have dropped table from mysql workbench and try to access yathamsapp-env.eba-pzc3ypxp.us-east-1.elasticbeanstalk.com/policies/all then I am getting "Sun Jul 18 08:03:18 UTC 2021
There was an unexpected error (type=Internal Server Error, status=500)." Even If try to add data from postman by using above url also getting same ""error": "Internal Server Error",". If I restart my local springboot application then table is creating. What is the reason behind this?
Hi bro. I am try to deploy my spring boot app but i am getting Degrated Error after jar upload can some please help on this
What is the error
@@Javatechie its showing as " impaired services in all instances"
Getting Unknown database 'firstrds'. I am doing anything wrong ?
Are you able to connect your db with connection string in MySQL workbench
@@Javatechie issue is sorted. Big big thanks to you sir. I was looking for this series after my certification.Big Thanks to You
Sir please define in aws how can fix 502 bad gateway error
Thanks
Hello.sir
How can connect h2 database to aws deployment
pom.xml is missing in git code
Thanks for the video, but I am getting 502 Bad Gateway nginx/1.20.0. RDS works fine. Can some please help?
Found the solution, added the PORT number in configurations(in AWS configurations) that I assigned to my app in the local.
even after making server.port=5000, i am getting nginx error, 502 bad gateway. Any solution?
Have you figured it? Even I am facing same issue
@@rajidipuneeth9900 plz let me also know if u have solved the problem
What is the error you are getting and what did you mentioned server.port
If this content speaks to you, this book will sing. "AWS Unleashed: Mastering Amazon Web Services for Software Engineers" by Harrison Quill
thanks
Why have you created another RDS instance with Elastic Beanstalk, didn't you already created one at the begging of the video?
I created once only right ?
@@Javatechie At the beginning of the video you created one RDS and connected to it from MySQLWorkbench and Spring Boot application, at the second part of the video you modified Database configuration in Elastic Beanstalk, which is supposed to create a new database, not connect to existing database, isn't it?
No it will connect to existing RDS instance .
Check in config I mentioned the same
@@Javatechie As far as I understand, Elastic Beanstalk creates a new database, unless you set connection parameters to the existing database as environment variables - serverfault.com/a/540916
@@nu.cs.master true
At 10:45 what to choose if my application is written with java11 version? please someone reply if u know....!
You can choose java 11
@@Javatechie java11 is not there in the option sir....
Jdk 11 should be there wait let me check
@@Javatechiesir there is corretto11....is this the java jdk11?
No I am not sure
Nos dias de hoje não funciona.
Hi I am getting Access denied for user 'admin '@'124.13.255.95' (using password: YES). Appreciate any help to fix the error
thanks
How do I connect my front end to view this stored data?
Just invoke this backend api from frontend
@@Javatechie I used Aws s3 for my front end deployment, even after using the endpoint from EC2, I was not gettting my data from the backend
I fixed the problem, seems I was invoking the backend from my package.json, which was the central proxy. I fixed this by inserting the endpoint everywhere I fetch data from the backend
I am getting error like "Field bookRepository in Application required a bean of type".
Please help me
Are you able to run this application in your local instance ? First test it in local by giving datasource info
Thanks man
I'm wondering how to deploy multiple instances on a same stack
your code in git is not updated it seems, any annotation you missed with "BookRepository.java" file? Also i couldn't find pom file
***************************
APPLICATION FAILED TO START
***************************
Description:
Field bookRepository in com.javatechie.aws.Application required a bean of type 'com.javatechie.aws.BookRepository' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.javatechie.aws.BookRepository' in your configuration.
It seems there is some glitch from GitHub while uploading content to GitHub. Are you able to resolve or not?
It is free of cost or paid version
It will be chargeable but a very minimum amount near to 15 rs Indian currency per month
@@Javatechie how to pay
Caused by: java.sql.SQLException: Access denied for user 'admin'@'' (using password: YES)
Please provide valid password . Error message says you configured wrong username and password
@@Javatechie thank you :)
is RDS opensource?
Yes opensource , as am using AWS free account
@@Javatechie that does not make open source
Please send me the pom file
i am getting 502 bad gateway
what should i do
Did you specify server.port=5000
If not set it then run once , if it will workout then I can suggest what to do okay
i got the 200 response by postman with rds
but with beanstalk I am getting 502 bad gateway
Dude as I mentioned please change server.port=5000 then create a jar and deploy in beanstalk
If you don't want this then go to elastic beanstalk environment then change port there .
@@Javatechie Thanks dear, I got the response by using port 5000.
after connection with mysql workbench . can we directly add or delet rows or table or values in mysql workbench ? and it will be reflected in aws rds???
Yes it will
Yes in workbench you'll have to make a new connection and in host add the rds endpoint and the master password and everything will be reflected there
what does @SneakyThrows means or is used for? first time i see it, thank you!
If you want to avoid throws exception from your method just use this annotation
Amazing video thanks 🙏🏽
even after making server.port=5000, i am getting nginx error, 502 bad gateway. Any solution?
Did you configure security for MySQL ?
Java Techie the one in security groups? I did give it custom and 0.0.0.0/0 though
Did you rebuild the jar after changes server.port ?
Java Techie yes, clicked on maven-> install and then uploaded snapshot in elasticbean
@@krishnamalhotra3206 @Java Techie same error coming to me also