{"id":15710415,"url":"https://github.com/aws/amazon-ec2-spot-interrupter","last_synced_at":"2026-01-16T07:29:14.228Z","repository":{"id":37854225,"uuid":"469878284","full_name":"aws/amazon-ec2-spot-interrupter","owner":"aws","description":"The ec2-spot-interrupter is a simple CLI tool that triggers Amazon EC2 Spot Interruption Notifications and Rebalance Recommendations.","archived":false,"fork":false,"pushed_at":"2026-01-12T21:40:15.000Z","size":112,"stargazers_count":103,"open_issues_count":4,"forks_count":13,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-12T22:53:42.851Z","etag":null,"topics":["chaos","ec2","fault-injection","spot"],"latest_commit_sha":null,"homepage":"","language":"Go","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/aws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-14T19:34:06.000Z","updated_at":"2026-01-12T21:37:10.000Z","dependencies_parsed_at":"2024-06-18T23:00:51.359Z","dependency_job_id":"a39eab65-8007-4f9c-a8d0-d39b30516535","html_url":"https://github.com/aws/amazon-ec2-spot-interrupter","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":"amazon-archives/__template_Apache-2.0","purl":"pkg:github/aws/amazon-ec2-spot-interrupter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-ec2-spot-interrupter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-ec2-spot-interrupter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-ec2-spot-interrupter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-ec2-spot-interrupter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/amazon-ec2-spot-interrupter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-ec2-spot-interrupter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: 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":["chaos","ec2","fault-injection","spot"],"created_at":"2024-10-03T21:07:20.372Z","updated_at":"2026-01-16T07:29:14.160Z","avatar_url":"https://github.com/aws.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Amazon EC2 Spot Interrupter\n\nThe `ec2-spot-interrupter` is a simple CLI tool that triggers Amazon EC2 Spot Interruption Notifications and Rebalance Recommendations.\n\n[![Action Status](https://github.com/aws/amazon-ec2-spot-interrupter/actions/workflows/release.yaml/badge.svg)](https://github.com/aws/amazon-ec2-spot-interrupter/actions/workflows/release.yaml)\n\n## Installation\n\n```bash\nbrew tap aws/tap\nbrew install ec2-spot-interrupter\n```\n\n## About\n\n[Amazon EC2 Spot](https://aws.amazon.com/ec2/spot/) Instances let you run flexible, fault-tolerant, or stateless applications in the AWS Cloud at up to a 90% discount from On-Demand prices. \nSpot instances are regular EC2 capacity that can be reclaimed by AWS with a 2-minute notification called the [Interruption Notification](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html).\nApplications that are able to gracefully handle this notification and respond by check pointing or draining work can leverage Spot for deeply discounted compute resources! In addition to Interruption Notifications, [Rebalance Recommendation Events](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/rebalance-recommendations.html) are sent to spot instances that are at higher risk of being interrupted. Handling Rebalance Recommendations can potentially give your application even more time to gracefully shutdown than the 2 minutes an Interruption Notification would give you.\n\nIt can be challenging to test your application's handling of Spot Interruption Notifications and Rebalance Recommendations. The [AWS Fault Injection Simulator](https://aws.amazon.com/fis/) (FIS) supports sending real Spot Interruptions and Rebalance Recommendations to your spot instances so that you can test how your application responds. However, since FIS is a general purpose fault injection simulation service, it can be cumbersome to setup the required fault injection experiment templates to execute experiments for Spot. The `ec2-spot-interrupter` CLI tool streamlines this process as it wraps FIS and allows you to simply pass a list of instance IDs which `ec2-spot-interrupter` will use to craft the required experiment templates and then execute those experiments.\n\nFor details on how to use the AWS Fault Injection Simulator directly to trigger Spot Interruption Notifications, checkout this [blog post](https://aws.amazon.com/blogs/compute/implementing-interruption-tolerance-in-amazon-ec2-spot-with-aws-fault-injection-simulator/).\n\nIf you are looking for a tool to test Spot Interruption Notifications and Rebalance Recommendations locally on your laptop (not EC2), then checkout the [EC2 Metadata Mock](https://github.com/aws/amazon-ec2-metadata-mock).\n\n## Usage\n\n```\n$ ec2-spot-interrupter -h\nec2-spot-interrupter is a simple CLI tool that triggers Amazon EC2 Spot Instance Interruption Notifications and Rebalance Recommendations.\n\nUsage:\n  ec2-spot-interrupter [flags]\n\nFlags:\n  -c, --clean                  clean up the underlying simulations (default true)\n  -d, --delay duration         duration until the interruption notification is sent (default 15s)\n  -h, --help                   help for ec2-spot-interrupter\n  -i, --instance-ids strings   instance IDs to interrupt\n      --interactive            interactive TUI\n  -p, --profile string         the AWS Profile\n  -r, --region string          the AWS Region\n  -v, --version                the version\n```\n\nTry the interactive TUI mode:\n\n```bash\n$ ec2-spot-interrupter --interactive\n```\n\nOr use the regular CLI options:\n\n```\n$ ec2-spot-interrupter --instance-ids i-0208a716009d70b36\n===================================================================\n📖 Experiment Summary:\n        ID: EXPBCcSv1NvRNTek58\n  Role ARN: arn:aws:iam::1234567890:role/aws-fis-itn\n    Action: aws:ec2:send-spot-instance-interruptions\n   Targets:\n    - i-0208a716009d70b36\n===================================================================\n2022-05-18T11:39:45: ✅ Rebalance Recommendation sent\n2022-05-18T11:39:45: ⏳ Interruption will be sent in 15 seconds\n2022-05-18T11:40:05: ✅ Spot 2-minute Interruption Notification sent\n2022-05-18T11:42:05: ✅ Spot Instance Shutdown sent\n```\n\n## Communication\n\nIf you've run into a bug or have a new feature request, please open an [issue](https://github.com/aws/amazon-ec2-spot-interrupter/issues/new).\n\nCheck out the open source [Amazon EC2 Spot Instances Integrations Roadmap](https://github.com/aws/ec2-spot-instances-integrations-roadmap) to see what we're working on and give us feedback! \n\n##  Contributing\n\nContributions are welcome! Please read our [guidelines](https://github.com/aws/amazon-ec2-spot-interrupter/blob/main/CONTRIBUTING.md) and our [Code of Conduct](https://github.com/aws/amazon-ec2-spot-interrupter/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThis project is licensed under the [Apache-2.0](LICENSE) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Famazon-ec2-spot-interrupter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Famazon-ec2-spot-interrupter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Famazon-ec2-spot-interrupter/lists"}