This module shows how to use the termination watcher stand-alone.
Ensure you have the lambda for the termination built locally. By default the one in the lambdas folder will be used.
Build lambda's (requires node and yarn).
cd lambdas
yarn install && yarn distNext switch to this example directory.
terraform init
terraform applyOnce a Spot instance is terminated a log line and metric will be updated. Spot instance termination can be simulated using the Amazon Fault Injection Service (FIS). In the web console you can simply initiate a spot instance failure by navigate in the EC2 console to Spot Requests and choose the action initiate a spot termination event.
| Name | Version |
|---|---|
| terraform | >= 1 |
No providers.
| Name | Source | Version |
|---|---|---|
| spot_termination_watchter | ../../modules/termination-watcher | n/a |
No resources.
No inputs.
No outputs.