{"id":18930059,"url":"https://github.com/labd/go-rds-iam","last_synced_at":"2025-08-23T09:12:33.739Z","repository":{"id":62908900,"uuid":"563441611","full_name":"labd/go-rds-iam","owner":"labd","description":"A SQL Driver for connecting to AWS RDS instances via IAM roles","archived":false,"fork":false,"pushed_at":"2022-11-09T12:58:40.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-25T02:44:33.065Z","etag":null,"topics":["go","rds-iam-authentication"],"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/labd.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}},"created_at":"2022-11-08T16:09:09.000Z","updated_at":"2022-11-08T20:30:49.000Z","dependencies_parsed_at":"2023-01-22T10:15:15.011Z","dependency_job_id":null,"html_url":"https://github.com/labd/go-rds-iam","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/labd/go-rds-iam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fgo-rds-iam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fgo-rds-iam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fgo-rds-iam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fgo-rds-iam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labd","download_url":"https://codeload.github.com/labd/go-rds-iam/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fgo-rds-iam/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746301,"owners_count":24813557,"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-23T02:00:09.327Z","response_time":69,"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":["go","rds-iam-authentication"],"created_at":"2024-11-08T11:36:22.625Z","updated_at":"2025-08-23T09:12:33.712Z","avatar_url":"https://github.com/labd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RDS IAM SQL Driver for Go\n\n\n## Usage\n\nMake sure you have set the env var `AWS_REGION` to the region you want to\nconnect to.\n\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"\n\n\t\"github.com/xo/dburl\"\n\n\t_ \"github.com/labd/go-rds-iam/rdsiam\"\n)\n\n// Register the custom schema with dburl\nfunc init() {\n\tdburl.Register(dburl.Scheme{\n\t\tDriver:    \"postgresql-rdsiam\",\n\t\tGenerator: dburl.GenPostgres,\n\t\tTransport: dburl.TransportUnix,\n\t\tOpaque:    false,\n\t\tAliases:   []string{\"postgresql-rdsiam\"},\n\t\tOverride:  \"\",\n\t})\n}\n\nfunc main() {\n\tdb, err := dburl.Open(\"postgresql-rdsiam://iam-role@rds-server/my-database\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer db.Close()\n\n\tctx := context.Background()\n\trows, err := db.QueryContext(ctx, `SELECT 'foobar' AS one`)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfor rows.Next() {\n\t\tvar value string\n\t\trows.Scan(\u0026value)\n\t\tfmt.Println(\"Selected:\", value)\n\t}\n}\n\n// alternative skips registering the url with dburl\nfunc alternative() {\n\tdsn, err := dburl.Parse(\"postgres://iam-role@rds-server/my-database\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tdb, err := sql.Open(\"postgresql-rdsiam\", dsn.DSN)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer db.Close()\n}\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabd%2Fgo-rds-iam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabd%2Fgo-rds-iam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabd%2Fgo-rds-iam/lists"}