How To Launch RDS Instance In a Specific Subnet

Let’s launch a Postgres RDS in AWS. You will get 750 hours of Amazone RDS Single-AZ db.t2.micro instance as part of 12 month free tier. You also have a bit of options (MySQL, MariaDB, or SQL Server). I am choosing Postgres here.

Amazon RDS makes it easy to set up and maintain a relational database. A few clicks of the button, you will have a fully working database. How awesome!

This is one of the steps in How To Create Your Personal Data Science Computing Environment In AWS.

According to my plan, I want to have Postgres in Subnet B from AZ2. Let’s get started.

Steps

(1) Go to RDS dashboard and click Get Started Now.

(2) Choose PostgreSQL

Tick ‘Only enable options eligible for RDS Free Usage Tier’ if you are still eligible for free tier. If you choose free tier, Multi-AZ option is not available.

(3) Set user name and password

(4) Configure advanced settings

Choose VPC and right availability zone. Once you choose the right availability zone 2, the database will be in the Subnet B according to our plan. Make sure to attach the security group we created previously (How To Configure Network Access Control Lists (NACLs) and Security Groups in AWS).

Make sure the instance is publicly accessible.

Add database name. I named it as mydatahack. Keep the default port of 5432.

(5) Connect to Postgres from your desktop.

Grab endpoint from the RDS dashboard and set up connection in your SQL client. I use pgAdmin as a client.

(6) Set up users and schemas

Now you can set up users and schemas. Check out the entry here: How To Create User Credentials And Grant Privileges In Postgres.

We now have a working Postgres RDS.

Let’s go back to How To Create Your Personal Data Science Computing Environment In AWS to complete the rest of the steps! You are almost there!

Git
How to specify which Node version to use in Github Actions

When you want to specify which Node version to use in your Github Actions, you can use actions/setup-node@v2. The alternative way is to use a node container. When you try to use a publicly available node container like runs-on: node:alpine-xx, the pipeline gets stuck in a queue. runs-on is not …

AWS
Using semantic-release with AWS CodePipeline and CodeBuild

Here is the usual pattern of getting the source from a git repository in AWS CodePipeline. In the pipeline, we use AWS CodeStart to connect to a repo and get the source. Then, we pass it to the other stages, like deploy or publish. For some unknown reasons, CodePipeline downloads …

DBA
mysqldump Error: Unknown table ‘COLUMN_STATISTICS’ in information_schema (1109)

mysqldump 8 enabled a new flag called columm-statistics by default. When you have MySQL client above 8 and try to run mysqldump on older MySQL versions, you will get the error below. mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM ‘$”number-of-buckets-specified”‘) FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = ‘myschema’ AND TABLE_NAME = ‘craue_config_setting’;’: Unknown …