I created a small helper script that encapsulates API calls for simple snapshot management. This can be used in cron jobs to trigger snapshot creation and cleanup.

Keeping manually created snapshots is the least backup security one should have on top of automatically created snapshots as the latter type is deleted together with the instance. In case of unintentional deletion of an RDS instance automated snapshots are of no help to restore the data.

RDS-Snapshot on GitHub

Trying to wet my feet with micro-controllers I just started to play around with the ESP8266 which I find much more sexy than any Arduino that I’ve seen so far. Most probably because of the visual experience – I’m a visual guy when it comes to tech after all. ;-)

I’m also trying to start doing write-ups of my progress. I always wanted to do that but newer really got myself to actually do it. So here it is: My first post about my adventures in the world of micro-controllers.

The micro-controller I chose for prototyping is a MOD-WIFI-ESP8266-DEV from Olimex. First of all it is breadboard friendly. Secondly it exposes all of the chip’s pins and has 2MiB of flash memory which should be enough to house even more sophisticated projects. (Which I can’t judge yet because of lack of experience but I go with the rule of thumb that more usually is better.)

ESP8266

Continue reading

If you like to work with AWS on the CLI you can easily open the AWS by using a specially crafted link that logs you in using the credentials from your shell environment. To assemble the link you can use this little Python script:

Wanna know whether your ELB has at least one instance in service or not?

Just add a CloudWatch Alarm to your ELB and have it send status changes to SNS (from where you can route it to whatever notification system you’re using).

Due to popular demand (read: colleagues asking) I put this little script online which I originally found when googling the web for a way to reduce the count of commits that contain syntax errors in my Puppet recipes.

It will not find all errors (e.g. cyclic or broken requires) but it reduces the risk of overlooking copy&paste errors or typos a lot.

Update: I found the original source on GitHub

Have you ever tried working with a huge monolith of SVN repo that has lived for ages and seen a bazillion commits in its time? Then you might have experienced unpleasant times waiting for some process to chew through all that nasty pile of code.

Here is how I handle these behemoths – just checkout the subpath I need leaving all the history behind:

This code snippet will fetch the latest revision the subpath was edited and do a sparse shallow checkout using git as client.

The following template will create a CloudFormation distribution with an AliasRecord pointing at it. It assumes your origin is already up and running. You don’t want to have the origin and CloudFront in the same stack anyways.

The best way to ensure some script/command running on shutdown is to use upstart which is the default init in CentOS6:

In order to be able to properly diff and read your CloudFormation templates you want them to be in a harmonised shape:

  1. Validity check and indentation
  2. Apply some regex search/replace transformations to improve human readability

This can be done on the shell: nice-cf.py < template.json > beautified.json

Or in vim using a keybinding:

This is the nice-cf.py Python script used to apply the transformations to the template: