{"id":44054441,"url":"https://github.com/capralifecycle/cdk-lambda-config","last_synced_at":"2026-03-07T08:08:11.064Z","repository":{"id":303119809,"uuid":"1009655382","full_name":"capralifecycle/cdk-lambda-config","owner":"capralifecycle","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-28T06:31:15.000Z","size":7483,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-28T12:28:22.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capralifecycle.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-06-27T13:42:02.000Z","updated_at":"2026-02-28T06:31:18.000Z","dependencies_parsed_at":"2026-01-05T05:00:06.190Z","dependency_job_id":null,"html_url":"https://github.com/capralifecycle/cdk-lambda-config","commit_stats":null,"previous_names":["capralifecycle/cdk-lambda-config"],"tags_count":85,"template":false,"template_full_name":null,"purl":"pkg:github/capralifecycle/cdk-lambda-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capralifecycle%2Fcdk-lambda-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capralifecycle%2Fcdk-lambda-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capralifecycle%2Fcdk-lambda-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capralifecycle%2Fcdk-lambda-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capralifecycle","download_url":"https://codeload.github.com/capralifecycle/cdk-lambda-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capralifecycle%2Fcdk-lambda-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30209819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: 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":[],"created_at":"2026-02-08T00:05:36.000Z","updated_at":"2026-03-07T08:08:11.041Z","avatar_url":"https://github.com/capralifecycle.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CDK Construct for adding config.json file to a Lambda Function\n\nWhen using Lambda@Edge, a function cannot use environment variables.\nThis CDK Construct uses a Custom Resource to inject a `config.json`\nfile with user provided values into an existing function, and\npublishes a new version that is ready to be used as part of a\nCloudFront Distribution.\n\nInspired by similar mechanism in https://github.com/aws-samples/cloudfront-authorization-at-edge/\n\n## Usage\n\n```bash\nnpm install @liflig/cdk-lambda-config\n```\n\nUsing the construct:\n\n```ts\nconst originalFunction = lambda.Function.fromFunctionArn(...)\nconst updatedFunction = new LambdaConfig(this, \"UpdatedFunction\", {\n  function: originalFunction,\n  config: {\n    Key1: \"Some value\",\n    Nested: {\n      Key2: \"Other value\",\n    },\n  },\n  nonce: \"1\", // See TSDoc.\n})\n// Can now retrieve the new version:\nupdatedFunction.version\n```\n\nRead from within the handler:\n\n```ts\nconst fs = require(\"fs\")\nconst path = require(\"path\")\nconst config = JSON.parse(\n  fs.readFileSync(path.join(__dirname, \"config.json\"), \"utf-8\"),\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapralifecycle%2Fcdk-lambda-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapralifecycle%2Fcdk-lambda-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapralifecycle%2Fcdk-lambda-config/lists"}