{ "info": { "author": "Amazon Web Services", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta" ], "description": "# AWS Jupyter Proxy\n\n![CodeBuild](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiZGVqcG5MVEZZYkd2aFBBZnlSZ1R6d0s3U1JKR3pwOWR0UGJTdEp5bW9QWlVlMmdnTEJlenZUdVVkQjNzcVViMmlLQ1NGNS9yLzJEWkRpMzF5WUxnZTJVPSIsIml2UGFyYW1ldGVyU3BlYyI6Ikw5ck5kZk50ai9UU2pYanMiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)\n![Version](https://img.shields.io/pypi/v/aws_jupyter_proxy.svg)\n![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)\n\nA Jupyter server extension to proxy requests with AWS SigV4 authentication.\n\n## Overview\n\nThis server extension enables the usage of the [AWS JavaScript/TypeScript SDK](https://github.com/aws/aws-sdk-js) without having to export AWS credentials to the browser.\n\nA single `/awsproxy` endpoint is added on the Jupyter server which receives incoming requests from the browser, uses the credentials on the server to add [SigV4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) authentication to the request, and then proxies the request to the actual AWS service endpoint.\n\nAll requests are proxied back-and-forth as-is, e.g., a 4xx status code from the AWS service will be relayed back as-is to the browser.\n\nNOTE: This project is still under active development\n\n## Install\n\nInstalling the package from PyPI will install and enable the server extension on the Jupyter server.\n\n```bash\npip install aws-jupyter-proxy\n```\n\n## Usage\n\nUsing this requries no additional dependencies in the client-side code. Just use the regular AWS JavaScript/TypeScript SDK methods and add any dummy credentials and change the endpoint to the `/awsproxy` endpoint.\n\n```typescript\n import * as AWS from 'aws-sdk';\n import SageMaker from 'aws-sdk/clients/sagemaker';\n\n\n // These credentials are *not* used for the actual AWS service call but you have\n // to provide any dummy credentials (Not real ones!)\n AWS.config.secretAccessKey = 'IGNOREDIGNORE/IGNOREDIGNOREDIGNOREDIGNOR';\n AWS.config.accessKeyId = 'IGNOREDIGNO';\n\n // Change the endpoint in the client to the \"awsproxy\" endpoint on the Jupyter server.\n const proxyEndpoint = 'http://localhost:8888/awsproxy';\n\n const sageMakerClient = new SageMaker({\n region: 'us-west-2',\n endpoint: proxyEndpoint,\n });\n\n // Make the API call!\n await proxySageMaker\n .listNotebookInstances({\n NameContains: 'jaipreet'\n })\n .promise();\n```\n\n### Usage with S3\n\nFor S3, use the `s3ForcePathStyle` parameter during the client initialization\n\n```typescript\n import S3 from 'aws-sdk/clients/s3';\n\n const s3Client = new S3({\n region: 'us-west-2',\n endpoint: proxyEndpoint,\n s3ForcePathStyle: true\n });\n\n await s3Client.getObject({\n Bucket: 'my-bucket',\n Key: 'my-object'\n }).promise();\n```\n\n## Development\n\nInstall all dev dependencies\n\n```bash\npip install -e \".[dev]\"\njupyter serverextension enable --py aws_jupyter_proxy\n```\n\nRun unit tests using pytest\n\n```bash\npytest tests/unit\n```\n\n## License\n\nThis library is licensed under the Apache 2.0 License.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aws/aws-jupyter-proxy", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "aws-jupyter-proxy", "package_url": "https://pypi.org/project/aws-jupyter-proxy/", "platform": "", "project_url": "https://pypi.org/project/aws-jupyter-proxy/", "project_urls": { "Homepage": "https://github.com/aws/aws-jupyter-proxy" }, "release_url": "https://pypi.org/project/aws-jupyter-proxy/0.1.0/", "requires_dist": [ "notebook (<7.0,>=6.0)", "botocore (<2.0,>=1.0)", "asynctest ; extra == 'dev'", "black ; extra == 'dev'", "pytest ; extra == 'dev'", "pytest-asyncio ; extra == 'dev'", "pytest-cov ; extra == 'dev'" ], "requires_python": ">=3.6", "summary": "A Jupyter server extension to proxy requests with AWS SigV4 authentication", "version": "0.1.0" }, "last_serial": 5756161, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5b166774e63a73baed7c9579750c5f44", "sha256": "998f8eb594d35fcfce28303406aeca9b6df7371e5b1ec58208a2329f88033f27" }, "downloads": -1, "filename": "aws_jupyter_proxy-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5b166774e63a73baed7c9579750c5f44", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 16421, "upload_time": "2019-08-29T18:45:09", "url": "https://files.pythonhosted.org/packages/39/d7/2a97422b06be12cbc9532bb60ef83379555fbdb88fd36ccc7d8e3586669f/aws_jupyter_proxy-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "550399f955ed9d09471fbbf037f9b3bc", "sha256": "15c96ff60aec95a6d6ed303bd7221b684fb0a3e486df2e7f00dd1158e3b4253a" }, "downloads": -1, "filename": "aws_jupyter_proxy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "550399f955ed9d09471fbbf037f9b3bc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10220, "upload_time": "2019-08-29T18:45:12", "url": "https://files.pythonhosted.org/packages/51/be/5752536691d6a08f05c22adde2dc025ddbe40801b6e54dfe0d68c53c0b61/aws_jupyter_proxy-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5b166774e63a73baed7c9579750c5f44", "sha256": "998f8eb594d35fcfce28303406aeca9b6df7371e5b1ec58208a2329f88033f27" }, "downloads": -1, "filename": "aws_jupyter_proxy-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5b166774e63a73baed7c9579750c5f44", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 16421, "upload_time": "2019-08-29T18:45:09", "url": "https://files.pythonhosted.org/packages/39/d7/2a97422b06be12cbc9532bb60ef83379555fbdb88fd36ccc7d8e3586669f/aws_jupyter_proxy-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "550399f955ed9d09471fbbf037f9b3bc", "sha256": "15c96ff60aec95a6d6ed303bd7221b684fb0a3e486df2e7f00dd1158e3b4253a" }, "downloads": -1, "filename": "aws_jupyter_proxy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "550399f955ed9d09471fbbf037f9b3bc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10220, "upload_time": "2019-08-29T18:45:12", "url": "https://files.pythonhosted.org/packages/51/be/5752536691d6a08f05c22adde2dc025ddbe40801b6e54dfe0d68c53c0b61/aws_jupyter_proxy-0.1.0.tar.gz" } ] }