Ape AWS KMS: Ape plugin to make transactions through AWS KMS
Project description
Ape AWS KMS
Ape plugin to make transactions through AWS KMS
Dependencies
- python3 version 3.10 or greater, python3-dev
Installation
via pip
You can install the latest release via pip
:
pip install <PYPI_NAME>
via setuptools
You can clone the repository and use setuptools
for the most up-to-date version:
git clone https://github.com/ApeWorX/<PYPI_NAME>.git
cd <PYPI_NAME>
python3 setup.py install
Quick Usage
pip install ape-aws
Using CLI tool
List commands:
ape aws -h
To create a new key:
ape aws kms create KeyAlias -d 'Description of new key'
To delete this key:
ape aws kms delete KeyAlias
To import an existing private key into KMS:
$ ape aws kms import KeyAlias
Enter your private key:
SUCCESS: Key imported successfully with ID: <key-id>
You can also import a private key from a file (from hex or bytes):
$ ape aws kms import KeyAlias --private-key <path-to-private-key>
INFO: Reading private key from <private-key-file>
SUCCESS: Key imported successfully with ID: <key-id>
You can import using a mnemonic phrase as well:
$ ape aws kms import KeyAlias --use-mnemonic
Enter your mnemonic phrase:
SUCCESS: Key imported successfully with ID: <key-id>
IPython
First, create a KMS key with the CLI tool
ape console
In [1]: kms_acct = accounts.load("KeyAlias")
In [2]: kms_acct.sign_message("12345")
Out[2]: <MessageSignature v=27, r=0x..., s=0x...>
Development
This project is in development and should be considered a beta. Things might not be in their final state and breaking changes may occur. Comments, questions, criticisms and pull requests are welcomed.
Prerequisites to AWS Setup
To begin, create a virtual environment set up and activate the virtual environment before doing anything for the setup of AWS
- You must have an AWS account
- Must be an AWS Identity and Access Management (IAM) user with administrator access
- Must have configured AWS credentials
- Must have Docker, Python3 and pip installed on your workstation
AWS Setup
For Mac and Linux
Create a ~/.aws
folder in your home directory:
mkdir ~/.aws
Note: get your access key and key id from your IAM in you AWS account here.
Create a credentials
file in the ~/.aws
folder:
cat <<EOF > ~/.aws/credentials
[default]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET
EOF
Create a config
file in the ~/.aws
folder:
cat <<EOF > ~/.aws/config
[default]
region = YOUR_REGION
output = json
EOF
AWS KMS Key Import Steps
For manual setup, follow this article
License
This project is licensed under the Apache 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ape-aws-0.8.0a3.tar.gz
.
File metadata
- Download URL: ape-aws-0.8.0a3.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10b9e2b4fea9b5532bcc6d2796eb1a41da5e4144eeac3820249bf8e847b18a75 |
|
MD5 | 369168c243740939b00a2cb6d23dbda2 |
|
BLAKE2b-256 | cdb9b844ab8869f38ae692c265617ccd9a727a626bb3bb42e06fafda80fcb5e8 |
File details
Details for the file ape_aws-0.8.0a3-py3-none-any.whl
.
File metadata
- Download URL: ape_aws-0.8.0a3-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1183fcd8b90bca09c77e559bfe07dc2c8c7fa1d02a933304f8438b577c72602 |
|
MD5 | e99c03a09f7fa45b7a41bb638be9aae1 |
|
BLAKE2b-256 | ca8956c5ac0b4073728bd54b7c0b2bab9d25c7459ba8b3b57b3e39fe4612b30a |