{"id":13989934,"url":"https://github.com/artilleryio/chaos-lambda","last_synced_at":"2025-07-22T11:32:20.271Z","repository":{"id":57132970,"uuid":"53058800","full_name":"artilleryio/chaos-lambda","owner":"artilleryio","description":"Serverless chaos monkey for AWS (runs on AWS Lambda) ☁️ 💥","archived":false,"fork":false,"pushed_at":"2023-10-26T05:34:22.000Z","size":48,"stargazers_count":290,"open_issues_count":18,"forks_count":26,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-10-11T09:11:15.072Z","etag":null,"topics":["aws","chaos-monkey","fault-tolerance","reliability-engineering"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artilleryio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-03-03T14:56:49.000Z","updated_at":"2024-09-23T12:33:41.000Z","dependencies_parsed_at":"2022-09-16T13:10:33.303Z","dependency_job_id":"f7abac12-4db0-400d-b2ff-7595f1fb5de0","html_url":"https://github.com/artilleryio/chaos-lambda","commit_stats":{"total_commits":54,"total_committers":4,"mean_commits":13.5,"dds":"0.20370370370370372","last_synced_commit":"24d23efa86076f054d533f434afc4c85879b6812"},"previous_names":["shoreditch-ops/chaos-lambda","hassy/llama-cli"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artilleryio%2Fchaos-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artilleryio%2Fchaos-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artilleryio%2Fchaos-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artilleryio%2Fchaos-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artilleryio","download_url":"https://codeload.github.com/artilleryio/chaos-lambda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227089477,"owners_count":17729471,"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","chaos-monkey","fault-tolerance","reliability-engineering"],"created_at":"2024-08-09T13:02:10.944Z","updated_at":"2024-11-29T09:30:37.115Z","avatar_url":"https://github.com/artilleryio.png","language":"JavaScript","readme":"\u003cpre\u003e\n      _                       _                 _         _\n  ___| |__   __ _  ___  ___  | | __ _ _ __ ___ | |__   __| | __ _\n / __| '_ \\ / _` |/ _ \\/ __| | |/ _` | '_ ` _ \\| '_ \\ / _` |/ _` |\n| (__| | | | (_| | (_) \\__ \\ | | (_| | | | | | | |_) | (_| | (_| |\n \\___|_| |_|\\__,_|\\___/|___/ |_|\\__,_|_| |_| |_|_.__/ \\__,_|\\__,_|\n\u003c/pre\u003e\n\n- **Website**: [https://artillery.io/chaos-lambda](https://artillery.io/chaos-lambda)\n- **Source**: [https://github.com/shoreditch-ops/chaos-lambda](https://github.com/shoreditch-ops/chaos-lambda)\n- **Issues**: [https://github.com/shoreditch-ops/chaos-lambda/issues](https://github.com/shoreditch-ops/chaos-lambda/issues)\n- **Twitter**: [@ShoreditchOps](https://twitter.com/ShoreditchOps)\n\n# Meet Chaos Lambda\n\n**Chaos Lambda** is a serverless implementation of Netflix's [Chaos Monkey](https://github.com/Netflix/SimianArmy/wiki/Chaos-Monkey).\n\nIt will wreak havoc\\* on your AWS infrastructure to help you build systems that are **lean**, **mean**, and **resilient to failure**.\n\n\u003csub\u003e* - in an extremely controlled manner - Chaos Lambda is **disabled by default**\u003c/sub\u003e\n\n# About\n\nChaos Lambda is a small tool for testing resiliency and recoverability of AWS-based architectures. Once configured and deployed, it will randomly terminate or otherwise interfere\u003csup\u003e**[*](#features)**\u003c/sup\u003e with the operation of your EC2 instances and ECS tasks. It is inspired by Netflix's [Chaos Monkey](https://github.com/Netflix/SimianArmy/wiki/Chaos-Monkey), but instead of requiring an EC2 instance to run on, it uses AWS Lambda. Think of it as Chaos Monkey rebuilt with modern tech.\n\n## Installation\n\nYou need [Node.js](https://nodejs.org/en/) to use Chaos Lambda (we will rewrite the CLI in Golang ats some point):\n\n```shell\n# npm comes bundled with Node.js\nnpm install -g chaos-lambda\n```\n\n## Setting Up\n\n### AWS Configuration\n\nAn IAM user and a role for the lambda need to be set up first.\n\n#### IAM User\n\nMust be set up and credentials set up in `~/.aws/credentials`\n\n#### Lambda Role\n\nRequired policies:\n- AmazonEC2FullAccess\n\n### Setting up Chaos Lambda\n\nTo create the AWS Lambda function run:\n\n```shell\nchaos-lambda deploy -r $lambda-role-arn\n```\n\nThis will create a state file (`chaos_lambda_config.json`) which is needed for\nsubsequent re-deploys, and deploy Chaos Lambda to AWS. It will be configured\nto run once an hour, but it **won't do anything** every time it runs.\n\nTo configure termination rules, run `deploy` with a [`Chaosfile`](./Chaosfile.json):\n\n```shell\nchaos-lambda deploy -c Chaosfile.json\n```\n\n#### Chaosfile.json\n\nExample Chaosfile.json:\n\n```javascript\n{\n  \"interval\": \"60\",\n  \"enableForASGs\": [\n  ],\n  \"disableForASGs\": [\n  ]\n}\n```\n\n**Options:**\n\n- `interval` (in minutes) - how frequently Chaos Lambda should run. Minimum\nvalue is `5`. Default value is `60`.\n- `enableForASGs` - whitelist of names of ASGs to pick an instance from.\nInstances in other ASGs will be left alone. Empty list (`[]`) means Chaos Lambda\nwon't do anything.\n- `disableForASGs` - names of ASGs that should not be touched; instances in any\nother ASG are eligible for termination.\n\nIf both `enableForASGs` and `disableForASGs` are specified, then only\n`enableForASGs` rules are applied.\n\n**Enable/Disable/Status:**\nOnce deployed you can enable and disable Chaos Lambda without redeploying.\n- `chaos-lambda disable` - Will disable Chaos Lambda\n- `chaos-lambda enable` - Will enable Chaos Lambda\n- `chaos-lambda status` - Will display current status\n\n## Chaos Lambda vs Chaos Monkey\n\nChaos Lambda is inspired by Netflix’s \u003ca href=\"https://github.com/Netflix/SimianArmy/wiki/Chaos-Monkey\"\u003eChaos Monkey\u003c/a\u003e. Curious about the differences? Here’s a handy summary:\n\n| Lambda           | Monkey  |\n|:-------------|:-----|\n| Serverless (runs on AWS Lambda) - no maintenance | Needs EC2 instances to run on |\n| Extremely easy to deploy      | Needs quite a bit of setup and config ([\u0026raquo;\u0026raquo;\u0026raquo;](https://github.com/Netflix/SimianArmy/wiki/Quick-Start-Guide)) |\n| Small codebase, easy to understand and extend (\u003c400 SLOC)      | Large codebase (thousands of SLOC) |\n| Written in JS | Written in Go |\n| New on the scene | Mature project |\n| Small feature set | Many features |\n| Open source under MPL 2.0 / MIT | Open source under APL 2.0 |\n| Developed by [Shoreditch Ops](https://twitter.com/ShoreditchOps) | Developed by Netflix |\n\n\n## Why Use Chaos Lambda?\n\n\u003e Failures happen, and they inevitably happen when least desired. If your application can't tolerate a system failure would you rather find out by being paged at 3am or after you are in the office having already had your morning coffee? Even if you are confident that your architecture can tolerate a system failure, are you sure it will still be able to next week, how about next month? Software is complex and dynamic, that \"simple fix\" you put in place last week could have undesired consequences. Do your traffic load balancers correctly detect and route requests around system failures? Can you reliably rebuild your systems? Perhaps an engineer \"quick patched\" a live system last week and forgot to commit the changes to your source repository?\n\n(source: [Chaos Monkey wiki](https://github.com/Netflix/SimianArmy/wiki/Chaos-Monkey#why-run-chaos-monkey))\n\nFurther reading: [Principles Of Chaos Engineering](http://principlesofchaos.org)\n\n## Current Limitations\n\n### Supported AWS Regions\n\nChaos Lambda will only work in these regions (due to a limitation with AWS Lambda Schedules):\n\n- US East (Northern Virginia)\n- US West (Oregon)\n- Europe (Ireland)\n- Asia Pacific (Tokyo)\n\n### Features\n\nRight now, Chaos Lambda only knows how to terminate instances and does not support more advanced interference modes, like introducing extra latency (but it's on the roadmap and being worked on, see [Issue #4](https://github.com/shoreditch-ops/chaos-lambda/issues/4)).\n\n## Bonus Points\n\nWant to go further in your pursuit of indestructible systems? Combine Chaos Lambda with stress testing with [Artillery.io](https://artillery.io) to ship systems that just keep going.\n\n## Support\n\nFile an [issue](https://github.com/shoreditch-ops/chaos-lambda/issues) or drop us a line on [team@artillery.io](mailto:team@artillery.io).\n\n## Contributing\n\nPlease see the [Contributor's Guide](CONTRIBUTING.md)\n\n## License\n\nMPL 2.0 - see [LICENSE.txt](./LICENSE.txt) for details.\n\nThe [lambda/index.js](./lambda/index.js) file is dual-licensed under MPL 2.0 and MIT and can be used under the terms of either of those licenses.\n\n## Contributors\n\n- Hassy Veldstra \u003c[h@artillery.io](mailto:h@artillery.io)\u003e\n\n---\n\n\u003csub\u003eA project by [Shoreditch Ops](https://twitter.com/ShoreditchOps), creators of [artillery.io](https://artillery.io) ⚡️ - simple \u0026amp; powerful load-testing framework.\u003c/sub\u003e\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartilleryio%2Fchaos-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartilleryio%2Fchaos-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartilleryio%2Fchaos-lambda/lists"}