Skip to content

Commit 27e1428

Browse files
committed
update readme
1 parent 7b63198 commit 27e1428

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

aws/aws-rds-hello-world/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RDS Hello World
1+
# RDS Hello World Application
22

33
This is a simple Spring Boot application which requires access to a PostgreSQL database.
44

@@ -7,3 +7,19 @@ The application has a single endpoint `/hello` which prints out if the database
77
Get it in a Docker image via `docker pull reflectoring/aws-rds-hello-world`.
88

99
Use the image instead of your real application to test AWS CloudFormation stacks which need access to a database.
10+
11+
## Testing AWS RDS connectivity with this application
12+
13+
1. Create an RDS PostgreSQL database with the AWS console.
14+
2. Note the endpoint of your RDS database in the AWS console.
15+
3. Deploy the Docker container `reflectoring/aws-rds-hello-world` into AWS instead of your real application (this could be via a CloudFormation stack, manually, or however you are deploying your app).
16+
4. Configure your deployment in a way that Docker will pass the coordinates to your RDS database as environment variables, equivalent to this command:
17+
```
18+
docker run \
19+
-e SPRING_DATASOURCE_URL=jdbc:postgresql://<RDS-ENDPOINT>:5432/postgres \
20+
-e SPRING_DATASOURCE_USERNAME=<USERNAME> \
21+
-e SPRING_DATASOURCE_PASSWORD=<PASSWORD> \
22+
-p 8080:8080 reflectoring/aws-rds-hello-world
23+
```
24+
5. If the Spring Boot application can connect to the database, it will start up sucessfully and serve a message on the endpoint `/hello`.
25+

0 commit comments

Comments
 (0)