{"id":17356538,"url":"https://github.com/karl-cardenas-coding/dynamodb-local-example","last_synced_at":"2025-08-03T06:34:31.460Z","repository":{"id":39008275,"uuid":"286897313","full_name":"karl-cardenas-coding/dynamodb-local-example","owner":"karl-cardenas-coding","description":"This is an example project to showcase how to use DynamoDB locally while leveraging Terraform, localstack, and noSQL Workbench for DynamoDB 💻","archived":false,"fork":false,"pushed_at":"2023-03-01T22:21:35.000Z","size":4822,"stargazers_count":8,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T07:03:55.250Z","etag":null,"topics":["dynamodb-local","go","localstack","nosql-workbench","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karl-cardenas-coding.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":"2020-08-12T02:33:14.000Z","updated_at":"2023-10-16T13:41:37.000Z","dependencies_parsed_at":"2024-10-15T18:41:01.611Z","dependency_job_id":null,"html_url":"https://github.com/karl-cardenas-coding/dynamodb-local-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/karl-cardenas-coding/dynamodb-local-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karl-cardenas-coding%2Fdynamodb-local-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karl-cardenas-coding%2Fdynamodb-local-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karl-cardenas-coding%2Fdynamodb-local-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karl-cardenas-coding%2Fdynamodb-local-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karl-cardenas-coding","download_url":"https://codeload.github.com/karl-cardenas-coding/dynamodb-local-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karl-cardenas-coding%2Fdynamodb-local-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268505409,"owners_count":24260953,"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-08-03T02:00:12.545Z","response_time":2577,"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":["dynamodb-local","go","localstack","nosql-workbench","terraform"],"created_at":"2024-10-15T18:40:57.853Z","updated_at":"2025-08-03T06:34:31.327Z","avatar_url":"https://github.com/karl-cardenas-coding.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go version](https://img.shields.io/github/go-mod/go-version/karl-cardenas-coding/dynamodb-local-example?filename=upload-tool%2Fgo.mod)](https://golang.org/dl/)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/karl-cardenas-coding/dynamodb-local-example.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/karl-cardenas-coding/dynamodb-local-example/alerts/)\n\n# DynamoDB-local-example\nThis is an example project to showcase how to use DynamoDB locally while leveraging Terraform, localstack, and noSQL Workbench for DynamoDB. An in-depth explanation is provided in the following Medium article, [\"How to use DynamoDB locally..\"](https://medium.com/@cardenas88karl/how-to-use-aws-dynamodb-locally-ad3bb6bd0163#92fe-53da0f183cd6)\n\n\n## Changing JSON Content\nYou can either replace the JSON content inside the file `static/raw-data.json` OR provide your own file. Just make sure you change the variable value `json-file-path` in the `terraform.tfvars` file. If you want to leverage the AWS CLI approach then follow the same steps, either replace `static/formatted-data.json` OR change the content inside. Just ensure that the content is in the correct format that DynamoDB expects (DynamoDB JSON).\n\n\n\n## Customizing the upload script\nCustomizing the upload script is pretty easy. The only file that that needs to be modified is the `upload-tool/internal/upload.go`. Simply replace the content of the `Model` struct. Keep the same name `Model` please, otherwise the program will fail.\n\nExample ( - = *Removal*, + = *Addition*   )\n```go\ntype Model struct {\n-\tOrderID    string `json:\"orderId\"`\n-\tCustomerID string `json:\"customerId\"`\n-\tShipped    string `json:\"shipped,omitempty\"`\n-\tEmail      string `json:\"email\"`\n-\tAddress    string `json:\"address\"`\n-\tCost       string `json:\"cost\"`\n}\n\n\n// New example struct\ntype Model struct {\n+\tEmployeeId    string `json:\"employeeId\"`\n+\tDivision      string `json:\"Division\"`\n+\tHiringDate    string `json:\"HiringDate\"`\n+\tEmail         string `json:\"email\"`\n+\tPayGrade      string `json:\"payGrade\"`\n+   HRCode        string `json:\"hrCode\"`   \n}\n\n```\n\n## Compiling Binary\nOnce you have the required change to the `Model` struct all that is required of you is to compile the binary for the operating system you need it for. If you have Go installed on your environment, simply execute the `go build` command.\n\n I have included build commands for the most common operating systems. Should you need to compile for other opearting systems please visit the Golang documentation for the proper `GOOS` and `GOARCH` [values](https://golang.org/doc/install/source). Place the compiled binary in the root of the project structure.\n\n\n### Windows 64 bit\n```bash\n env GOOS=windows GOARCH=amd64 go build -o=upload-logic.exe\n```\n\n### Linux 64 bit\n```bash\n env GOOS=linux GOARCH=amd64 go build -o=upload-logic\n```\n\n### Darwin (Mac) 64 bit\n```bash\n env GOOS=darwin GOARCH=amd64 go build -o=upload-logic\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarl-cardenas-coding%2Fdynamodb-local-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarl-cardenas-coding%2Fdynamodb-local-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarl-cardenas-coding%2Fdynamodb-local-example/lists"}