{"id":49718634,"url":"https://github.com/karmaniverous/aws-api-gateway-tools","last_synced_at":"2026-05-08T22:13:24.162Z","repository":{"id":331623192,"uuid":"1131608353","full_name":"karmaniverous/aws-api-gateway-tools","owner":"karmaniverous","description":"Tools and get-dotenv plugin for AWS API Gateway (REST APIs, stage cache, API keys).","archived":false,"fork":false,"pushed_at":"2026-01-10T13:27:43.000Z","size":915,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-06T14:50:32.743Z","etag":null,"topics":["api-gateway","api-keys","apigateway","aws","cache","cli","dotenv","getdotenv","stan","typescript","xray"],"latest_commit_sha":null,"homepage":"https://docs.karmanivero.us/aws-api-gateway-tools/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karmaniverous.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-10T10:57:02.000Z","updated_at":"2026-02-22T05:48:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/karmaniverous/aws-api-gateway-tools","commit_stats":null,"previous_names":["karmaniverous/aws-api-gateway-tools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/karmaniverous/aws-api-gateway-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Faws-api-gateway-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Faws-api-gateway-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Faws-api-gateway-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Faws-api-gateway-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karmaniverous","download_url":"https://codeload.github.com/karmaniverous/aws-api-gateway-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Faws-api-gateway-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32799460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-gateway","api-keys","apigateway","aws","cache","cli","dotenv","getdotenv","stan","typescript","xray"],"created_at":"2026-05-08T22:13:23.386Z","updated_at":"2026-05-08T22:13:24.158Z","avatar_url":"https://github.com/karmaniverous.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS API Gateway Tools\r\n\n[![npm version](https://img.shields.io/npm/v/@karmaniverous/aws-api-gateway-tools.svg)](https://www.npmjs.com/package/@karmaniverous/aws-api-gateway-tools) ![Node Current](https://img.shields.io/node/v/@karmaniverous/aws-api-gateway-tools) [![docs](https://img.shields.io/badge/docs-website-blue)](https://docs.karmanivero.us/aws-api-gateway-tools) [![changelog](https://img.shields.io/badge/changelog-latest-blue.svg)](./CHANGELOG.md) [![license](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](./LICENSE)\n\nTools and a get-dotenv plugin for working with AWS API Gateway (REST APIs), including stage cache flush and API key retrieval.\r\n\nThis package provides:\n\n- A tools-style wrapper that owns AWS client setup (including optional AWS X-Ray capture):\n  - `AwsApiGatewayTools`\r\n- A get-dotenv plugin intended to be mounted under `aws`:\n  - `apiGatewayPlugin()` → `aws api-gateway flush-cache|pull-keys`\r\n- A CLI embedding get-dotenv with the api-gateway plugin:\r\n  - `aws-api-gateway-tools`\n\n## Documentation\n\n- Learn the programmatic API: [AwsApiGatewayTools guide](guides/aws-api-gateway-tools.md)\r\n- Learn the CLI and plugin behavior: [aws api-gateway plugin guide](guides/api-gateway-plugin.md)\n- Browse the generated API reference: [TypeDoc site](https://docs.karmanivero.us/aws-api-gateway-tools)\n\n## Install\n\n```bash\nnpm i @karmaniverous/aws-api-gateway-tools\n```\n\nThis package is ESM-only (Node \u003e= 20).\n\n## Quick start (programmatic)\n\n```ts\nimport { AwsApiGatewayTools } from '@karmaniverous/aws-api-gateway-tools';\r\n\nconst tools = new AwsApiGatewayTools({\r\n  clientConfig: { region: 'us-east-1', logger: console },\n  xray: 'auto',\n});\n\nawait tools.flushStageCache({ restApiId: 'abc123', stageName: 'dev' });\r\n```\n\nWhen you need AWS functionality not wrapped by this package, use the fully configured AWS SDK v3 client at `tools.client` (see the [programmatic guide](guides/aws-api-gateway-tools.md) for examples).\n\n## Quick start (CLI)\n\n```bash\naws-api-gateway-tools aws api-gateway flush-cache\r\naws-api-gateway-tools aws api-gateway pull-keys --key-names '$API_KEY_A' '$API_KEY_B'\r\n```\n\nNotes:\n\n- Relevant flags support `$VAR` expansion evaluated at action time against `{ ...process.env, ...ctx.dotenv }` (`ctx.dotenv` wins).\r\n\n## AWS X-Ray capture (optional)\n\nX-Ray support is guarded:\n\n- Default behavior is `xray: 'auto'`: capture is enabled only when `AWS_XRAY_DAEMON_ADDRESS` is set.\n- To enable capture, install the optional peer dependency:\n  - `aws-xray-sdk`\n- In `auto` mode, if `AWS_XRAY_DAEMON_ADDRESS` is set but `aws-xray-sdk` is not installed, construction throws.\n\n## Config defaults (getdotenv.config.\\*)\n\nIf you embed the plugin in your own get-dotenv host (or use the shipped CLI), you can provide safe defaults in config under `plugins['aws/api-gateway']`:\r\n\n```jsonc\n{\n  \"plugins\": {\n    \"aws/api-gateway\": {\r\n      \"apiId\": \"$API_ID\",\r\n      \"apiName\": \"$API_NAME\",\r\n      \"stageName\": \"$STAGE_NAME\",\r\n      \"templateExtension\": \"template\",\n      \"pullKeys\": { \"to\": \"env:private\", \"delimiter\": \", \" }\r\n    },\n  },\n}\n```\n\nSee the [api-gateway plugin guide](guides/api-gateway-plugin.md) for supported config keys and CLI behavior.\n\n---\n\nBuilt for you with ❤️ on Bali! Find more great tools \u0026 templates on [my GitHub Profile](https://github.com/karmaniverous).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarmaniverous%2Faws-api-gateway-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarmaniverous%2Faws-api-gateway-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarmaniverous%2Faws-api-gateway-tools/lists"}