{"id":21000698,"url":"https://github.com/pbkn/aws-sam-appconfig-demo","last_synced_at":"2026-04-27T09:02:18.534Z","repository":{"id":250612639,"uuid":"834949539","full_name":"pbkn/aws-sam-appconfig-demo","owner":"pbkn","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-28T20:29:37.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T20:47:04.325Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbkn.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":"2024-07-28T19:44:58.000Z","updated_at":"2024-07-28T20:29:39.000Z","dependencies_parsed_at":"2024-07-28T21:03:49.860Z","dependency_job_id":null,"html_url":"https://github.com/pbkn/aws-sam-appconfig-demo","commit_stats":null,"previous_names":["pbkn/aws-sam-appconfig-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pbkn/aws-sam-appconfig-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbkn%2Faws-sam-appconfig-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbkn%2Faws-sam-appconfig-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbkn%2Faws-sam-appconfig-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbkn%2Faws-sam-appconfig-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbkn","download_url":"https://codeload.github.com/pbkn/aws-sam-appconfig-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbkn%2Faws-sam-appconfig-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32329466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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-19T08:11:58.457Z","updated_at":"2026-04-27T09:02:18.460Z","avatar_url":"https://github.com/pbkn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS AppConfig Feature Flag with SAM\n\nThis pattern creates\n\n- AWS AppConfig Feature Flag configuration\n- AWS Lambda that reads the feature flags from AWS AppConfig\n- Amazon API Gateway HTTP API that triggers the AWS Lambda\n\nThe feature flag configuration in this example contains two flags:\n\n- a simple boolean flag ON/OFF\n- a flag that can be ON/OFF but, when it is ON, it has a numeric value\n\nImportant: this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the [AWS Pricing page](https://aws.amazon.com/pricing/) for details. You are responsible for any AWS costs incurred. No warranty is implied in this example.\n\n## Requirements\n\n- [Create an AWS account](https://portal.aws.amazon.com/gp/aws/developer/registration/index.html) if you do not already have one and log in. The IAM user that you use must have sufficient permissions to make necessary AWS service calls and manage AWS resources.\n- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured\n- [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n- [AWS Serverless Application Model](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) (AWS SAM) installed\n\n## Deployment Instructions\n\n1. Create a new directory, navigate to that directory in a terminal and clone the GitHub repository:\n\n    ```\n    git clone https://github.com/aws-samples/serverless-patterns\n    ```\n\n1. Change directory to the pattern directory:\n\n    ```\n    cd appconfig-feature-flag-sam\n    ```\n\n1. From the command line, use AWS SAM to build and deploy the AWS resources for the pattern as specified in the template.yml file:\n\n    ```\n    sam build\n    sam deploy --guided\n    ```\n\n1. During the prompts:\n    - Enter a stack name: eg. appconfig-feature-flag-sam\n    - Enter the desired AWS Region: eg. us-east-1\n    - Enter the Application Name to identify the application in AWS AppConfig: appconfig-feature-flag-sam\n    - Enter the Environment Name: eg. dev\n    - Enter the name of the Feature Flag configuration: TestConfig\n    - Enter the AWS AppConfig Lambda extension arn for your Region from https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-integration-lambda-extensions-versions.html#appconfig-integration-lambda-extensions-enabling-x86-64\n    - Allow SAM CLI to create IAM roles with the required permissions.\n\n   Once you have run `sam deploy -guided` mode once and saved arguments to a configuration file (samconfig.toml), you can use `sam deploy` in future to use these defaults.\n\n1. Note the outputs from the SAM deployment process. These contain the resource names and/or ARNs which are used for testing.\n\n## How it works\n\nThis pattern deploys an Amazon API Gateway HTTP API that, throuogh the `config` endpoint, triggers the AWS Lambda. The function retrieves the feature flags fron AWS AppConfig.\n\nThe AWS Lambda is configured to have access to the application's configuration for a specific environment.\n\n### Testing\n\nOnce the application is deployed, retrieve the HttpApiUrl value from CloudFormation Outputs. Either browse to the endpoint in a web browser or call the endpoint from Postman. Remeber to append the path of the endpoint that retrieves the configuration (`config`)\n\nExample GET Request: \u003chttps://{HttpApiId}.execute-api.eu-west-1.amazonaws.com/config\u003e\n\nResponse:\n```\n\n{\n  \"Pagination\":{\n    \"Enabled\":true,\"PageSize\":5\n    },\n  \"WizardSwitch\":{\n    \"Enabled\":true\n    }\n}\n\n```\n\n## Documentation\n\n- [AWS AppConfig](https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html)\n- [AWS AppConfig Feature Flag](https://aws.amazon.com/it/blogs/mt/using-aws-appconfig-feature-flags/)\n- [AWS AppConfig integration with Lambda extensions](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-integration-lambda-extensions.html)\n- [Learn to Use AWS AppConfig Feature Flags](https://catalog.us-east-1.prod.workshops.aws/workshops/2ee2fc71-0618-479c-86dd-1d5fb168eb20/en-US/getting-started)\n\n## Cleanup\n\n1. Delete the stack\n\n    ```bash\n    sam delete \n    ```\n\nThis pattern was contributed by Greg Davis.\n\n----\nCopyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nSPDX-License-Identifier: MIT-0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbkn%2Faws-sam-appconfig-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbkn%2Faws-sam-appconfig-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbkn%2Faws-sam-appconfig-demo/lists"}