
#Part 3 - Setting Up our RDS Database
Introduction
Welcome back to part 3 of my course on building a blog with Vue.JS on AWS. In this part of the course, we are going to be setting up an RDS instance which will store all of our blog’s articles and posts.
Once we have our database instance set up and our schema defined, we can then move on to building Lambda functions that will query this database and return the results to our frontend.
These Functions will do as follows:
- Return all blog posts - This will return a paginated JSON list of all of the blog posts within our database
- Return single blog post - This will return a JSON object containing one particular blog post
- Create a blog post - This will allow authenticated users of the site to create new blog posts and upload them to our site
- Update a blog post - This will allow authenticated users who created a post the ability to update their posts
- Delete a blog post - this will allow authenticated users the ability to delete a blog post
This represents a fairly standard set of endpoints that will allow give us most of the basic functionality our blog will need in order to work.
Amazon Aurora
For the purposes of this tutorial series, we’ll be creating an Amazon Aurora DB instance which will be MySQL 5.6 compatible. This will cost roughly $30/month to run in a single-node configuration.
Now, the “lower” cost option for spinning up a database could be to run an EC2 t2.micro instance and run MySQL on top of that. However, you then have to worry about things such as resiliency, automatic failover, monitoring and more. By buying into these managed services, we effectively trade our money for peace-of-mind.
And, whilst the absolute cost of the Amazon Aurora database might be higher than an MySQL database running atop of an EC2 instance, you have to bear in mind that you are paying for something that can grow to suit your applications high demands with no additional time invested on your part.
If our blog happens to go viral for any reason, Amazon Aurora will be able to handle the massive surge in traffic.
Creating our RDS Instance
So, let’s get started by creating our RDS instance.
Our Lambda Functions
Insert Post
Get Post
Update Post
Delete Post
All Posts - Paginated
Conclusion
Continue Learning
Part 5 - Getting Started With AWS Cognito
In this tutorial, we are going to set up our Cognito user pools so that we can start to build admin panels that only select people can access.
Part 4 - Setting Up Our Dynamodb Table
In this tutorial, we are going to define our first DynamoDB table and try inserting, deleting and updating blog posts into our table before finally updating our first lambda function
Part 2 - Getting Started With AWS Lambda
In this tutorial, we are going to get up and running with some very simple Lambda functions and deploying them using the serverless api.
Part 1 - Setting Up Our CI/CD Pipeline to S3
In this tutorial, we are going to look at how we can deploy our Vue.js application to S3 and set up our CI/CD pipeline