Setup Cloudflare for S3 Bucket

One way to improve website performance is to use CDN to distribute the static contents of your site. S3 is a common place to host such type contents. In this post, I will show you how to publish a S3 bucket using Cloudflare. In fact, the screen shots used in this blogpost is published exactly through this manner. Setup S3 Bucket Permissions This is an optional step which adds a S3 bucket policy to your bucket.
Read full post

Setup Cloudflare for AWS API Gateway

In this post I will show how to setup Cloudflare for a Serverless app built with AWS API Gateway and Lambda. For demonstration, I use a simple web app I built (rona.tomking.xyz). The app is hosted in AWS Sydney region. It displays daily Victoria COVID case and that’s it. To use Cloudflare, I have signed up a free Cloudflare account. The first site can be added for free with following features.
Read full post

Automate EC2 Instance Security Group Rules Update

Ever come into the situation where you need to whitelist a long list of IPs for a EC2 instance? It can be painful to add them manually one by one. On top of that, what if these IPs change on a regular basis? You are in luck! I will show you how to update Security Group rules automatically using Python🐍. Here’s my use case. I got an EC2 instance takes syslog feeds from VMWare’s WorkspaceOne.
Read full post

Setup Splunk Universal Forwarder with TLS

One of the best practice to setup Splunk Universal Forwarder (UF) is to encrypt incoming log traffic with TLS. This is especially important if your intake is from an external source on Internet, e.g from a SaaS solution. In this blog I will demostrate the steps to get this setup. First, we will create a public A DNS record for the UF. This is because our UF will be receiving logs from Internet.
Read full post

Use PowerShell to delete SPAM Blogger comments

I haven’t been very diligent on maintaining this blog. There has been quite a few SPAM comments accumulated on my posts. I am going to turn on moderation to block those. But I need a way to clean all those existing SPAM comments. So over the weekend, I wrote this PowerShell script to do just that. In the end, it will probably take less time if I just manually all the cleanup manually.
Read full post