This is a simple Selenium script to close an AWS account via the web console. It can also reset the account password, in case it is not known.
Warning: This script does not ask for further confirmation - it is expressly for those that want to skip all those manual steps. So please TAKE CARE and uninstall it once you don’t need it anymore!
Why
I am creating individual AWS accounts for my students at HM (https://hm.edu) Closing them at the end of term is boring and annoying, so I automated it.
Also see https://xkcd.com/1319/
Since the AWS Organizations now has the Close Account feature, it seems on first glance that this script is superfluous. However, closing accounts has some very tight quota (10% of the active accounts in the organization), so this script unfortunately remains relevant.
Last tested 28th of January 2025.
Requirements / Installation
This program requires an installed selenium driver to run. It was tested using the selenium driver for firefox 0.30.0 installed from https://github.com/mozilla/geckodriver/releases . The selenum driver can be selected with a command line flag.
To install aws-close-account to a virtualenv, do:
pip install aws-close-account
Usage
The Browser window waits for you to input any captchas and MFA Keys.
Quick Start:
aws-close-account my-account@example.com
Release files for aws-close-account 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aws_close_account-0.3.4.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aws_close_account-0.3.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 10.6 kB
Release files / aws_close_account-0.3.4.tar.gz
| Download URL | aws_close_account-0.3.4.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef69cab86db79ad869cefa66aaa270b8fd11bfc64ecc32ce6e93a0ce74827b9c
|
|
BLAKE2b-256 checksum How to use checksums |
f0d56c05f862c4b47b0f1ebc25c7a95063c3f97d9251455ba4206a489235a33b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / aws_close_account-0.3.4-py2.py3-none-any.whl
| Download URL | aws_close_account-0.3.4-py2.py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
24783c418bf6fcba45c5cb471d40b4bb068572797977461c70e299b53bca0eb0
|
|
BLAKE2b-256 checksum How to use checksums |
277cba44107ea978affefcd61b8354960527089689193445cd6dc3eb7222608a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|