{
"info": {
"author": "Noah Zoschke",
"author_email": "noah@mixable.net",
"bugtrack_url": null,
"classifiers": [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3"
],
"description": "# awscli-plugin-execute-api\n\nPlugin to configure a single AWS CLI operation to invoke an API Gateway / Lambda method\n\n## Quick Start\n\n### Install with pip\n\n```shell\n$ pip install awscli-plugin-execute-api\n```\n\nIf you installed `awscli` with Homebrew, use its bundled Python:\n\n```shell\n$ /usr/local/opt/awscli/libexec/bin/pip install awscli-plugin-execute-api\n```\n\n### Register the plugin\n\n```shell\n$ aws configure set plugins.execute-api awscli_plugin_execute_api\n```\n\n### Configure an operation endpoint\n\nFirst configure a profile for the IAM with `execute-api:Invoke` permission:\n\n```shell\n$ export AWS_PROFILE=myprofile\n\n$ aws configure\nAWS Access Key ID [None]: AKIA...\nAWS Secret Access Key [None]: pWim...\nDefault region name [None]: us-east-1\nDefault output format [None]: json\n```\n\nNext configure the plugin for an operation and its API Gateway invocation URL:\n\n```shell\n$ aws configure set dynamodb.update-table https://m303r7o808.execute-api.us-east-1.amazonaws.com/Prod/update-table\n```\n\n\nYou can review or manually configure `$HOME/.aws/config`...
\n\n```conf\n[plugins]\nexecute-api = awscli_plugin_execute_api\n\n[profile myprofile]\nregion = us-east-1\noutput = json\ndynamodb =\n update-table = https://m303r7o808.execute-api.us-east-1.amazonaws.com/Prod/update-table\n```\n \n\n### Run an operation\n\nNow run a command:\n\n```shell\n$ aws dynamodb update-table --table-name $TABLE_NAME --sse-specification Enabled=false\nAn error occurred (ValidationException) when calling the UpdateTable operation: Custom error from Lambda handler\n```\n\n\nYou can use the `--debug` flag to verify the endpoint...
\n\n```shell\n$ aws dynamodb update-table --debug --table-name $TABLE_NAME\nPlugin awscli_plugin_execute_api: Config [myprofile] dynamodb.update-table => URL https://m303r7o808.execute-api.us-east-1.amazonaws.com/Prod/update-table\nPlugin awscli_plugin_execute_api: renamed X-Amz-Target DynamoDB_20120810.UpdateTable\n\n$ aws dynamodb describe-table --debug --table-name $TABLE_NAME\nPlugin awscli_plugin_execute_api: Config [myprofile] dynamodb.describe-table not found\n```\n \n\n## Motivation\n\nFor security reasons we'd like to give an IAM user access to a **limited subset** of an AWS API call functionality. For example on the `dynamodb update-table` operation we'd like to allow a user to modify:\n\n* Global indexes\n\nBut disallow them to modify:\n\n* Provisioned throughput\n* Streams\n* Server side encryption\n\nA \"serverless\" solution includes:\n\n* IAM User\n * Policy that disallows `dynamodb:UpdateTable`\n * Policy that allows `execute-api:Invoke` on an API Gateway resource\n * Access keys\n\n* API Gateway Method\n * URL to POST an `update-table` request\n * AWS_IAM authorization\n\n* Lambda Function\n * Policy that allows `dynamodb:UpdateTable`\n * Code that validates and performs `update-table` request\n\n* AWS CLI\n * Custom endpoint URL for `dynamodb update-table` command\n * Request signature for API Gateway\n\nThis plugin registers a URL for a single CLI operation and automatically uses it.\n\n```shell\n$ aws configure set dynamodb.update-table https://m303r7o808.execute-api.us-east-1.amazonaws.com/Prod/update-table\n$ aws dynamodb update-table --table-name $TABLE_NAME --sse-specification Enabled=false\nAn error occurred (ValidationException) when calling the UpdateTable operation: Modifying SSESpecification is not allowed\n```\n\n## Troubleshooting\n\n### IAM\n\nThe CLI user needs [API execution permissions](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-iam-policy-examples-for-api-execution.html):\n\n```json\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Action\": [\n \"execute-api:Invoke\"\n ],\n \"Resource\": [\n \"arn:aws:execute-api:us-east-1:303718836660:m303r7o808/*/POST/update-table\"\n ]\n }\n ]\n}\n```\n\n### Lambda\n\nThe CLI operation is in the `X-Target` header, since `X-Amz-Target` \n\n## Credits\n\n- https://github.com/wbingli/awscli-plugin-endpoint\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/nzoschke/awscli-plugin-execute-api",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "awscli-plugin-execute-api",
"package_url": "https://pypi.org/project/awscli-plugin-execute-api/",
"platform": "",
"project_url": "https://pypi.org/project/awscli-plugin-execute-api/",
"project_urls": {
"Homepage": "https://github.com/nzoschke/awscli-plugin-execute-api"
},
"release_url": "https://pypi.org/project/awscli-plugin-execute-api/0.2.1/",
"requires_dist": null,
"requires_python": "",
"summary": "Plugin to configure a single AWS CLI operation to invoke an API Gateway method",
"version": "0.2.1"
},
"last_serial": 5420937,
"releases": {
"0.0.1": [
{
"comment_text": "",
"digests": {
"md5": "056382ac6e98da5f40160b4980a3d784",
"sha256": "c59f79b1fdc88bee9c6177ab7726b9c6072f72a6e26454aa429f517fd207dff4"
},
"downloads": -1,
"filename": "awscli_plugin_execute_api-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "056382ac6e98da5f40160b4980a3d784",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8046,
"upload_time": "2018-12-18T18:32:13",
"url": "https://files.pythonhosted.org/packages/7e/22/66db4ae6b47187870f130fb3b23e16aa79c2359dd7b9bb85b37a7d2aad04/awscli_plugin_execute_api-0.0.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "e5562252bf4eac4a9665e2b16a193dff",
"sha256": "8bd5b7ca7c32f3dd6975aa82ec254fbe6f3c34a3159573aa3529455bb429eb67"
},
"downloads": -1,
"filename": "awscli_plugin_execute_api-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "e5562252bf4eac4a9665e2b16a193dff",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3327,
"upload_time": "2018-12-18T18:32:15",
"url": "https://files.pythonhosted.org/packages/59/ec/6fc4ca123fc161fe6f278bfe84a7477625b2652a157b52055dc1307c8dfb/awscli_plugin_execute_api-0.0.1.tar.gz"
}
],
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "bdeac785ba3ebdb6f6fc066fdb1d424d",
"sha256": "3ec4893fd2339c150fdcab6573ef992ed0bc1699abad766d72db7a62ed581195"
},
"downloads": -1,
"filename": "awscli_plugin_execute_api-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bdeac785ba3ebdb6f6fc066fdb1d424d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8033,
"upload_time": "2018-12-21T17:20:37",
"url": "https://files.pythonhosted.org/packages/dd/78/49a340b1459a76b2d4c91acfc5634f9e5637188c8b87f98cf270d8eb2807/awscli_plugin_execute_api-0.1.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "f24b6444128364520f4a46921ffdec23",
"sha256": "80515e056875e3f0983ea7b5273f914594208cd29bc438c4ac8ccc7ec37f1688"
},
"downloads": -1,
"filename": "awscli_plugin_execute_api-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "f24b6444128364520f4a46921ffdec23",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3334,
"upload_time": "2018-12-21T17:20:40",
"url": "https://files.pythonhosted.org/packages/04/65/6b34909599623dabd191ab2163ab2dba4bffae68b52a5026d7cabc7ba166/awscli_plugin_execute_api-0.1.0.tar.gz"
}
],
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "ec0b67e93b2cea50bde556f02087c0a4",
"sha256": "b500267f50ae5dd80f015a17648d01c259eb156280f697cc8ae7336ce0a6f032"
},
"downloads": -1,
"filename": "awscli_plugin_execute_api-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ec0b67e93b2cea50bde556f02087c0a4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8056,
"upload_time": "2018-12-22T17:40:12",
"url": "https://files.pythonhosted.org/packages/ab/80/188d55d249425891de9fb8e92d81738befe2916dab3df2f977adf4ceb955/awscli_plugin_execute_api-0.2.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "e1d9361a7adcba436a0430bbe7bd8ee8",
"sha256": "c463c3799d173bc3fbf889dcd976e6dbc8e6ceab2f81a1a19a9819241b450ec4"
},
"downloads": -1,
"filename": "awscli_plugin_execute_api-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "e1d9361a7adcba436a0430bbe7bd8ee8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3345,
"upload_time": "2018-12-22T17:40:15",
"url": "https://files.pythonhosted.org/packages/39/8d/fcc9934afa4469016893921479fecac55de23758806d4bcfbde1753b37ce/awscli_plugin_execute_api-0.2.0.tar.gz"
}
],
"0.2.1": [
{
"comment_text": "",
"digests": {
"md5": "e3b57ff049fa7f70c491cc5d018b0073",
"sha256": "407f6e7e6757e4c84802da99cda31d972a6dc31c163155bc1f90f90feec7fc0a"
},
"downloads": -1,
"filename": "awscli_plugin_execute_api-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e3b57ff049fa7f70c491cc5d018b0073",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8195,
"upload_time": "2019-06-19T15:35:32",
"url": "https://files.pythonhosted.org/packages/99/61/691008ad790062bf0624c96e11823b6e0d40d773d60c295b09612f5b2ab9/awscli_plugin_execute_api-0.2.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "5103c1144f1b9b3f5ee281aa950b203c",
"sha256": "9f33033e5d868238a109d0cc937043260377e8d9f54372999bafa0145d75203f"
},
"downloads": -1,
"filename": "awscli_plugin_execute_api-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "5103c1144f1b9b3f5ee281aa950b203c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3477,
"upload_time": "2019-06-19T15:35:33",
"url": "https://files.pythonhosted.org/packages/60/9b/77c3f6c88e1f55e3970e20846e0f4d1fc08431bda7087f3e69ff3ee38271/awscli_plugin_execute_api-0.2.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "e3b57ff049fa7f70c491cc5d018b0073",
"sha256": "407f6e7e6757e4c84802da99cda31d972a6dc31c163155bc1f90f90feec7fc0a"
},
"downloads": -1,
"filename": "awscli_plugin_execute_api-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e3b57ff049fa7f70c491cc5d018b0073",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8195,
"upload_time": "2019-06-19T15:35:32",
"url": "https://files.pythonhosted.org/packages/99/61/691008ad790062bf0624c96e11823b6e0d40d773d60c295b09612f5b2ab9/awscli_plugin_execute_api-0.2.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "5103c1144f1b9b3f5ee281aa950b203c",
"sha256": "9f33033e5d868238a109d0cc937043260377e8d9f54372999bafa0145d75203f"
},
"downloads": -1,
"filename": "awscli_plugin_execute_api-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "5103c1144f1b9b3f5ee281aa950b203c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3477,
"upload_time": "2019-06-19T15:35:33",
"url": "https://files.pythonhosted.org/packages/60/9b/77c3f6c88e1f55e3970e20846e0f4d1fc08431bda7087f3e69ff3ee38271/awscli_plugin_execute_api-0.2.1.tar.gz"
}
]
}