{"id":18573160,"url":"https://github.com/localstack-samples/lambda-ddb","last_synced_at":"2025-05-15T23:12:51.718Z","repository":{"id":215853025,"uuid":"739896812","full_name":"localstack-samples/lambda-ddb","owner":"localstack-samples","description":"Example APIGW Lambda DynamoDB solution with integration test","archived":false,"fork":false,"pushed_at":"2024-02-01T13:11:46.000Z","size":1551,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-17T14:44:43.755Z","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}},"created_at":"2024-01-06T21:50:06.000Z","updated_at":"2024-01-06T23:24:30.000Z","dependencies_parsed_at":"2024-02-01T14:42:45.286Z","dependency_job_id":null,"html_url":"https://github.com/localstack-samples/lambda-ddb","commit_stats":null,"previous_names":["localstack-samples/lambda-ddb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-ddb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-ddb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-ddb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack-samples%2Flambda-ddb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localstack-samples","download_url":"https://codeload.github.com/localstack-samples/lambda-ddb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436950,"owners_count":22070949,"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":[],"created_at":"2024-11-06T23:08:15.211Z","updated_at":"2025-05-15T23:12:51.690Z","avatar_url":"https://github.com/localstack-samples.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda DynamoDB APIGW solution with integration test\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- 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\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## Deploy and Test in Integration Environment\nTo deploy and test in an integration environment, change all of the `local-\u003ccommand\u003e` commands above to `integ-\u003ccommand\u003e`.\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstack-samples%2Flambda-ddb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalstack-samples%2Flambda-ddb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstack-samples%2Flambda-ddb/lists"}