{"id":26494708,"url":"https://github.com/uwuzone/mass-exec","last_synced_at":"2026-04-11T13:33:10.327Z","repository":{"id":56854666,"uuid":"405498390","full_name":"uwuzone/mass-exec","owner":"uwuzone","description":"concurrently run \"scripts\" and \"tools\" in aws lambda","archived":false,"fork":false,"pushed_at":"2021-11-17T23:58:25.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T12:48:08.183Z","etag":null,"topics":["aws","bugbounty","jokes","security"],"latest_commit_sha":null,"homepage":"","language":"Go","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/uwuzone.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}},"created_at":"2021-09-11T22:50:50.000Z","updated_at":"2024-06-20T12:48:08.184Z","dependencies_parsed_at":"2022-09-21T12:50:37.864Z","dependency_job_id":null,"html_url":"https://github.com/uwuzone/mass-exec","commit_stats":null,"previous_names":["kantatenbot/mass-exec","kantatenbot/lmao"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwuzone%2Fmass-exec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwuzone%2Fmass-exec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwuzone%2Fmass-exec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwuzone%2Fmass-exec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uwuzone","download_url":"https://codeload.github.com/uwuzone/mass-exec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244592954,"owners_count":20477989,"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","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","bugbounty","jokes","security"],"created_at":"2025-03-20T10:24:26.225Z","updated_at":"2025-12-31T00:05:56.505Z","avatar_url":"https://github.com/uwuzone.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"`mass-exec`\n\nrun scripts (concurrently) in lambda\n\n# What is it\n\nIt's a [docker image lambda](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html)\n([`./cmd/mass-exec-runtime`](./cmd/mass-exec-runtime)) that calls `os.Exec`.\n\n# Getting started\n\n## Install the CLI\n\n```bash\ngo install github.com/kantatenbot/mass-exec/cmd/mass-exec\n```\n\n## Deploy\n\n```bash\n; cd terraform\n; mv example.tfvars terraform.tfvars\n# set vars in `terraform.tfvars`, then\n; terraform init\n; terraform apply\n```\n\n## Update the Lambda\n\n- M1 Mac users: `./scripts/update.sh`.\n- Everyone else: update the image tag in your terraform variables, then `terraform apply`. The\n  docker provider handles the image rebuild.\n  - I mean, you could use the script too. it's faster, just not iac\n\n## Usage\n\n### Run a script\n\n```bash\n; mass-exec run --input=\"\" 'echo hello mass-exec'\nrun id 1632881136\n{\"argv\":[],\"run_id\":\"1632881136\",\"bucket\":\"mass-exec-example\",\"key\":\"runs/1632881136\",\"status\":0,\"errors\":[]}\n```\n\n### Run a script and print the output\n\n```bash\n; mass-exec run --input=\"\" 'echo hello mass-exec' | mass-exec receive -D\nrun id 1632881081\nhello mass-exec\n```\n\n### Run a script with inputs. Inputs are passed to your script as argv:\n\n```bash\n# you can use args in your script. note the single quotes\n; echo https://google.com | mass-exec run 'curl -q $1 \u003e/dev/null \u0026\u0026 echo $1 OK' | mass-exec receive -D\nrun id 1632881114\nhttps://google.com OK\n```\n\n### Run a script from a file:\n\n```bash\n# example.sh\nmessage=OK\ncheck_url() {\n  curl -q $1 \u003e/dev/null \u0026\u0026 echo $message\n}\n\ncheck_url $@\n```\n\n```bash\n; echo https://google.com OK | mass-exec run -f example.sh | mass-exec receive -D\nhttps://google.com OK\n```\n\nIf you add a shebang, you can use other languages:\n\n```python\n#!/usr/bin/env python3\nimport sys\n\nimport requests\n\nprint(requests.get(sys.argv[1]).headers)\n```\n\n# FAQs that I've contrived\n\n## What tools does mass-exec have\n\nBYOT. The Dockerfile is a starting point\n\n## can you show me a better demo than echo and curl\n\nno, but here's a pseudoscript that hopefully illustrates my motivation for making this\n\n```bash\n; sc shodan get-host-ports-by-service redis \\\n  | mass-exec run 'list-redis-keys $1' \\\n  | mass-exec receive -o data\n```\n\n# Troubleshooting\n\n### I use an M1 Mac. I deployed with Terraform, but I get no output from commands run in the lambda. My cloudwatch logs show `command err, fork/exec /usr/bin/bash: exec format error`.\n\nRelated: I use an M1 Mac and I get a segfault building the image.\n\n**tl;dr**\nChange line 1 of your dockerfile to this\n\n```dockerfile\nFROM --platform=aarch64 golang:alpine as builder\n```\n\nuse `./scripts/update.sh` to update your lambda image.\n\n**explanation**\n\n- [A qemu bug](https://github.com/docker/for-mac/issues/5123) causes some operations in M1 docker to segfault, including go build when statically linking certain libraries\n- We can work around this by cross-compiling to `linux/amd64` in a multi-stage, multi-platform build\n- But the terraform docker provider doesn't support this\n  - it let's you pick a single platform for the whole build, but doesn't understand --platform flags in a multi-stage build atm\n  - the lambda module doesn't let you pick your target platform anyway\n- So we have to do it outside of terraform\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwuzone%2Fmass-exec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuwuzone%2Fmass-exec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwuzone%2Fmass-exec/lists"}