Locking in DynamoDB

DynamoDB, as a NoSQL database, does not employ traditional locking mechanisms like row-level locking found in relational databases. Instead, it utilizes optimistic concurrency control to manage concurrent data access and ensure data consistency. Optimistic Concurrency Control (OCC) In optimistic concurrency control, DynamoDB assumes that concurrent updates to the same item are unlikely to conflict. It … Read more

AWS Aurora Reader and Writer Endpoints

The cluster endpoint connects you to the primary instance for the DB cluster. You can perform both read and write operations using the cluster endpoint. The DB cluster can also have up to 15 Aurora Replicas that support read-only access to the data in the DB cluster. The primary instance and each Aurora Replica has … Read more

Backup and Purge RDS Snapshots in AWS

Here is a script I’ve put together to backup both cluster and non clustered databases in AWS. (Still in progress). import boto3 import datetime import sys # Author: Mark Young # Date: 3rd October 2017 # Detail: Automatic database snapshots are restricted to 35 days # This script enables us to keep snapshots for extended … Read more

Everything Aurora (MySQL)

Recently AWS released their version of MySQL called Aurora, they claim it delivers up to five times the throughput of standard MySQL. This article explores some of the depths of this database technology, especially coming from an Oracle Database background. Character Sets In an Oracle system, you can define 2 character sets, one is used … Read more

How to Perform a AWS Aurora Point In Time Recovery

AWS Aurora Point in time recovery Restore AWS Aurora from Point in time snapshot (go back to a specific point in time). These are the Steps Restoring to point in time snapshot of AWS RDS Aurora (to any time with-in the backup retention period irrespective of the frequency of automated backups). 1. In AWS console, … Read more

How to Restore an RDS database in AWS

Restore from a snapshot (either manual or automated). NOTE: To restore the new instance with same as the original one, first the old/original instance must be renamed to something else then the new instance from snapshot can be restored with the required name (can be same as old). Restoring from manual/automated snapshot of AWS RDS … Read more

How to stop and start RDS instance in AWS using Python

I’ve been working on a project that requires us to shutdown and startup our development databases to save costs.. I’ve come up with a python script to perform the tasks. This could be modified to your own requirements. Here is the code: import boto3 # Author: Mark Young # Date: 19th December 2017 # Detail: … Read more

InnoDB Information

SHOW ENGINE INNODB STATUS SHOW ENGINE INNODB MUTEX SHOW ENGINE {NDB | NDBCLUSTER} STATUS SHOW ENGINE PERFORMANCE_SCHEMA STATUS Displays extensive information from the standard InnoDB Monitor about the state of the InnoDB storage engine. There are four types of InnoDB monitors: • The standard InnoDB Monitor displays the following types of information: • Work done … Read more

Lambda Function in Aurora

How to create a lambda function to insert some records in an Aurora Database in AWS. Here is some sample code. This will enable us to link to databases in AWS to perform some functions. import sys import logging import rds_config import pymysql #rds settings rds_host = “auroratest.xxxx.ap-southeast-2.rds.amazonaws.com” name = rds_config.db_username password = rds_config.db_password db_name … Read more