<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vishnu B</title>
    <description>The latest articles on DEV Community by Vishnu B (@vishnub33527201).</description>
    <link>https://dev.to/vishnub33527201</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F345228%2F99946c2e-f59d-4ca7-bf62-fd3ee3f2ac70.jpg</url>
      <title>DEV Community: Vishnu B</title>
      <link>https://dev.to/vishnub33527201</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vishnub33527201"/>
    <language>en</language>
    <item>
      <title>Recursion -1</title>
      <dc:creator>Vishnu B</dc:creator>
      <pubDate>Sun, 25 Aug 2024 07:09:24 +0000</pubDate>
      <link>https://dev.to/vishnub33527201/recursion-1-3p1e</link>
      <guid>https://dev.to/vishnub33527201/recursion-1-3p1e</guid>
      <description>&lt;h2&gt;
  
  
  Introduction 1
&lt;/h2&gt;

&lt;p&gt;The process in which a function calls itself is called recursion and the&lt;br&gt;
corresponding function is called a &lt;strong&gt;recursive function&lt;/strong&gt;.&lt;br&gt;
Since computer programming is a fundamental application of mathematics, so let&lt;br&gt;
us first try to understand the mathematical reasoning behind recursion.&lt;br&gt;
In general, we all are aware of the concept of functions. In a nutshell, functions are&lt;br&gt;
mathematical equations that produce an output when providing input. For example:&lt;br&gt;
Suppose the function F(x) is a function defined by: F(x) = x^2 + 4&lt;br&gt;
We can write the Java Code for this function as: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;public static int F(int x){&lt;br&gt;
 return (x * x + 4);&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, we can pass different values of x to this function and receive our output&lt;br&gt;
accordingly.&lt;br&gt;
Before moving on to the recursion, let's try to understand another mathematical&lt;br&gt;
concept known as the &lt;em&gt;&lt;strong&gt;Principle of Mathematical Induction (PMI)&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Principle of Mathematical Induction (PMI) is a technique for proving a statement, a&lt;br&gt;
formula, or a theorem that is asserted about a set of natural numbers. It has the&lt;br&gt;
following three steps:&lt;br&gt;
1.** Step of the trivial case*&lt;em&gt;: In this step, we will prove the desired statement for&lt;br&gt;
a base case like n = 0 or n = 1.&lt;br&gt;
2.&lt;/em&gt;* Step of assumption**: In this step, we will assume that the desired statement&lt;br&gt;
is valid for n = k.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;To prove step&lt;/strong&gt;: From the results of the assumption step, we will prove that,
n = k + 1 is also true for the desired equation whenever n = k is true.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For Example: Let’s prove using the Principle of Mathematical Induction that:&lt;br&gt;
S(N): 1 + 2 + 3 + ... + N = (N * (N + 1))/2&lt;br&gt;
(The sum of first N natural numbers)&lt;br&gt;
Proof:&lt;br&gt;
Step 1: For N = 1, S(1) = 1 is true.&lt;br&gt;
Step 2: Assume, the given statement is true for N = k, i.e.,&lt;br&gt;
1 + 2 + 3 + .... + k = (k * (k + 1))/2&lt;br&gt;
Step 3: Let’s prove the statement for N = k + 1 using step 2.&lt;/p&gt;

&lt;p&gt;To Prove: 1 + 2 + 3 + ... + (k+1) = ((k+1)*(k+2))/2&lt;br&gt;
Proof:&lt;/p&gt;

&lt;p&gt;Adding (k+1) to both LHS and RHS in the result obtained on step 2:&lt;br&gt;
1 + 2 + 3 + ... + (k+1) = (k*(k+1))/2 + (k+1)&lt;/p&gt;

&lt;p&gt;Now, taking (k+1) common from RHS side:&lt;br&gt;
1 + 2 + 3 + ... + (k+1) = (k+1)*((k + 2)/2)&lt;/p&gt;

&lt;p&gt;According to the statement that we are trying to prove:&lt;br&gt;
1 + 2 + 3 + ... + (k+1) = ((k+1)*(k+2))/2&lt;br&gt;
Hence proved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Working of recursion
&lt;/h2&gt;

&lt;p&gt;We can define the steps of the recursive approach by summarizing the above three&lt;br&gt;
steps:&lt;br&gt;
● Base case: A recursive function must have a terminating condition at which&lt;br&gt;
the process will stop calling itself. Such a case is known as the base case. Without a base case, it will keep calling itself and get stuck in an&lt;br&gt;
infinite loop. Soon, the recursion depth* will be exceeded and it will throw&lt;br&gt;
an error.&lt;br&gt;
● Recursive call: The recursive function will invoke itself on a smaller version&lt;br&gt;
of the main problem. We need to be careful while writing this step as it is&lt;br&gt;
crucial to correctly figure out what your smaller problem is.&lt;br&gt;
● Small calculation: Generally, we perform a calculation step in each recursive&lt;br&gt;
call. We can achieve this calculation step before or after the recursive call&lt;br&gt;
depending upon the nature of the problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;em&gt;: Recursion uses an in-built stack that stores recursive calls. Hence, the&lt;br&gt;
number of recursive calls must be as small as possible to avoid memory overflow. If&lt;br&gt;
the number of recursion calls exceeds the maximum permissible amount, the&lt;br&gt;
**recursion depth&lt;/em&gt;** will be exceeded.&lt;br&gt;
Now, let us see how to solve a few common problems using Recursion&lt;/p&gt;

&lt;p&gt;Problem Statement - Find Factorial of a Number&lt;/p&gt;

&lt;p&gt;Approach: Figuring out the three steps of PMI and then relating the same using&lt;br&gt;
recursion&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Induction Step: Calculating the factorial of a number n - F(n)
Induction Hypothesis: We have already obtained the factorial of n-1 - F(n-1)&lt;/li&gt;
&lt;li&gt;Expressing F(n) in terms of F(n-1): F(n)=n*F(n-1). Thus we get&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;public static int fact(int n){&lt;br&gt;
 int ans = fact(n-1); #Assumption step&lt;br&gt;
 return ans * n; #Solving problem from assumption step&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The code is still not complete. The missing part is the base case. Now we will
dry run to find the case where the recursion needs to stop. Consider n = 5:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftwofnp91jc21f45qdvdp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftwofnp91jc21f45qdvdp.png" alt="Image description" width="539" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we can see above, we already know the answer of n = 0, which is 1. So we will&lt;br&gt;
keep this as our base case. Hence, the code now becomes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;public static int factorial(int n){&lt;br&gt;
 if (n == 0) // base case&lt;br&gt;
 return 1;&lt;br&gt;
 else&lt;br&gt;
 return n*factorial(n-1); // recursive case&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>tutorial</category>
      <category>learning</category>
      <category>java</category>
    </item>
    <item>
      <title>Deploy your Artifact publicly using AWS Resource within 20 Minutes using AWS EBS AND RDS !!!! - High Level P-2</title>
      <dc:creator>Vishnu B</dc:creator>
      <pubDate>Thu, 31 Mar 2022 07:54:04 +0000</pubDate>
      <link>https://dev.to/vishnub33527201/deploy-your-fat-jar-publicly-using-aws-resource-within-20-minutes-using-aws-ebs-and-rds-high-level-p-2-1674</link>
      <guid>https://dev.to/vishnub33527201/deploy-your-fat-jar-publicly-using-aws-resource-within-20-minutes-using-aws-ebs-and-rds-high-level-p-2-1674</guid>
      <description>&lt;h2&gt;
  
  
  AWS EBS [Elastic Beanstalk] -
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Elastic Beanstalk is a platform within AWS that is used for deploying and scaling web applications&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before starting the process configure the port no to 5000 in application.properties  file in your spring boot app.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;server.port=5000&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now we need to deploy our application publicly using AWS EBS.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Search and open Elastic BeanStalk Service in AWS as mentioned below.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgplc6ho0b6036rwz8uez.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgplc6ho0b6036rwz8uez.png" alt="Image description" width="800" height="177"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you've landed on EBS Service and click on Create Application&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbejbfrdcb3szop61yyea.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbejbfrdcb3szop61yyea.png" alt="Image description" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now we you've to give Application Name and meta-data(Application Tags)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;During this process we need to give correct platform to run our application. EBS provide some pre-configured AMI[Amazon Machine Image]. Now select Java as platform, Platform branch as Corretto 8 running on 64bit Amazon Linux 2(I'm using  java 8 here) and use Platform version as default one.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfxhvdg35o9enzlhlaac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfxhvdg35o9enzlhlaac.png" alt="Image description" width="800" height="740"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on Upload your code and select Local File.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click On Choose File and select jar which you need to deploy and you can mention application code tags as well if you needed.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttzzym62uha9q00w8tp2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttzzym62uha9q00w8tp2.png" alt="Image description" width="800" height="592"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What happened in the background during EB environment creation?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;During the process we've selected Platform as java and Platform branch as Corretto 8 running on 64bit Amazon Linux 2. So EBS provide preconfigured EC2 instance (Virtual Machine) with java 8 installed with security group having port 80 in inbound rule. In this EC2 instance there is no key-pair is configured so we cant communicate this ec2-instance using different tools like putty, MobaXterm, etc..&lt;/p&gt;

&lt;p&gt;Once sg is provisioned then it will associate the elastic ip address to ec2 instance.(Provide static ip address -ip will not change after restart of EC2 instance).&lt;/p&gt;

&lt;p&gt;If we upload the code the code will be stored in &lt;strong&gt;S3&lt;/strong&gt; -Simple Storage Service in AWS(SIMPLE STORAGE like drive) that will deployed as application in instance.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once the application is started you will get an URL under the environment name like this.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffuo2btwn458u8y3dn1xp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffuo2btwn458u8y3dn1xp.png" alt="Image description" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now the application is hosted in AWS Cloud. Now you can use this Application URL to test the Micro services in using API testing tools like Postman, Hoppscotch, ... etc. While testing the application you've to give the URL instead of localhost and port no.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgto70mvj7c9id7bk5cc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgto70mvj7c9id7bk5cc7.png" alt="Image description" width="664" height="588"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure the you've configured the port no to 5000 in spring boot app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Because Elastic Beanstalk always run on port 5000(This is configured by nginx -reverse the request coming from port 80 to 5000).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;del&gt;THE END&lt;/del&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>springboot</category>
      <category>elasticbeanstalk</category>
      <category>ec2</category>
    </item>
    <item>
      <title>Deploy your build publicly using AWS Resource within 20 Minutes using AWS EBS AND RDS !!!! - High Level P-1</title>
      <dc:creator>Vishnu B</dc:creator>
      <pubDate>Fri, 25 Mar 2022 14:29:34 +0000</pubDate>
      <link>https://dev.to/vishnub33527201/deploy-your-fat-jar-publicly-using-aws-resource-within-20-minutes-using-aws-ebs-and-rds-high-level-p-1-hk</link>
      <guid>https://dev.to/vishnub33527201/deploy-your-fat-jar-publicly-using-aws-resource-within-20-minutes-using-aws-ebs-and-rds-high-level-p-1-hk</guid>
      <description>&lt;h2&gt;
  
  
  AWS RDS[Relational Database Service] -
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;It is a web service running "in the AWS cloud" designed to simplify the setup, operation, and scaling of a relational database for use in applications.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;br&gt;
Not worry about&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Replication&lt;/li&gt;
&lt;li&gt;Auto backups&lt;/li&gt;
&lt;li&gt;Auto Recovering&lt;/li&gt;
&lt;li&gt;Caching&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hope you have an account in AWS cloud! Else you can create an account in AWS(Its not a rocket science, its very simple).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon RDS is pay as you go.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Storage is billed per gigabyte per month, and I/O is billed per million-request.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Search and open RDS service in AWS as below mentioned snap.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi86toex8gdm4ddry7300.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi86toex8gdm4ddry7300.png" alt="Image description" width="800" height="382"&gt;&lt;/a&gt;&lt;br&gt;
**&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps to follow to create a database in RDS.
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click create database&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose &lt;strong&gt;Standard create&lt;/strong&gt; database creation method&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select Engine Type as MySQL.&lt;br&gt;
Amazon Aurora(optimized combined version of postgres and MySQL), MariaDB, PostgreSQL, Oracle, Microsoft SQL Server are the different engines which are available in RDS Service.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the version which is matching the version that you've used in springboot.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose Free tier(Use RDS Free Tier to develop new applications, test existing applications, or gain hands-on experience with Amazon RDS)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Give a name for your DB instance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setup the db credentials (username and password for db)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make the RDS visibility as publicly access mentioned below snap&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keep other things as default and click Create Database&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvzw4kciwrztif1ucimp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvzw4kciwrztif1ucimp.png" alt="Image description" width="787" height="859"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh60r9w0haxm3py6vv4dn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh60r9w0haxm3py6vv4dn.png" alt="Image description" width="789" height="773"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjywsi756gvdmmr88xopk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjywsi756gvdmmr88xopk.png" alt="Image description" width="774" height="880"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tyyrd8h2lrfi1typdoq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tyyrd8h2lrfi1typdoq.png" alt="Image description" width="768" height="490"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6pdlxdmbo2msq7jfnhe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6pdlxdmbo2msq7jfnhe.png" alt="Image description" width="778" height="861"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;strong&gt;TADAAAH!!! DB CREATED Successfully&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fews3zxvoe3mkaec5olqs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fews3zxvoe3mkaec5olqs.png" alt="Image description" width="800" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click the demo-db identifier and you can see that an &lt;em&gt;endpoint&lt;/em&gt;  and the &lt;em&gt;port number 3306&lt;/em&gt; are shown under Connectivity and Security area. &lt;/p&gt;

&lt;p&gt;Before testing the connection in MYSQL Workbench you should open the port number 3306 for this demo-db.&lt;/p&gt;

&lt;p&gt;If you scroll down you can see two security group roles are present which is mentioned as default under &lt;strong&gt;Security Groups section&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Select a SG(Security group) from that who is having CIDR/IP - Inbound as Type. SG acts like a firewall for RDS [Restricting the access], so we have to open the port 3306[Allowing access to request which is coming only from port 3306].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Integrate demo-db [RDS] to our SpringBoot app&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use this configuration in &lt;em&gt;application.properties&lt;/em&gt; file:&lt;br&gt;
&lt;strong&gt;spring.datasource.url&lt;/strong&gt;=jdbc:mysql://&amp;lt;&lt;em&gt;Give endpoint as hostname&amp;gt;:3306/schema_name&lt;br&gt;
&lt;strong&gt;spring.datasource.username&lt;/strong&gt;=&amp;lt;_username given during initial setup for RDS&lt;/em&gt;&amp;gt;&lt;br&gt;
&lt;strong&gt;spring.datasource.password&lt;/strong&gt;=&amp;lt;&lt;em&gt;password given during initial setup for RDS&lt;/em&gt;&amp;gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Please check/test connection using MySql WorkBench by configure connection by giving hostname as endpoint which is generated after the db creation in RDS and give credentials which is given during db setup.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Yaaay!!!Now you're successfully configured springboot to RDS.&lt;br&gt;
Now your data will be stored in cloud!!!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next Part we will discuss how to deploy the fat jar in Elastic BeanStalk.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>rds</category>
      <category>ec2</category>
      <category>eb</category>
      <category>springboot</category>
    </item>
  </channel>
</rss>
