{"id":21513074,"url":"https://github.com/turnerlabs/cstore-lambda-layer","last_synced_at":"2026-03-19T20:41:13.351Z","repository":{"id":35674707,"uuid":"218864124","full_name":"turnerlabs/cstore-lambda-layer","owner":"turnerlabs","description":"cStore lambda layer terraform scripts. ","archived":false,"fork":false,"pushed_at":"2023-05-07T04:12:25.000Z","size":9535,"stargazers_count":0,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T14:55:40.660Z","etag":null,"topics":["aws-parameter-store","aws-s3","aws-secrets-manager","config","configuration","cstore","lambda","layers","secrets"],"latest_commit_sha":null,"homepage":null,"language":"HCL","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/turnerlabs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-31T21:22:43.000Z","updated_at":"2019-11-04T16:07:44.000Z","dependencies_parsed_at":"2025-01-24T02:01:33.962Z","dependency_job_id":null,"html_url":"https://github.com/turnerlabs/cstore-lambda-layer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/turnerlabs/cstore-lambda-layer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnerlabs%2Fcstore-lambda-layer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnerlabs%2Fcstore-lambda-layer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnerlabs%2Fcstore-lambda-layer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnerlabs%2Fcstore-lambda-layer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/turnerlabs","download_url":"https://codeload.github.com/turnerlabs/cstore-lambda-layer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnerlabs%2Fcstore-lambda-layer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259981478,"owners_count":22941149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-parameter-store","aws-s3","aws-secrets-manager","config","configuration","cstore","lambda","layers","secrets"],"created_at":"2024-11-23T22:52:47.024Z","updated_at":"2026-01-30T09:52:31.932Z","avatar_url":"https://github.com/turnerlabs.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cStore Lambda Layer\n\nTerraform scripts used to create a lambda layer for [cstore](https://github.com/turnerlabs/cstore).  Lambda functions can use the lambda layer to pull configuration into memory avoiding environment variables or configuration files.\n\n### NodeJS ###\n\n\n\u003cdetails open\u003e\n    \u003csummary\u003eExample Usage\u003c/summary\u003e\n\n```javascript\nconst cstore = require('cstore');\n\nexports.test = function (event, context) {\n    let config = cstore.pull({\n        tags: [process.env.ENV],\n        format: \"json-object\",\n        inject: false\n    })\n\n    Object.keys(config).forEach(function (key) {\n        console.log(key + \"=\" + config[key]);\n    });\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eInfrastructure\u003c/summary\u003e\n\n```bash\n$ export AWS_REGION=us-east-1\n$ export AWS_PROFILE=aws-profile\n```\n\n\n#### 1. Create cStore Lambda Layer ####\n\n```bash\n$ cd nodejs/resources\n$ terraform init\n$ terraform apply\n```\n\n#### 3. Create Example Lambda ####\n\n```bash\n$ cd nodejs/example\n$ touch terraform.tfvars\n```\n\nAdd the cstore lambda layer arn from the previous step's output to `terraform.tfvars`.\n\n```\ncstore_lambda_layer_arn = \"{ARN}\"\n```\n\n```bash\n$ terraform init\n$ terraform apply\n```\n\n#### 2. Push Example Configuration to SSM Parameter Store ####\n\n```bash\n$ cd nodejs/example/lambda\n$ cstore push ../.env\n```\n\n#### 4. Execute Example Lambda ####\n\n```bash\n$ export AWS_DEFAULT_REGION=us-east-1\n$ aws lambda invoke --function-name cstore_lambda_example response.json\n```\n\n\u003c/details\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturnerlabs%2Fcstore-lambda-layer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturnerlabs%2Fcstore-lambda-layer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturnerlabs%2Fcstore-lambda-layer/lists"}