{ "info": { "author": "djfurman", "author_email": "djfurman@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "[![License](https://img.shields.io/pypi/l/Django.svg?style=plastic)](./LICENSE.md)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n# AWS ALB Response Creator\n\nThe AWS announcement of [Application Load Balancers supporting Lambda functions](https://aws.amazon.com/blogs/networking-and-content-delivery/lambda-functions-as-targets-for-application-load-balancers/) made my reInvent experience!\n\n## Purpose\n\nIn doing a PoC however, I found that the `statusDescription` element was somewhat of an annoyance to code. This package provides a method to return the appropriate format of this field without copy/paste response data and allowing a strategy to implement this to swap out response formats for API Gateway or ALB as needed.\n\n## Installation\n\nRun `pip install alb-response`\n\n## Usage\n\n```python\nfrom alb_response import alb_response\n\ndef lambda_handler(event, context):\n\n response_dict = process_the_event(event)\n\n return alb_response(\n http_status=200,\n json=response_dict,\n is_base64_encoded=False,\n )\n```\n\n### Architecture\n\n1. Setup an Application Load Balancer (ALB)\n1. Create a target group for the Lambda\n1. Assign appropriate permissions to your Lambda function\n1. Attach the target group to the ALB with a rule\n\n## Contributing\n\nContributions are welcome! Please open an issue or make a pull request.\n\nIf making a pull request, please run the tests and ensure that you maintain or increase code coverage.\n\n### Dependencies\n\nTo make this project more portable and keep environments organized, this project leverages `pipenv`. To install deterministic dependencies, run `pipenv sync`.\n\n### Run Tests\n\nTo run the tests, install the dependencies and run `behave`.\n\nTo get code coverage as well, run `coverage run --source='.' -m behave` followed by `coverage report`.\n\n# Release Log\n\n- `0.1.0`\n - Initial Release\n- `0.1.1`\n - Dependency update to resolve [CVE-2019-11324](https://nvd.nist.gov/vuln/detail/CVE-2019-11324).\n- `0.1.2`\n - Patch to support null json responses without sending an empty json object\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": "", "keywords": "", "license": "BSD-3-Clause", "maintainer": "", "maintainer_email": "", "name": "alb-response", "package_url": "https://pypi.org/project/alb-response/", "platform": "", "project_url": "https://pypi.org/project/alb-response/", "project_urls": null, "release_url": "https://pypi.org/project/alb-response/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "", "version": "0.1.2" }, "last_serial": 5526876, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c38f0221762b6e5f4f5f863df9a7db16", "sha256": "da44de1a419a21da8cfbe3bf6a89c22bd46d08eeafc6cc5bf79857d16e7e4d3f" }, "downloads": -1, "filename": "alb_response-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c38f0221762b6e5f4f5f863df9a7db16", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3955, "upload_time": "2018-12-10T04:44:20", "url": "https://files.pythonhosted.org/packages/27/de/9fa9c198434eb9b346efd9f49e2f1cdb628f73683e1ad629a7f70b78825d/alb_response-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c8307f72df66ac0b3213dd082438c6a", "sha256": "d5bb8de899d0be4ac065ac02835e78d63bc9a486e11e2f529b464d2c5c98375b" }, "downloads": -1, "filename": "alb-response-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8c8307f72df66ac0b3213dd082438c6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2311, "upload_time": "2018-12-10T04:44:21", "url": "https://files.pythonhosted.org/packages/10/75/11d856a5debef09845872c97e95e14a21ff593df81385a0e53a2cffefaf2/alb-response-0.1.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "e0879c0174571139a3d85a0cff49f268", "sha256": "b13610e1daad50e2cc8477801a7ad8e72f4418de9022604384ee02c2c72e9079" }, "downloads": -1, "filename": "alb_response-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e0879c0174571139a3d85a0cff49f268", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4085, "upload_time": "2019-07-13T13:24:36", "url": "https://files.pythonhosted.org/packages/95/55/cdb4bb62a67967f936b1de4de559764311379a84dcb5b89075b33b124565/alb_response-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6b2a22561b0bc709e15e5456ba52ac2b", "sha256": "a1f1d32e9145b252eb85ed4fd6b261b40bc39a67b687c380dc08e86ae022d9ca" }, "downloads": -1, "filename": "alb-response-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6b2a22561b0bc709e15e5456ba52ac2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2442, "upload_time": "2019-07-13T13:24:38", "url": "https://files.pythonhosted.org/packages/00/c0/e31ecc4f33c50a61e69e9e19696b2f68457c4356a365894eb690d0c2db9b/alb-response-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e0879c0174571139a3d85a0cff49f268", "sha256": "b13610e1daad50e2cc8477801a7ad8e72f4418de9022604384ee02c2c72e9079" }, "downloads": -1, "filename": "alb_response-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e0879c0174571139a3d85a0cff49f268", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4085, "upload_time": "2019-07-13T13:24:36", "url": "https://files.pythonhosted.org/packages/95/55/cdb4bb62a67967f936b1de4de559764311379a84dcb5b89075b33b124565/alb_response-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6b2a22561b0bc709e15e5456ba52ac2b", "sha256": "a1f1d32e9145b252eb85ed4fd6b261b40bc39a67b687c380dc08e86ae022d9ca" }, "downloads": -1, "filename": "alb-response-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6b2a22561b0bc709e15e5456ba52ac2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2442, "upload_time": "2019-07-13T13:24:38", "url": "https://files.pythonhosted.org/packages/00/c0/e31ecc4f33c50a61e69e9e19696b2f68457c4356a365894eb690d0c2db9b/alb-response-0.1.2.tar.gz" } ] }