update-route53
Updates route53 for a name and IP address. This was designed to allow a machine with a floating IP address to self-update its hostname.
To build
python3 -m venv venv
source venv/bin/activate
pip install wheel setuptools -U
python setup.py sdist bdist_wheel
to install once built
deactivate
sudo pip3 install dist/update_route53-0.0.1-py3-none-any.whl
To install in crontab
sudo crontab -e
## I place my env variables above the descriptive comments in the crontab
AWS_ACCESS_KEY_ID=AKIA**********
AWS_SECRET_ACCESS_KEY=********************
DNSNAME=subdomain.mydomain.com
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
18 * * * * /usr/local/bin/update-route53 ${DNSNAME} >>/var/log/update-route53.log 2>>/var/log/update-route53.error
The above runs 18 minutes past the hour. Consider picking a random number between 0-59. My old boss preferred prime number intervals between all services. This makes your job easier if your system ever displays periodic instability. If your periodic tasks all start on the hour, isolating the cause of problems is slightly harder. In this case, I'm just thinking of the poor guy running the IP echo service this code is hitting. Spread that load out.
To test
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python -m unittest
AWS setup
I have included an example IAM policy in conf/aws/route53-updater-policy.json.
I suggest creating a user that has no permissions other than this policy,
and using those permissions with the script/service. Note, do NOT ever install a
policy you haven't audited yourself. Please take a look at it and look up the
associated permissions.
Metadata
Release files for update-route53 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| update-route53-0.0.1.tar.gz | 4.2 kB | Without provenance | Details for update-route53-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| update_route53-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for update_route53-0.0.1-py3-none-any.whl |
Total release size: 9.7 kB
Release files / update-route53-0.0.1.tar.gz
| Download URL | update-route53-0.0.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
605aefc0da58c1e1ca64132665d535939e20400474071746b6bb7c85306ce1d5
|
|
BLAKE2b-256 checksum How to use checksums |
270539cf3010bf123a1cf7ed4c92917d8ba8e06253af00d691f1e70a2d6433e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
|
Release files / update_route53-0.0.1-py3-none-any.whl
| Download URL | update_route53-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7482d99ffa8e8ac4fbbc7354a8757ab0b73cb80c2d154f12d69b9bce0a0853e2
|
|
BLAKE2b-256 checksum How to use checksums |
c20074c6ff3d2e5112eb15b452ba98c939d20c1997140a3140790ca4bbf2c0b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
|
Security for update-route53 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.