All Projects → artilleryio → Chaos Lambda

artilleryio / Chaos Lambda

Licence: mpl-2.0
Serverless chaos monkey for AWS (runs on AWS Lambda) ☁️ 💥

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Chaos Lambda

Spark Jupyter Aws
A guide on how to set up Jupyter with Pyspark painlessly on AWS EC2 clusters, with S3 I/O support
Stars: ✭ 259 (-4.78%)
Mutual labels:  aws
Cfripper
Library and CLI tool for analysing CloudFormation templates and check them for security compliance.
Stars: ✭ 265 (-2.57%)
Mutual labels:  aws
Scoutsuite
Multi-Cloud Security Auditing Tool
Stars: ✭ 3,803 (+1298.16%)
Mutual labels:  aws
Ice
AWS Usage Tool
Stars: ✭ 2,784 (+923.53%)
Mutual labels:  aws
Aws list all
List all your AWS resources, all regions, all services.
Stars: ✭ 263 (-3.31%)
Mutual labels:  aws
Infrastructure As Code Training
Materials for learning how to use infrastructure-as-code
Stars: ✭ 268 (-1.47%)
Mutual labels:  aws
Terraform Examples
Terraform samples for all the major clouds you can copy and paste. The future, co-created.
Stars: ✭ 256 (-5.88%)
Mutual labels:  aws
Arc.codes
The Architect web site! 🌩
Stars: ✭ 271 (-0.37%)
Mutual labels:  aws
Foremast
Spinnaker Pipeline/Infrastructure Configuration and Templating Tool - Pipelines as Code.
Stars: ✭ 263 (-3.31%)
Mutual labels:  aws
Gradle Aws Plugin
Gradle plugin to manage Amazon Web Services
Stars: ✭ 269 (-1.1%)
Mutual labels:  aws
Aws App Sync
Easily Deploy AWS AppSync GraphQL APIs Using Serverless Framework Components
Stars: ✭ 261 (-4.04%)
Mutual labels:  aws
Aws To Slack
Forward AWS CloudWatch Alarms and other notifications from Amazon SNS to Slack.
Stars: ✭ 261 (-4.04%)
Mutual labels:  aws
Cortex License Plate Reader Client
A client to connect to cortex-provisioned infrastructure on AWS to do license plate identification in real time.
Stars: ✭ 268 (-1.47%)
Mutual labels:  aws
Blog Tutorials
⭐️ Codebase for the tutorials on my blog about Java, Spring Boot, AWS, Kotlin and Testing
Stars: ✭ 257 (-5.51%)
Mutual labels:  aws
Serverless Architecture Boilerplate
📦 ⚡️ 🚀 Boilerplate to organize and deploy big projects using AWS API Gateway and AWS Lambda with Serverless Framework
Stars: ✭ 269 (-1.1%)
Mutual labels:  aws
Serverlessbydesign
A visual approach to serverless development. Think. Build. Repeat.
Stars: ✭ 254 (-6.62%)
Mutual labels:  aws
Distributedsystemnotes
Notes on Lindsey Kuper's lectures on Distributed Systems
Stars: ✭ 267 (-1.84%)
Mutual labels:  fault-tolerance
Laravel Aws Worker
Run Laravel (or Lumen) tasks and queue listeners inside of AWS Elastic Beanstalk workers
Stars: ✭ 272 (+0%)
Mutual labels:  aws
Aws Serverless Samfarm
This repo is full CI/CD Serverless example which was used in the What's New with AWS Lambda presentation at Re:Invent 2016.
Stars: ✭ 271 (-0.37%)
Mutual labels:  aws
Aws
AWS SDK with readable code and async responses
Stars: ✭ 268 (-1.47%)
Mutual labels:  aws
      _                       _                 _         _
  ___| |__   __ _  ___  ___  | | __ _ _ __ ___ | |__   __| | __ _
 / __| '_ \ / _` |/ _ \/ __| | |/ _` | '_ ` _ \| '_ \ / _` |/ _` |
| (__| | | | (_| | (_) \__ \ | | (_| | | | | | | |_) | (_| | (_| |
 \___|_| |_|\__,_|\___/|___/ |_|\__,_|_| |_| |_|_.__/ \__,_|\__,_|

Meet Chaos Lambda

Chaos Lambda is a serverless implementation of Netflix's Chaos Monkey.

It will wreak havoc* on your AWS infrastructure to help you build systems that are lean, mean, and resilient to failure.

* - in an extremely controlled manner - Chaos Lambda is disabled by default

About

Chaos 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* with the operation of your EC2 instances and ECS tasks. It is inspired by Netflix's 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.

Installation

You need Node.js to use Chaos Lambda (we will rewrite the CLI in Golang ats some point):

# npm comes bundled with Node.js
npm install -g chaos-lambda

Setting Up

AWS Configuration

An IAM user and a role for the lambda need to be set up first.

IAM User

Must be set up and credentials set up in ~/.aws/credentials

Lambda Role

Required policies:

  • AmazonEC2FullAccess

Setting up Chaos Lambda

To create the AWS Lambda function run:

chaos-lambda deploy -r $lambda-role-arn

This will create a state file (chaos_lambda_config.json) which is needed for subsequent re-deploys, and deploy Chaos Lambda to AWS. It will be configured to run once an hour, but it won't do anything every time it runs.

To configure termination rules, run deploy with a Chaosfile:

chaos-lambda deploy -c Chaosfile.json

Chaosfile.json

Example Chaosfile.json:

{
  "interval": "60",
  "enableForASGs": [
  ],
  "disableForASGs": [
  ]
}

Options:

  • interval (in minutes) - how frequently Chaos Lambda should run. Minimum value is 5. Default value is 60.
  • enableForASGs - whitelist of names of ASGs to pick an instance from. Instances in other ASGs will be left alone. Empty list ([]) means Chaos Lambda won't do anything.
  • disableForASGs - names of ASGs that should not be touched; instances in any other ASG are eligible for termination.

If both enableForASGs and disableForASGs are specified, then only enableForASGs rules are applied.

Enable/Disable/Status: Once deployed you can enable and disable Chaos Lambda without redeploying.

  • chaos-lambda disable - Will disable Chaos Lambda
  • chaos-lambda enable - Will enable Chaos Lambda
  • chaos-lambda status - Will display current status

Chaos Lambda vs Chaos Monkey

Chaos Lambda is inspired by Netflix’s Chaos Monkey. Curious about the differences? Here’s a handy summary:

Lambda Monkey
Serverless (runs on AWS Lambda) - no maintenance Needs EC2 instances to run on
Extremely easy to deploy Needs quite a bit of setup and config (»»»)
Small codebase, easy to understand and extend (<400 SLOC) Large codebase (thousands of SLOC)
Written in JS Written in Go
New on the scene Mature project
Small feature set Many features
Open source under MPL 2.0 / MIT Open source under APL 2.0
Developed by Shoreditch Ops Developed by Netflix

Why Use Chaos Lambda?

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?

(source: Chaos Monkey wiki)

Further reading: Principles Of Chaos Engineering

Current Limitations

Supported AWS Regions

Chaos Lambda will only work in these regions (due to a limitation with AWS Lambda Schedules):

  • US East (Northern Virginia)
  • US West (Oregon)
  • Europe (Ireland)
  • Asia Pacific (Tokyo)

Features

Right 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).

Bonus Points

Want to go further in your pursuit of indestructible systems? Combine Chaos Lambda with stress testing with Artillery.io to ship systems that just keep going.

Support

File an issue or drop us a line on [email protected].

Contributing

Please see the Contributor's Guide

License

MPL 2.0 - see LICENSE.txt for details.

The 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.

Contributors


A project by Shoreditch Ops, creators of artillery.io ⚡️ - simple & powerful load-testing framework.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].