Start or Restart a Forever process with ansible

Have a few processes that we run with Forever that I have been working on automating.   Needed to be able to start them if they are not running and restart them if they are.  The restart was a bit tricky.  Usually you can just restart the process name, but since some...

Tag your AWS cloudwatch log groups

Been on a new job for a few months now. One of the first things I noticed is we were getting a huge bill for AmazonCloudWatch PutLogEvents and we weren’t quite sure what was the primary culprit. So, ended up creating a small tool to tag all of our log groups and...

AWS EKS kubelet error updating node status

Recently started setting up an AWS EKS cluster. Everything working fine, but decided to look at the kubelet logs on one of the nodes and saw a bunch of errors like these: Dec 01 09:42:52 ip-172-26-0-213.ec2.internal kubelet[4226]: E1009 09:42:52.335445 4226...

mysqldump with where clause in a bash script

So, this has been an interesting one to work out with a bunch of trial and error. The mysqldump command has a very useful –where option that allows you to only dump out specific rows that match your where clause. Say you want to mysqldump all rows where...

Auto Sync AWS AMIs to another region with Lambda

If you’re using AWS for a critical application then you probably have a disaster recovery region setup.   If it’s automated well, then everything you need to spin up the disaster recovery region should be quick and easy.   One thing that can be a bit of a...