Coder Social home page Coder Social logo

rds_auto_encrypt's Introduction

RDS Auto Encrypt ๐Ÿ”’

CI

A tool used to encrypt RDS instances that were previously created in an unencrypted state

Currently, it is a strenuous process to encrypt an unencrypted RDS instance. This tool automates that process.

The following actions are taken in your AWS account

  • Snapshot your desired instance
  • Name the snapshot
  • Copy the snapshot to the region your RDS instance currently exists in
  • Encrypt the snapshot on copy with your encryption key
  • Rename your instance to "RDS-OLD"
  • Create a new encrypted instance with the original name using the encrypted snapshot
  • Remove the old instance

Where you once had an unencrypted RDS instance is a newly created, encrypted instance that is a replica of the original and all of the data held.

Getting Started

A dependency of this script is having the AWS CLI configured with your credentials in ~/.aws/credentials

[default]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY

Also we should configure our default region

[default]
region=us-east-1

alternatively you can configure the AWS CLI by running the following

aws configure

Script Arguments

The following arguments can be passed to the script to set your desired instance and KMS key.

  • -instance the RDS instance you wish to execute the script against
  • -keyid the KMS key you wish to use to encrypt your instance with
  • -h, --help help for the tool

Running the script

First ensure that the file is executable on your system

$ chmod ug+x test_rds_encrypt.py

Now you are able to execute the script

$ ./rds_encrypt.py --instance <instance> --keyid <keyid>

rds_auto_encrypt's People

Contributors

logan-bobo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

shahbahram

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.