A simple way for EC2 instances to stop/terminate themselves.
Project description
self-destruct is a simple Python library for stopping and terminating EC2 instances from within themselves, which is not officially supported by AWS. Usage is very simple:
from self_destruct import self_destruct
self_destruct()
The only customization option is the specification of a parameter terminate: bool = True which allows the user to specify whether they want to terminate the instance or merely stop it.
Note that in order for this function to be successful, the EC2 instance must have the following permissions:
"ec2:DescribeInstances" "ec2:StopInstances" "ec2:TerminateInstances"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file self_destruct-0.0.1.tar.gz.
File metadata
- Download URL: self_destruct-0.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91479cda46630a7d64a30ec19b318356e52350ff1bae4bb994f029ac2391d9b2
|
|
| MD5 |
b138789f9bbed99d0d9454fe9de606dc
|
|
| BLAKE2b-256 |
4479593c05736ef95296deb62ef317635f4d7bcecaea8d0b1bb84d3489077924
|
File details
Details for the file self_destruct-0.0.1-py3-none-any.whl.
File metadata
- Download URL: self_destruct-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
408b7ba18fca58ea13483fdc906cbcebf5c297d03b7c8c0bf459a1839176c5a6
|
|
| MD5 |
c6da8e268656607fd765347ba1084436
|
|
| BLAKE2b-256 |
1f1ba2f8b136ac658089d20b9f525b6d8365ee1d87d85426e0d7da86b98b3385
|