Skip to main content

Posts

Showing posts with the label aws

Deploying Spring Boot talking to MySQL on AWS

In a recent post, I listed some very basic information about running a MySQL database on AWS.  In most cases, we don't want a database alone; we want an application that uses that database for CRUD. I've created a simple Spring Boot application that exposes a REST API to create and manage lists of things.  The list values are all stored in a MySQL database. When I went to deploy the application on AWS using Elastic Beanstalk, there were some really good, automatic things that happened to make my life easy: AWS can deploy a Spring Boot jar very easily by simply uploading the jar during setup. AWS creates security groups on the fly so I don't have to worry about extra security configuration. AWS automatically generates DNS information and provides me a URL for accessing the application. As I deployed the application and saw all of these things, I was pretty excited.  It is nice to have a lot of this stuff taken care of for me. Then, I tried to test my appli...

MySQL on AWS

I commonly need a simple database for things I want to do.  MySQL has been my simple and free go-to tool for years.  MySQL has been around for a long time, is free, and is freely supported with micro instances on AWS. To create a MySQL instance on AWS, follow the directions provided by AWS .  Notice that the database should be publicly accessible: Publicly Accessible: Choose Yes. This will allocate an IP address for your database instance so you can directly connect to the database from your own device. Everything else seems fairly straight forward.  Once done, the dashboard will tell you that creation is in process.  After a few minutes, the database will be ready, and we can test it with a client.  IntelliJ, my IDE of choice, can test this for us.  After entering the information provided for the hostname and then using provided credentials, we have a successful connection, and we can query away: