{"id":18217420,"url":"https://github.com/nabeken/aws-go-dynamodb","last_synced_at":"2025-08-02T20:07:41.844Z","repository":{"id":45340074,"uuid":"44373119","full_name":"nabeken/aws-go-dynamodb","owner":"nabeken","description":"An Amazon DynamoDB utility library built with aws/aws-sdk-go-v2","archived":false,"fork":false,"pushed_at":"2025-08-01T23:23:08.000Z","size":296,"stargazers_count":3,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-02T01:18:38.707Z","etag":null,"topics":["aws","aws-sdk-go-v2","dynamodb"],"latest_commit_sha":null,"homepage":"","language":"Go","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/nabeken.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2015-10-16T08:42:04.000Z","updated_at":"2025-08-01T23:22:46.000Z","dependencies_parsed_at":"2023-11-12T06:19:42.896Z","dependency_job_id":"303fed09-3e7b-4eb9-8c94-059057ca2590","html_url":"https://github.com/nabeken/aws-go-dynamodb","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/nabeken/aws-go-dynamodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeken%2Faws-go-dynamodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeken%2Faws-go-dynamodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeken%2Faws-go-dynamodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeken%2Faws-go-dynamodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nabeken","download_url":"https://codeload.github.com/nabeken/aws-go-dynamodb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeken%2Faws-go-dynamodb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268325724,"owners_count":24232455,"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-01T02:00:08.611Z","response_time":67,"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":["aws","aws-sdk-go-v2","dynamodb"],"created_at":"2024-11-03T17:05:19.829Z","updated_at":"2025-08-02T20:07:41.798Z","avatar_url":"https://github.com/nabeken.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-go-dynamodb\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/nabeken/aws-go-dynamodb)](https://pkg.go.dev/github.com/nabeken/aws-go-dynamodb)\n[![Go](https://github.com/nabeken/aws-go-dynamodb/actions/workflows/go.yml/badge.svg)](https://github.com/nabeken/aws-go-dynamodb/actions/workflows/go.yml)\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nabeken/aws-go-dynamodb/blob/master/LICENSE)\n\n`aws-go-dynamodb` is an Amazon DynamoDB utility library built with [aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2).\n\n## v2\n\nUsage:\n```go\nimport \"github.com/nabeken/aws-go-dynamodb/v2\"\n```\n\nAs of Jan 27, 2024, the master branch is work-in-progress for `aws-sdk-go-v2` support. Please be aware of it.\n\n### Migration to v2\n\n`v2` has the breaking changes. Especially, you have better to test marshal and unmarshal behavior in v2 with the existing items that is created with v1.\n\nYou can find the examples in [the test code](https://github.com/nabeken/aws-go-dynamodb/blob/master/table/table_test.go).\n\n**item.{Unmarshaler,Marshaler}**:\n\nThe `Unmarshaler` and `Marshaler` interface in v1 have been removed in favor of the official [`attributevalue.Unmarshaler`](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue#Unmarshaler) and  [`attributevalue.Marshaler`](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue#Marshaler).\n\n**Marshaling and Unmashaling**:\n\nv2 now uses the official [`attributevalue`](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue) package to marshal Go value into DynamoDB item and unmarshal DynamoDB item into Go value.\n\nYou have to add `dynamodbav` struct tag to make your struct work with the `attributevalue` package.\n\n**List and Set in DynamoDB**:\n\nThe official `attributevalue` package handles a Go's slice as List type. If you want to handle it as Set (e.g. StringSet), you have to add `stringset` option in `dynamodbav` struct tag.\n\n**Handling of Expression Attribute**:\n\nv2's `option` package now works well with the official [`expression`](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression) package.\n\n**Handling errors**:\n\nIt's not the v2's specific topic but you now have to handle errors in [the way that aws-sdk-go-v2 recommends](https://aws.github.io/aws-sdk-go-v2/docs/handling-errors/).\n\nExample to check whether if a condition is failed:\n```go\nvar exception *types.ConditionalCheckFailedException\nassert.True(t, errors.As(err, \u0026exception))\nassert.Equal(t, \"ConditionalCheckFailedException\", exception.ErrorCode())\n```\n\n**Handling options**:\n\nThe option appliers are converted into an interface from the optional function pattern.\n\nExample:\n```go\ndtable.GetItem(context.TODO(), hashKey, rangeKey, \u0026actualItem, option.ConsistentRead(true))\n```\n\n## v1\n\nIf you want to use this library with `aws-sdk-go`, please use v1 version of the library.\n\nUsage:\n```go\nimport \"github.com/nabeken/aws-go-dynamodb\"\n```\n\n## Testing\n\nThe tests will run on DynamoDB Local running on `tcp/18000`. Docker helps you to launch it on your local.\n\n```sh\ndocker pull amazon/dynamodb-local:latest\ndocker run --name aws-go-dynamodb -d -p 18000:8000 amazon/dynamodb-local:latest\ncd table\ngo test -v\ndocker rm -f aws-go-dynamodb\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabeken%2Faws-go-dynamodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnabeken%2Faws-go-dynamodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabeken%2Faws-go-dynamodb/lists"}