Git Product home page Git Product logo

kms-encryption-python's Introduction

This is a simiple python script that will allow you to use the Amazon KMS service in conjunction with AWS DynamoDB to store and retrieve variables in encrypted form in a database that is easy to query and never has to store a key on disk.

Prerequisites:

  • Set up your Amazon environnment to already be ready for AWS API calls (e.g. add .aws directory or execute aws configure from CLI)
  • Set up an AWS Dynamo DB table with a hash key: env-variable-name (type is String)

#Usage: ##Decrypt: usage: decrypt.py [-h] -k KMS_KEY -p PARAMETER_KEY [-r REGION] -t DDB_TABLE

Decrypts a KMS DynamoDB key

optional arguments:
  -h, --help            show this help message and exit
  -k KMS_KEY, --kms_key KMS_KEY
                        Name of AWS KMS Customer Master Key (ex: alias/test-
                        key)
  -p PARAMETER_KEY, --parameter_key PARAMETER_KEY
                        Name of Parameter in DynamoDB
  -r REGION, --region REGION
                        Name of AWS Region to use for both KMS and DynamoDB
  -t DDB_TABLE, --ddb_table DDB_TABLE
                        Name of existing DynamoDB Table to use in look-up

##Encrypt: usage: encrypt.py [-h] [-f PARAMETER_FILE] -k KMS_KEY -p PARAMETER_KEY [-r REGION] -t DDB_TABLE [-v PARAMETER_VALUE]

Encrypts a KMS DynamoDB key

optional arguments:
  -h, --help            show this help message and exit
  -f PARAMETER_FILE, --parameter_file PARAMETER_FILE
                        Location of file you want to upload (e.g. SSL private
                        key). One of this or parameter_value required.
  -k KMS_KEY, --kms_key KMS_KEY
                        Name of AWS KMS Customer Master Key (ex: alias/test-
                        key)
  -p PARAMETER_KEY, --parameter_key PARAMETER_KEY
                        Name of Parameter to put into DynamoDB
  -r REGION, --region REGION
                        Name of AWS Region to use for both KMS and DynamoDB
  -t DDB_TABLE, --ddb_table DDB_TABLE
                        Name of existing DynamoDB Table to use in look-up
  -v PARAMETER_VALUE, --parameter_value PARAMETER_VALUE
                        Value of Parameter to put into DynamoDB. One of this
                        or parameter_file required.

kms-encryption-python's People

Contributors

justinwatkinson avatar

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.