Skip to content

Commit

Permalink
rds article
Browse files Browse the repository at this point in the history
  • Loading branch information
mnarayan1 committed May 17, 2023
1 parent 3eb80f2 commit bd7f3b8
Showing 1 changed file with 108 additions and 0 deletions.
108 changes: 108 additions & 0 deletions _notebooks/2023-05-16-RDStutorial.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# RDS Tutorial\n",
"> Setting up AWS RDS PostgreSQL Database and connecting with Spring Boot\n",
"\n",
"- layout: default\n",
"- badges: false"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# What is RDS? \n",
"\n",
"Rather than having a database stored on a local file, the RDS database is stored on the cloud. "
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Creating the RDS Database Instance\n",
"\n",
"Instructions here"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"In ``pom.xml``, add the following dependencies:\n",
"\n",
"```\n",
"<dependency>\n",
"\t<groupId>org.springframework.boot</groupId>\n",
"\t<artifactId>spring-boot-starter-data-jpa</artifactId>\n",
"</dependency>\n",
"<dependency>\n",
"\t<groupId>org.springframework.boot</groupId>\n",
"\t<artifactId>spring-boot-starter-web</artifactId>\n",
"</dependency>\n",
"<dependency>\n",
"\t<groupId>org.postgresql</groupId>\n",
"\t<artifactId>postgresql</artifactId>\n",
"\t<scope>runtime</scope>\n",
"</dependency>\n",
"\n",
"```\n",
"\n",
"In ``application.properties``, add the following configurations:\n",
"\n",
"```\n",
"spring.datasource.url=jdbc:postgresql://<database-endpoint-url>:<port>/<database> \n",
"spring.datasource.username=YOUR_USERNAME\n",
"spring.datasource.password=YOUR_PASSWORD\n",
"spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect\n",
"spring.jpa.hibernate.ddl-auto=update\n",
"spring.jpa.hibernate.show-sql=true\n",
"\n",
"```\n",
"\n",
"Now, the spring application is connected to the RDS database in the cloud. "
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Using the Database\n",
"\n",
"After setting up the RDS database, you should be able to work with spring as usual. \n",
"\n",
"https://nirajsonawane.github.io/2022/04/18/Spring-Boot-AWS-RDS/"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit bd7f3b8

Please sign in to comment.