{"id":19956470,"url":"https://github.com/drudge/json-config-lambda-handler","last_synced_at":"2026-04-13T09:31:22.878Z","repository":{"id":42395491,"uuid":"89644141","full_name":"drudge/json-config-lambda-handler","owner":"drudge","description":"Lambda function wrapper to load config from JSON environment variable (with optional KMS encryption)","archived":false,"fork":false,"pushed_at":"2022-04-07T03:22:50.000Z","size":3,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-29T17:07:27.920Z","etag":null,"topics":["aws","aws-lambda","config","environment-variables","json","kms","lambda"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drudge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-27T22:06:38.000Z","updated_at":"2017-05-11T18:44:50.000Z","dependencies_parsed_at":"2022-09-22T05:04:03.752Z","dependency_job_id":null,"html_url":"https://github.com/drudge/json-config-lambda-handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/drudge/json-config-lambda-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drudge%2Fjson-config-lambda-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drudge%2Fjson-config-lambda-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drudge%2Fjson-config-lambda-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drudge%2Fjson-config-lambda-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drudge","download_url":"https://codeload.github.com/drudge/json-config-lambda-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drudge%2Fjson-config-lambda-handler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"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":["aws","aws-lambda","config","environment-variables","json","kms","lambda"],"created_at":"2024-11-13T01:34:26.196Z","updated_at":"2026-04-13T09:31:22.862Z","avatar_url":"https://github.com/drudge.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"json-config-lambda-handler\n==========================\n\n```js\nconst withConfig = require('json-config-lambda-handler');\n\nfunction handleEvent({ event, config }, callback) {\n  console.log('event = ', event);\n  console.log('config = ', config);\n  callback(null);\n}\n\nexports.handle = withConfig(handleEvent);\n```\n\n## module.exports(handler)\n\n* `handler` \u003c[Function]\u003e called when the handler is invoked\n  * `args` \u003c[Object]\u003e\n    * `event` \u003c[Object]\u003e AWS Lambda uses this parameter to pass in event data to the handler\n    * `context` \u003c[Context Object]\u003e AWS Lambda context object\n    * `config` \u003c[Object]\u003e parsed JSON configuration\n  * `callback` \u003c[Function]\u003e invoke to return info back to caller\n    * `error` \u003c[Error]\u003e an optional parameter that you can use to provide results of the failed Lambda function execution. When a Lambda function succeeds, you can pass null as the first parameter.\n    * `result` \u003c[Object]\u003e an optional parameter that you can use to provide the result of a successful function execution. The result provided must be JSON.stringify compatible. If an error is provided, this parameter is ignored.\n\n## module.exports(environmentVariable, handler)\n* `environmentVariable` \u003c[String]\u003e an optional parameter containing environment variable name used to store the configuration. If not provided, a default value of `CONFIG` is used.\n* `handler` \u003c[Function]\u003e called when the handler is invoked\n  * `args` \u003c[Object]\u003e\n    * `event` \u003c[Object]\u003e AWS Lambda uses this parameter to pass in event data to the handler\n    * `context` \u003c[Context Object]\u003e AWS Lambda context object\n    * `config` \u003c[Object]\u003e parsed JSON configuration\n  * `callback` \u003c[Function]\u003e invoke to return info back to caller\n    * `error` \u003c[Error]\u003e an optional parameter that you can use to provide results of the failed Lambda function execution. When a Lambda function succeeds, you can pass null as the first parameter.\n    * `result` \u003c[Object]\u003e an optional parameter that you can use to provide the result of a successful function execution. The result provided must be JSON.stringify compatible. If an error is provided, this parameter is ignored.\n\n[Function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n[String]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n[Object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n[Error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n[Context Object]: http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrudge%2Fjson-config-lambda-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrudge%2Fjson-config-lambda-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrudge%2Fjson-config-lambda-handler/lists"}