{"id":18573157,"url":"https://github.com/localstack-samples/lambda-appconfig-apigwv2","last_synced_at":"2025-07-30T01:33:12.068Z","repository":{"id":205163040,"uuid":"711656437","full_name":"localstack-samples/lambda-appconfig-apigwv2","owner":"localstack-samples","description":"Sample shows Lambda+AppConfig integration using Amazon provided Lambda layers","archived":false,"fork":false,"pushed_at":"2023-12-15T00:45:21.000Z","size":919,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-07-12T11:07:17.019Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/localstack-samples.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}},"created_at":"2023-10-29T23:00:46.000Z","updated_at":"2023-11-02T18:42:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"605bf64b-9dc1-4163-87e9-873a70d83e6a","html_url":"https://github.com/localstack-samples/lambda-appconfig-apigwv2","commit_stats":null,"previous_names":["localstack-samples/lambda-appconfig-apigwv2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/localstack-samples/lambda-appconfig-apigwv2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-appconfig-apigwv2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-appconfig-apigwv2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-appconfig-apigwv2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-appconfig-apigwv2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localstack-samples","download_url":"https://codeload.github.com/localstack-samples/lambda-appconfig-apigwv2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-appconfig-apigwv2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267792623,"owners_count":24144929,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-06T23:08:14.730Z","updated_at":"2025-07-30T01:33:12.023Z","avatar_url":"https://github.com/localstack-samples.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda+AppConfig Integration\n\nLambda+AppConfig integration is easy to use. Amazon provides Lambda Layers to implement the integration!\nWith AppConfig, you can store application configuration such as feature flags.\nThis integration makes it simple to retrieve application configuration in your Lambdas.\nCheckout the AWS documentation\nhere [AWS Lambda AppConfig docs](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-integration-lambda-extensions.html).\n\n![Solution](./docs/img/solution-diags-overview.drawio.png)\n\n# Overview\n\n- IaC in AWS CDK\n- DevOps tooling and makefile configuration\n- Lambda+AppConfig integration using Amazon provided Lambda layers\n- Solution deploys to LocalStack and includes an integration test\n- Solution deploys to AWS using the same IaC\n\n## LocalStack Requirements\n\n- LocalStack Pro subscription\n- LocalStack Extension for Lambda+AppConfig. Contact LocalStack for details.\n\n## Tooling Requirements with GDC\n\n- Docker or DockerDesktop\n- Install/clone the GDC (Generic Dev Container) [here](https://github.com/devxpod/GDC). We'll refer to this cloned\n  directory as `GDC_HOME`.\n\n## Setup with GDC\n\nSet `GDC_HOME`\n\n```shell\nexport GDC_HOME=\u003cpath to clone GDC repo\u003e\n```\n\n### Configure LocalStack Auth\n\nStarting the GDC starts LocalStack and a dev container.\nAdd a file to the root of this project called `.env-gdc-local` and put either your LocalStack API key in it\nor your LocalStack Auth Token in it. This file is in `.gitignore` and not tracked.\nContents to look like this:\n\n```shell\nexport LOCALSTACK_AUTH_TOKEN=\"\u003cyour auth token\u003e\"\n# OR\nexport LOCALSTACK_API_KEY=\"\u003cyour API key\u003e\"\n```\n\n### Start the GDC + LocalStack\n\nFrom the root directory of this cloned project.\n\n```shell\n${GDC_HOME}/run-dev-container.sh\n```\n\n### Deploy LocalStack Lambda+AppConfig Extension\n\nContact LocalStack for details.\nExample install from your host computer.\n\n```shell\nexport LOCALSTACK_VOLUME_DIR=\u003cpath to project\u003e/lambda-appconfig-apigwv2/ls_volume\nlocalstack extensions -v install file://\u003cpath to extension\u003e/localstack-extension-lambda-appconfig-0.1.0.tar.gz\n```\n\n### Get into GDC shell\n\nUnless otherwise stated, do all commands from within a GDC shell.\n\n```shell\ndocker exec -it lappc-dev-1 bash -l\n```\n\nRestart LocalStack so it will load the LocalStack Extension on startup.\n\n```shell\nmake restart-ls\n```\n\n# Deploy to LocalStack\n\n## Deploy with AWS CDK to LocalStack\n\n### Bootstrap AWS CDK Stacks on LocalStack\n\nYou need to do this once.\n\n```shell\nmake local-awscdk-bootstrap\n```\n\n### Deploy App Stack on LocalStack\n\nThis will deploy the resources.\n\n```shell\nmake local-awscdk-deploy\n```\n\n### Curl APIGW Url\n\n```shell\nmake local-awscdk-invoke\n```\n\n### Run test\n\nThis will run the integration test asserting the Lambda AppConfig and DynamoDB integrations work.\n\n```shell\nmake local-awscdk-test\n```\n\n### Cleanup and restart LocalStack\n\n```shell\nmake local-awscdk-clean restart-ls\n```\n\n# Deploy to AWS\n\nWe use the same IaC pipelines to deploy to AWS! This is a very important point that LocalStack enables teams\nto test their IaC pipelines locally before ever deploying them to a live AWS environment.\n\nDo this from your host machine. Not inside the GDC.\n\nInstall AWS `cdk`\n\n```shell\nnpm install -g aws-cdk\n```\n\n## Set Live AWS Credentials\n\nHowever you set your credentials in your terminal, do it now.\n\n### Deploy the AWS CDK IaC App Stack\n\nBootstrap the account. Only need to do this once per account/region.\n\n```shell\nmake sbx-awscdk-bootstrap\n```\n\nThis will deploy the resources.\n\n```shell\nmake sbx-awscdk-deploy\n```\n\n### Invoke the Lambda in AWS\n\n```shell\nmake sbx-awscdk-invoke\n```\n\n### Destroy the CDK Stack in AWS\n\n```shell\nmake sbx-awscdk-destroy\n```\n\n# LocalStack DevX\n\nWith LocalStack, you can iterate quickly with an Amazing DevX.\nThe deployment of this solution to AWS takes **11 minutes**. The deployment of this solution\nto LocalStack takes **34 seconds**.\n\n![AWS Deployment Time](./docs/img/aws-deploy-timing.png)\n![LocalStack Deployment Time](./docs/img/localstack-deploy-timing.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstack-samples%2Flambda-appconfig-apigwv2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalstack-samples%2Flambda-appconfig-apigwv2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstack-samples%2Flambda-appconfig-apigwv2/lists"}