{"id":20483714,"url":"https://github.com/cbuschka/aws-scatter-gather","last_synced_at":"2026-05-01T12:32:17.097Z","repository":{"id":95275599,"uuid":"271099237","full_name":"cbuschka/aws-scatter-gather","owner":"cbuschka","description":"Scatter gather with AWS lambda","archived":false,"fork":false,"pushed_at":"2020-10-04T16:05:23.000Z","size":606,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T22:58:17.274Z","etag":null,"topics":["aws","fork-join","lambda","map-reduce","python","scatter-gather","step-functions","terraform"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbuschka.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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-06-09T20:08:30.000Z","updated_at":"2024-06-20T20:58:51.000Z","dependencies_parsed_at":"2023-04-05T19:33:38.260Z","dependency_job_id":null,"html_url":"https://github.com/cbuschka/aws-scatter-gather","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cbuschka/aws-scatter-gather","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbuschka%2Faws-scatter-gather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbuschka%2Faws-scatter-gather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbuschka%2Faws-scatter-gather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbuschka%2Faws-scatter-gather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbuschka","download_url":"https://codeload.github.com/cbuschka/aws-scatter-gather/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbuschka%2Faws-scatter-gather/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32497810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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","fork-join","lambda","map-reduce","python","scatter-gather","step-functions","terraform"],"created_at":"2024-11-15T16:18:33.385Z","updated_at":"2026-05-01T12:32:17.049Z","avatar_url":"https://github.com/cbuschka.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scatter gather with AWS lambda\n\n## The challenge\nImplement batch processing on AWS:\n\n![scatter-gather-general](./doc/scatter-gather-general.svg)\n\n* scatter: Split up a single file of records to be processed (the file has been uploaded via s3)\n* process: Process records as parallel as possible\n* gather: Detect completion of processing and aggregate a result summary report in s3\n\n## Prerequisites\n* python 3.8\n* GNU make\n* docker\n* [awscli](https://docs.aws.amazon.com/de_de/cli/latest/userguide/cli-chap-install.html)\n* [tfvm](https://github.com/cbuschka/tfvm) or terraform\n* [cw \u003e= v3.3.0](https://github.com/lucagrulla/cw)\n\n## Usage locally\n\n### Start localstack, deploy and run benchmark\n```\nmake clean start_localstack deploy benchmark report\n```\n\n### Stop and cleanup\n```\nmake stop_localstack clean\n```\n\n## Usage on aws\n\nAll resources will be prefixed with your current ${USER}-. Pass\nSCOPE=mycustomprefix- to make to override this default.\n\n### Build, package, deploy run benchmark, report on measurements\n```\nmake ENV=aws clean deploy_resources deploy_service benchmark report\n```\n\n### Undeploy\n```\nmake ENV=aws destroy\n```\n\n### Variants\nThe task has been implemented in various variants:\n* s3-sqs-lambda-sync (with boto3 blocking io)\n![s3-sqs-lambda](./doc/s3-sqs-lambda-overview.png)\n* s3-sqs-lambda-async (with aioboto3 async io)\n* s3-sqs-lambda-async-chunked (with aioboto3 async io, records packed into chunks)\n* s3-sqs-lambda-dynamodb (with aioboto3 async io, records stored in dynamodb)\n![s3-sqs-lambda-dynamodb](./doc/s3-sqs-lambda-dynamodb-overview.svg)\n* s3-notification-sqs-lambda (with aioboto3 async io, records stored in s3 in chunks, functions invoked by s3 notifications through sqs queues)\n\n### More/ alternative variants\n* sfn?\n* glue?\n* emr (spark)?\n* s3 athena?\n* s3 batch\n* single fat vm\n\n### Results\n![Results](./doc/report.png)\n\n[(Data)](./measurements.csv)\n\n### Repository structure\n* [infra](./infra) - Resources and service infrastructure\n* [src](./src) - Service sources\n* [tests](./tests) - Service tests\n* [benchmark](./benchmark) - Benchmark sources\n\n### Documentation\n* [Learnings](./doc/learnings.md)\n* [Links](./doc/links.md)\n* [Troubleshooting](./doc/troubleshooting.md)\n\n## License\nCopyright 2020 by Cornelius Buschka. All rights reserved.\n\n[Apache Public License 2.0](./license.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbuschka%2Faws-scatter-gather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbuschka%2Faws-scatter-gather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbuschka%2Faws-scatter-gather/lists"}