Boost Developer productivity and DBOps efficiency with AWS Aurora Cloning

Context

There are numerous situations where we need an independent and isolated DB. For example, developers want to test their code or the Ops team needs to run upgrade tests and etc. The common approach is restoring a snapshot. However, it …


This content originally appeared on DEV Community and was authored by Hari Karthigasu

Context

There are numerous situations where we need an independent and isolated DB. For example, developers want to test their code or the Ops team needs to run upgrade tests and etc. The common approach is restoring a snapshot. However, it can become expensive and inefficient over time for repetitive tasks.

AWS Aurora Clone

The "AWS Aurora Clone" becomes handy in this situation, where it provides a more efficient solution in terms of operation and cost.

The Aurora clone uses copy-on-write protocol and works in a way that it shares the same volume between the source and clone cluster(s), but the updates are only visible to the respective cluster.

I have shared, how the Aurora clone has been integrated into our GH actions to enable developers, spin up an independent and isolated Aurora RDS cluster, which contains the same data as the given (source) cluster to test their code on demand.

Solution

In my organization, we have dedicated AWS accounts for GH runners and applications.

Application accounts have two lambda functions.

  1. Aurora Clone - Which is invoked by the GH action and performs the Aurora clone operation.
  2. Aurora Clone Purge - Which is responsible for purging the cloned DB cluster, after a certain period of days where it is no longer needed; Invoked by an Event bridge scheduler.

Workflow

  • A developer creates a PR with a label clone-db
  • GH action invokes the lambda function that requires the name of the SOURCE_DB_CLUSTER and PR_NUMBER as inputs.
aws lambda invoke \
    --function-name arn:aws:lambda:$AWS_REGION:$AWS_ACCOUNT_ID:function:aurora_clone \
    --region $AWS_REGION \
    --cli-binary-format raw-in-base64-out \
    --payload '{ "SOURCE_DB_CLUSTER":"$SOURCE_DB_CLUSTER", "PR_NUMBER":"$PR_NUMBER" }' response.json
  • The response/response.json file contains the endpoint of the clone cluster.
  • The deployment manifest will be updated with the clone cluster's endpoint.

Even though aws lambda invoke is a synchronous call, it won't freeze the pipeline, as the Aurora cloning call is asynchronous.

HAPPY CLONING!

References

Aurora clone documentation
Source code of Lambdas
Tofu code to deploy the stack


This content originally appeared on DEV Community and was authored by Hari Karthigasu


Print Share Comment Cite Upload Translate Updates
APA

Hari Karthigasu | Sciencx (2025-11-12T10:39:41+00:00) Boost Developer productivity and DBOps efficiency with AWS Aurora Cloning. Retrieved from https://www.scien.cx/2025/11/12/boost-developer-productivity-and-dbops-efficiency-with-aws-aurora-cloning/

MLA
" » Boost Developer productivity and DBOps efficiency with AWS Aurora Cloning." Hari Karthigasu | Sciencx - Wednesday November 12, 2025, https://www.scien.cx/2025/11/12/boost-developer-productivity-and-dbops-efficiency-with-aws-aurora-cloning/
HARVARD
Hari Karthigasu | Sciencx Wednesday November 12, 2025 » Boost Developer productivity and DBOps efficiency with AWS Aurora Cloning., viewed ,<https://www.scien.cx/2025/11/12/boost-developer-productivity-and-dbops-efficiency-with-aws-aurora-cloning/>
VANCOUVER
Hari Karthigasu | Sciencx - » Boost Developer productivity and DBOps efficiency with AWS Aurora Cloning. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/11/12/boost-developer-productivity-and-dbops-efficiency-with-aws-aurora-cloning/
CHICAGO
" » Boost Developer productivity and DBOps efficiency with AWS Aurora Cloning." Hari Karthigasu | Sciencx - Accessed . https://www.scien.cx/2025/11/12/boost-developer-productivity-and-dbops-efficiency-with-aws-aurora-cloning/
IEEE
" » Boost Developer productivity and DBOps efficiency with AWS Aurora Cloning." Hari Karthigasu | Sciencx [Online]. Available: https://www.scien.cx/2025/11/12/boost-developer-productivity-and-dbops-efficiency-with-aws-aurora-cloning/. [Accessed: ]
rf:citation
» Boost Developer productivity and DBOps efficiency with AWS Aurora Cloning | Hari Karthigasu | Sciencx | https://www.scien.cx/2025/11/12/boost-developer-productivity-and-dbops-efficiency-with-aws-aurora-cloning/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.