ape-aws


Nameape-aws JSON
Version 0.8.1b1 PyPI version JSON
download
home_pagehttps://github.com/ApeWorX/ape-aws
SummaryApe AWS KMS: Ape plugin to make transactions through AWS KMS
upload_time2025-02-19 04:52:32
maintainerNone
docs_urlNone
authorApeWorX Ltd.
requires_python<4,>=3.7
licenseApache-2.0
keywords ethereum
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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 ape-aws
```

### 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/ape-aws.git
cd ape-aws
python3 setup.py install
```

## Quick Usage

```bash
pip install ape-aws
```

### Using CLI tool

List commands:

```bash
ape aws -h
```

See logged in profile (useful for debugging auth in containers)

```bash
ape aws whoami
```

To create a new user (recommended for cloud usage)

```bash
ape aws users new USER
```

To delete this user (WARNING this is permanent)

```bash
ape aws users remove USER
```

Create an access key for this user (WARNING don't lose generated token)

```bash
ape aws users tokens new USER > .env.USER
```

To create a new Ethereum signing key (recommended to generate)

```bash
ape aws keys generate KEY
```

To schedule this signing key for deletion (WARNING takes 30 days)

```bash
ape aws keys remove KEY
```

To grant your user access to the signing key (don't forget to do this!)

```bash
ape aws keys grant KEY -u USER
```



### IPython

First, create a KMS key with the CLI tool

```bash
ape console
```

```python
In [1]: kms_signer = accounts.load("KEY")
In [2]: kms_signer.sign_message("12345")
Out[2]: <MessageSignature v=27, r=0x..., s=0x...>
```

Now to test your new IAM user's access, you can do the following

```bash
env $(echo .env.USER | xargs) ape console
```

and you should be able to do the same as the above!

Use the access token above to run with your containers by supplying them as environment variables

WARNING: Don't forget to cycle your access tokens on a regular basis to prevent access leakage!

## 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",
    "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/ff/f2/a84309c598533e0e58d1474255f86c4d3605806bac0ee1aaaf4cb8d16b42/ape_aws-0.8.1b1.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 ape-aws\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/ape-aws.git\ncd ape-aws\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\nSee logged in profile (useful for debugging auth in containers)\n\n```bash\nape aws whoami\n```\n\nTo create a new user (recommended for cloud usage)\n\n```bash\nape aws users new USER\n```\n\nTo delete this user (WARNING this is permanent)\n\n```bash\nape aws users remove USER\n```\n\nCreate an access key for this user (WARNING don't lose generated token)\n\n```bash\nape aws users tokens new USER > .env.USER\n```\n\nTo create a new Ethereum signing key (recommended to generate)\n\n```bash\nape aws keys generate KEY\n```\n\nTo schedule this signing key for deletion (WARNING takes 30 days)\n\n```bash\nape aws keys remove KEY\n```\n\nTo grant your user access to the signing key (don't forget to do this!)\n\n```bash\nape aws keys grant KEY -u USER\n```\n\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_signer = accounts.load(\"KEY\")\nIn [2]: kms_signer.sign_message(\"12345\")\nOut[2]: <MessageSignature v=27, r=0x..., s=0x...>\n```\n\nNow to test your new IAM user's access, you can do the following\n\n```bash\nenv $(echo .env.USER | xargs) ape console\n```\n\nand you should be able to do the same as the above!\n\nUse the access token above to run with your containers by supplying them as environment variables\n\nWARNING: Don't forget to cycle your access tokens on a regular basis to prevent access leakage!\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.1b1",
    "project_urls": {
        "Homepage": "https://github.com/ApeWorX/ape-aws"
    },
    "split_keywords": [
        "ethereum"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "214d1007b7fcf7c510b96ddd0bb06d5e4504f05b201e985a3a18f2ddb176594c",
                "md5": "1fc4f5e0aefaba45fb4f12fd0709a16a",
                "sha256": "e3965a091043928067494cae9f79769477bbd21412241e9604df07574ba125c3"
            },
            "downloads": -1,
            "filename": "ape_aws-0.8.1b1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1fc4f5e0aefaba45fb4f12fd0709a16a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.7",
            "size": 19639,
            "upload_time": "2025-02-19T04:52:30",
            "upload_time_iso_8601": "2025-02-19T04:52:30.221728Z",
            "url": "https://files.pythonhosted.org/packages/21/4d/1007b7fcf7c510b96ddd0bb06d5e4504f05b201e985a3a18f2ddb176594c/ape_aws-0.8.1b1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fff2a84309c598533e0e58d1474255f86c4d3605806bac0ee1aaaf4cb8d16b42",
                "md5": "076edb0352f13ec30b3c832c967bc320",
                "sha256": "603d7dc8d25abe67dc679593ee8b6bd314306fcec19714b12a82c4979eefcf54"
            },
            "downloads": -1,
            "filename": "ape_aws-0.8.1b1.tar.gz",
            "has_sig": false,
            "md5_digest": "076edb0352f13ec30b3c832c967bc320",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.7",
            "size": 25803,
            "upload_time": "2025-02-19T04:52:32",
            "upload_time_iso_8601": "2025-02-19T04:52:32.624695Z",
            "url": "https://files.pythonhosted.org/packages/ff/f2/a84309c598533e0e58d1474255f86c4d3605806bac0ee1aaaf4cb8d16b42/ape_aws-0.8.1b1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-19 04:52:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ApeWorX",
    "github_project": "ape-aws",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ape-aws"
}
        
Elapsed time: 0.43993s