aws

How to build python code bundles for AWS Lambda quickly and easily

6 minute read Published: 2016-07-21

AWS Lambda is conceptually really cool but as soon as your code creeps beyond a single python file that uses botocore things start to get messy and cumbersome. It's tempting to add an entirely new tool to your workflow, but theres really no need. The approach I use is good old make.

Raciness in Amazon RDS backups

2 minute read Published: 2015-05-24

Want to know what the earliest point in time restore you can do is? It's not straightforward.

Deleting an Amazon ELB properly

2 minute read Published: 2015-04-12

Recently I automated deletion of an Elastic Load Balancer and the Subnet it was in. Fairly straightforward stuff. One slight problem is that an ELB doesn't have states. When you delete one it disappears immediately. But in the background it is still there. When you try to delete the subnet it was in you get a dependency error. After a couple of minutes it does work.

The same is true if you try to delete a security group that the ELB was using.

What's going on?

Dealing with EBS volume hotplug

2 minute read Published: 2015-04-01

EBS volumes are attached to EC2 instances that are running. So if you have a solr instance that starts on boot and needs to use that EBS volume you have a problem. How do you make solr wait for that EBS volume to be ready? How do you format it? How do you make all this idempotent.

Monitoring NTP with CloudWatch

2 minute read Published: 2015-01-03

I've seen celery drop tasks on the floor because the queuers clock is to far ahead of the workers. I've seen boto fail to update Route53 because a clock was wrong. Time is super important. Here is a little script to look at the output of ntpq -pn and try and explain whats going on.