# Ape AWS KMS
Ape plugin to make transactions through AWS KMS
## Dependencies
- [python3](https://www.python.org/downloads) version 3.10 or greater, python3-dev
## Installation
### via `pip`
You can install the latest release via [`pip`](https://pypi.org/project/pip/):
```bash
pip install <PYPI_NAME>
```
### via `setuptools`
You can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:
```bash
git clone https://github.com/ApeWorX/<PYPI_NAME>.git
cd <PYPI_NAME>
python3 setup.py install
```
## Quick Usage
```bash
pip install ape-aws
```
### Using CLI tool
List commands:
```bash
ape aws -h
```
To create a new key:
```bash
ape aws kms create KeyAlias -d 'Description of new key'
```
To delete this key:
```bash
ape aws kms delete KeyAlias
```
To import an existing private key into KMS:
```bash
$ 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):
```bash
$ 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:
```bash
$ 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
```bash
ape console
```
```python
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
1. You must have an AWS account
2. Must be an AWS Identity and Access Management (IAM) user with administrator access
3. Must have configured AWS credentials
4. Must have [Docker](https://docs.docker.com/get-docker/),
[Python3](https://www.python.org/downloads/) and
[pip](https://pip.pypa.io/en/stable/installation/) installed on your workstation
## AWS Setup
#### For Mac and Linux
Create a `~/.aws` folder in your home directory:
```bash
mkdir ~/.aws
```
Note: get your access key and key id from your IAM in you AWS account [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
Create a `credentials` file in the `~/.aws` folder:
```bash
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:
```bash
cat <<EOF > ~/.aws/config
[default]
region = YOUR_REGION
output = json
EOF
```
## AWS KMS Key Import Steps
For manual setup, follow this [article](https://aws.amazon.com/blogs/database/import-ethereum-private-keys-to-aws-kms/)
## License
This project is licensed under the [Apache 2.0](LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/ApeWorX/ape-aws-kms",
"name": "ape-aws",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.7",
"maintainer_email": null,
"keywords": "ethereum",
"author": "ApeWorX Ltd.",
"author_email": "admin@apeworx.io",
"download_url": "https://files.pythonhosted.org/packages/cd/b9/b844ab8869f38ae692c265617ccd9a727a626bb3bb42e06fafda80fcb5e8/ape-aws-0.8.0a3.tar.gz",
"platform": null,
"description": "# Ape AWS KMS\n\nApe plugin to make transactions through AWS KMS\n\n## Dependencies\n- [python3](https://www.python.org/downloads) version 3.10 or greater, python3-dev\n\n## Installation\n\n### via `pip`\n\nYou can install the latest release via [`pip`](https://pypi.org/project/pip/):\n\n```bash\npip install <PYPI_NAME>\n```\n\n### via `setuptools`\n\nYou can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:\n\n```bash\ngit clone https://github.com/ApeWorX/<PYPI_NAME>.git\ncd <PYPI_NAME>\npython3 setup.py install\n```\n\n## Quick Usage\n\n```bash\npip install ape-aws\n```\n\n### Using CLI tool\n\nList commands:\n\n```bash\nape aws -h\n```\n\nTo create a new key:\n\n```bash\nape aws kms create KeyAlias -d 'Description of new key'\n```\n\nTo delete this key:\n\n```bash\nape aws kms delete KeyAlias\n```\n\nTo import an existing private key into KMS:\n\n```bash\n$ ape aws kms import KeyAlias\nEnter your private key:\nSUCCESS: Key imported successfully with ID: <key-id>\n```\n\nYou can also import a private key from a file (from hex or bytes):\n\n```bash\n$ ape aws kms import KeyAlias --private-key <path-to-private-key>\nINFO: Reading private key from <private-key-file>\nSUCCESS: Key imported successfully with ID: <key-id>\n```\n\nYou can import using a mnemonic phrase as well:\n\n```bash\n$ ape aws kms import KeyAlias --use-mnemonic\nEnter your mnemonic phrase:\nSUCCESS: Key imported successfully with ID: <key-id>\n```\n\n### IPython\n\nFirst, create a KMS key with the CLI tool\n\n```bash\nape console\n```\n\n```python\nIn [1]: kms_acct = accounts.load(\"KeyAlias\")\nIn [2]: kms_acct.sign_message(\"12345\")\nOut[2]: <MessageSignature v=27, r=0x..., s=0x...>\n```\n\n## Development\n\nThis project is in development and should be considered a beta.\nThings might not be in their final state and breaking changes may occur.\nComments, questions, criticisms and pull requests are welcomed.\n\n## Prerequisites to AWS Setup\n\nTo begin, create a virtual environment set up and activate the virtual environment before doing anything for the setup of AWS\n\n1. You must have an AWS account\n2. Must be an AWS Identity and Access Management (IAM) user with administrator access\n3. Must have configured AWS credentials\n4. Must have [Docker](https://docs.docker.com/get-docker/),\n [Python3](https://www.python.org/downloads/) and\n [pip](https://pip.pypa.io/en/stable/installation/) installed on your workstation\n\n## AWS Setup\n\n#### For Mac and Linux\nCreate a `~/.aws` folder in your home directory:\n```bash\nmkdir ~/.aws\n```\n\nNote: get your access key and key id from your IAM in you AWS account [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).\nCreate a `credentials` file in the `~/.aws` folder:\n```bash\ncat <<EOF > ~/.aws/credentials\n[default]\naws_access_key_id = YOUR_ACCESS_KEY\naws_secret_access_key = YOUR_SECRET\nEOF\n```\n\nCreate a `config` file in the `~/.aws` folder:\n```bash\ncat <<EOF > ~/.aws/config\n[default]\nregion = YOUR_REGION\noutput = json\nEOF\n```\n\n## AWS KMS Key Import Steps\n\nFor manual setup, follow this [article](https://aws.amazon.com/blogs/database/import-ethereum-private-keys-to-aws-kms/)\n\n## License\n\nThis project is licensed under the [Apache 2.0](LICENSE).\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Ape AWS KMS: Ape plugin to make transactions through AWS KMS",
"version": "0.8.0a3",
"project_urls": {
"Homepage": "https://github.com/ApeWorX/ape-aws-kms"
},
"split_keywords": [
"ethereum"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ca8956c5ac0b4073728bd54b7c0b2bab9d25c7459ba8b3b57b3e39fe4612b30a",
"md5": "e99c03a09f7fa45b7a41bb638be9aae1",
"sha256": "b1183fcd8b90bca09c77e559bfe07dc2c8c7fa1d02a933304f8438b577c72602"
},
"downloads": -1,
"filename": "ape_aws-0.8.0a3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e99c03a09f7fa45b7a41bb638be9aae1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.7",
"size": 16032,
"upload_time": "2024-07-02T19:40:48",
"upload_time_iso_8601": "2024-07-02T19:40:48.751947Z",
"url": "https://files.pythonhosted.org/packages/ca/89/56c5ac0b4073728bd54b7c0b2bab9d25c7459ba8b3b57b3e39fe4612b30a/ape_aws-0.8.0a3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cdb9b844ab8869f38ae692c265617ccd9a727a626bb3bb42e06fafda80fcb5e8",
"md5": "369168c243740939b00a2cb6d23dbda2",
"sha256": "10b9e2b4fea9b5532bcc6d2796eb1a41da5e4144eeac3820249bf8e847b18a75"
},
"downloads": -1,
"filename": "ape-aws-0.8.0a3.tar.gz",
"has_sig": false,
"md5_digest": "369168c243740939b00a2cb6d23dbda2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.7",
"size": 22553,
"upload_time": "2024-07-02T19:40:50",
"upload_time_iso_8601": "2024-07-02T19:40:50.291962Z",
"url": "https://files.pythonhosted.org/packages/cd/b9/b844ab8869f38ae692c265617ccd9a727a626bb3bb42e06fafda80fcb5e8/ape-aws-0.8.0a3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-02 19:40:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ApeWorX",
"github_project": "ape-aws-kms",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ape-aws"
}