Subscribe
Fenix

Technologies, Hacks and Games...

Latest posts

AWS

Daily EBS snapshots with Data Lifecycle Manager in Terraform

Data Lifecycle Manager takes a snapshot of every EBS volume with a given tag once a day and deletes the old ones for you. Here is the Terraform for the policy and its IAM role, how I tag the root volume, and why I still keep a separate database backup.

5 min read

Calculating Zerodha intraday and delivery charges in Go

A backtest without trading costs will flatter almost any intraday strategy. Here is the small Go function I use to estimate Zerodha brokerage, STT, exchange fees, stamp duty, GST and DP charges for intraday and delivery trades.

5 min read
AWS

Nightly MySQL and content backups to S3 with a systemd timer

My old Ghost server ran for years with no backups at all. On the new one, a small bash script dumps MySQL, tars the content folder and uploads both to S3 every night, driven by a systemd timer. Here is the script, the units, the bucket and the gotchas I hit.

6 min read
AWS

Deriving an SES SMTP password from an IAM access key in Python

The SES SMTP password is not your IAM secret key. It is a short HMAC chain over the secret, the region and a fixed message. Here is the Python for it and the script I use to rotate the key and write it to my Ghost host without printing it.

5 min read