A Swiss Geek previously in Singapore, now in Portugal


My First Lambda Container

AWS announced the support for running containers inside Lambda. Since I had a little side project that would benefit from it, I dived in. I passed through the 4 stages of a typical Re:Invent announcement: excitement, disappointment, anger and resignation.

AWS SES Receive: It's Worse Than You Thought

No IMAP client. No forwarding capabilities. And worst of all, a useless SPAM detection algorithm.

Serverless E-Mail forwarder with AWS SES

If you don’t need (or don’t want to pay for) a real E-Mail solution for your domain, but just need to communicate nice looking addresses and have them forwarded to your real, fully fledged E-Mail host. Then this solution is for you.

Resize Images on the Fly

Clients know the best what sizes an image should be (screen size, dpr, …). Don’t pre-generate useless sizes and let them ask for the dimensions that suits them best.

Cors at the Edge

With the raise of API driven apps, CORS is becoming an unavoidable subject. By adding a CDN, your CORS rules become a burden on caching.

Creating a Serverless GeoIP API

Why build a GeoIP API when you can buy it directly from Maxmind or use their GeoIP Databases? Using the downloadable database works well when used on an instance. When you need it inside Lambda or Glue, it becomes difficult to keep it up-to-date. It becomes easier to use an external HTTP-API. Hosting it yourself reduces the response time by having it nearer to your apps and you can extend your service by combining multiples sources.

Read More…

MySQL: deleting a huge amount of rows

One of our MySQL tables has started to grow out of control with more than 1 billion rows (that’s 109). The table is a typical “Rails Active-Record table” with id as primary key (auto increment), created_at, updated_at and a few columns for the business data. The table has multiple indexes on various columns, some of them having a cardinality in the millions. created_at and status don’t have an index. The majority of results from Google, involved peoples with millions of rows and deleting them in batches of 1000.

Read More…

From Wordpress to Hugo

As mentioned in Going Static, I migrated my Wordpress blogs to a static site build with Hugo. Most articles on the subject convinced me that it would be easy. The truth is, it isn’t that straight forward. Content With help of a Wordpress plugin, exporting your posts and content is easy. The plugin adds the necessary front matter in Yaml format. But you still need to go through all your posts to update manually all image references.

Read More…

The Corporate Disease

The tech B2B world has changed in the last decade. It used to be sales talks to sales and agree on a product and price. Then give the job to the tech team. In a tech-startup, Geeks are King. They decide what’s useful or usable. If you can’t convince the geek, you won’t get the business. At Spuul, I am on geek-side of the chain, and too often I had to experience the lack of market knowledge from some corporations.

Read More…

AWS, VPN and Public IP

Once you start to integrate services with Telcos, ISPs or other major Network players who are not “Cloud Aware”, you will need to go the VPN way using IPSec. Their setups have used all the available IP’s defined by RFC 1918 (or just don’t want to use them). They will want to use Public IP’s behind your VPN. The problem is that your EC2 instances are running behind a 1:1 NAT with only a private IP’s attached to them. To add to the complexity, your instances are part of an auto-scaling group, with IP’s all over Luckily the way to solve this problem is actually quite easy, we just need to add some iptables rules and a proxy.

Read More…