Spring boot code for AWS RDS in elasticbeanstalk

Are you new to aws RDS,elasticbeanstalk world and searching for a ready to use code for RDS connection? Try out out this sample project which connects RDS (mysql) from a web application (Spring boot + web ) and list out table records. You can run this web application in your local computer or in elasticbeanstalk (deploy rdselasticbean-0.1.war file). To test this code for your own RDS schema you need to change connection endpoint in record fetcher class. You may clone code from my gitlab repo.
Like it, if you find it helpful. Comment/Contact me if you face any issue while running this app. It’s all pretty straightforward, and quite handy for many kinds of elasticbeanstalk and RDS needs.

package com.example.rdselasticbean.db.DBrecordFetcher
(please make sure your RDS security group has proper access permissions for external IPs ) 

PS: Project is CI/CD enabled in case if anyone wants to test this in integrated environment.

Data display in JSP injected from DB operation class
RDS (mysql) server event view on Read and Write

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.