{"id":18445723,"url":"https://github.com/voronenko/loki-aws-backend-playground","last_synced_at":"2026-01-27T07:36:14.174Z","repository":{"id":145345611,"uuid":"408897972","full_name":"Voronenko/loki-aws-backend-playground","owner":"Voronenko","description":null,"archived":false,"fork":false,"pushed_at":"2021-09-28T14:42:13.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T14:40:49.461Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/Voronenko.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":"2021-09-21T16:41:29.000Z","updated_at":"2021-09-28T14:42:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"aba97da0-0ef4-4e5f-9728-202baec821d1","html_url":"https://github.com/Voronenko/loki-aws-backend-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Voronenko/loki-aws-backend-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Floki-aws-backend-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Floki-aws-backend-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Floki-aws-backend-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Floki-aws-backend-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Voronenko","download_url":"https://codeload.github.com/Voronenko/loki-aws-backend-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Floki-aws-backend-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28808187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:14:39.408Z","status":"ssl_error","status_checked_at":"2026-01-27T07:14:39.098Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-06T07:06:59.779Z","updated_at":"2026-01-27T07:36:14.158Z","avatar_url":"https://github.com/Voronenko.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Loki playground with aws S3/DynamoDB backend\n\n## Intro\n\nBy default – Loki will store data inside its container / instance, usually under /tmp/loki directory.\n\nFor purposes of the current demo, we are emulating S3 with Minio S3 compatible storage, and DynamoDB\nwith native Amazon's Dynamodb.local.\n\nOn that database we will need to create a table, called `loki_index` with primary key h(string)\nand sort key named r(BinaryType) - note it is same as index/prefix in storage config for s3.\n\n## Managing docker loki driver\n\n### Installing\nThe Docker plugin must be installed on each Docker host that will be running containers you want to collect logs from.\n\n```sh\ndocker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions\n```\n\nTo check installed plugins\n\n```sh\ndocker plugin ls\nID                  NAME         DESCRIPTION           ENABLED\nac720b8fcfdb        loki         Loki Logging Driver   true\n```\nOnce the plugin is installed it can be configured.\n\n### Upgrade\n\n```sh\ndocker plugin disable loki --force\ndocker plugin upgrade loki grafana/loki-docker-driver:latest --grant-all-permissions\ndocker plugin enable loki\nsystemctl restart docker\n```\n\n### Uninstall\n\n```sh\ndocker plugin disable loki --force\ndocker plugin rm loki\n```\n\n## Redirecting logs to primary loki instance\n\nSwitching from driver: local to driver loki, allows redirection of the container logs to specific loki instance.\n\n```\nx-compose-logging: \u0026compose-logging\n  logging:\n    # Leave local for classic log\n    # driver: local\n     driver: loki\n     options:\n       loki-url: \"http://172.19.0.4:3100/loki/api/v1/push\"\n```\n\n## Exposed services\n\n### Minio S3 management console\n\nhttps://minio.lvh.voronenko.net/\n\nAlso ports 9000 for S3 endpoint, 10000 for console\n\n### DynamoDB Web UI\n\nhttps://dynamodb.lvh.voronenko.net/\n\nalso port 7777\n\n## Accessing Minio with aws cli\n\n`~/.aws/config` entry might look as\n\n```\n[profile minio]\nregion = us-east-1\ns3 =\n    signature_version = s3v4\n```\n\nand `~/.aws/credentials` credentials entry might look as\n\n```\n[minio]\naws_access_key_id = user\naws_secret_access_key = password\n```\n\nIf you set everything properly, you can\n\nlist buckets\n\n```sh\naws --endpoint-url http://minio.lvh.voronenko.net:9000 s3 ls\n```\n\nlist files\n\n```sh\naws --endpoint-url http://minio.lvh.voronenko.net:9000 s3 ls s3://chunks\n```\n\ncreate buckets\n\n```sh\naws --endpoint-url http://minio.lvh.voronenko.net:9000 s3 mb s3://mybucket\n```\n\nadd some objects to bucket\n\n```sh\naws --endpoint-url http://minio.lvh.voronenko.net:9000 s3 cp docker-compose.yml s3://mybucket\n```\n\n## Scope of the demo.\n\nDemo illustrates running loki in two different modes:\n\n### S3 + DynamoDB\n\nIn that scenario - log chunks are stored on a AWS S3 compatible storage, and index is stored in AWS DocumentDB.\nCorresponding configuration file `rootfs/etc/loki/loki-local-config-dynamodb.yml`\n\nPresence of the DynamoDB, which also adds additional cost of ownership might be additional point to consider.\n\n### Pure S3 using BoltDB Shipper\n\nBoltDB Shipper lets you run Loki without any dependency on NoSQL stores for storing index. It locally stores the index in BoltDB files instead and keeps shipping those files to a shared object store i.e the same object store which is being used for storing chunks. It also keeps syncing BoltDB files from shared object store to a configured local directory for getting index entries created by other services of same Loki cluster. This helps run Loki with one less dependency and also saves costs in storage since object stores are likely to be much cheaper compared to cost of a hosted NoSQL store or running a self hosted instance of Cassandra.\n\nCorresponding configuration file `rootfs/etc/loki/loki-local-config.yml`\n\n## Known issues\n\n### Large number of small files in S3 bucket\n\nCheck https://grafana.com/docs/loki/latest/best-practices/. You most likely have high cardinality labels, leading to too many streams (and therefore many small objects in your object store).\n\nYou can use\n\n$ logcli series --analyze-labels '{}'\nto check the cardinality of your labels and the number of streams.\n\n\n### Strange errors can't flush...\n\n```\ncaller=flush.go:118 org_id=fake msg=”failed to flush user” err=”NoCredentialProviders: no valid providers in chain. Deprecated.\\n\\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors”\n```\n\nIn current demo this can be supressed by Solved using the same ACCESS:SECRET key pair for both S3 and DynamoDB configs.\n\n\n###  Access denied during syncing tables\n\nRelated issue: https://github.com/grafana/loki/issues/2868\n\n```\nmsg=\"\"error syncing tables\"\" err=\"\"AccessDenied: Access Denied\n\\tstatus code: 403, request id: 13650B3B4BBE6387, host id: 82wYupHP/XAKe66FDSAlEwlfTju5D8mRobyDx2G0BccSkK22q5pXbyWF2Qwtn8OAgj+i5OH7br8=\"\"\"\n```\n\nQuite strange workaround:\n\n```\nSo instead of s3://endpoint/bucket it should rather be https://endpoint:443/bucket\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoronenko%2Floki-aws-backend-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoronenko%2Floki-aws-backend-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoronenko%2Floki-aws-backend-playground/lists"}