A Swiss Geek previously in Singapore, now in Portugal

Static

Diving into Cloudfront

Cloudfront can be simply defined as a CDN (Content Delivery Network), caching your static assets in a datacenter nearer to your viewers. But Cloudfront is a lot more complex and versatile than this simple definition. Cloudfront is a “pull” CDN, which means that you don’t push your content to the CDN. The content is pulled into the CDN Edge from the origin at the first request of any piece of content.

Read More…

Use IAM Identity Center (AWS SSO) to protect your Cloudfront served application

You built a new web application, you are serving it using Cloudfront, but you want that only members from your organization can view the pre-release version. You want to add a password protection using the already existing IAM Identity Center (Successor to AWS Single Sign-On) to grant access to your organization.

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.

converting dynamic sites to static hosting

Why? Security and speed are the two main factors that made me migrate dynamic sites to static sites. I used to build some small sites without any framework using PHP to reuse common files (headers, footers, database connections) with some minimalistic administration pages to avoid to do vi over ssh to manage content. Security wasn’t a concern, Internet users where nice and respectful back then (or more probably I was young and naive).

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…

Going Static

I hosted my blog with Wordpress on my own VPS. The amount of attacks and successful hacks on this blogs is enormous. Wordpress just suffers from notoriety and therefore becomes an easy target. Maintaining Wordpress up-to-date and add some tricks to minimize the risks just didn’t become worth the pain anymore. On top of that, maintaining a VPS to run Apache, PHP and MySQL to serve a few never changing posts didn’t make sense anymore.

Read More…