Personal Proxy Server with Terraform on Amazon AWS

Amazon AWS with Terraform

In this blog post we will be looking at what Infrastructure as Code (IaC) is and how it can be used in a practical exercise: spinning up a proxy server on Amazon AWS with Terraform.

You might want to use a proxy for various reasons. For instance, I currently live in South America and some US companies block traffic or content for me. For example, LendingTree gives me the 1020 error (probably because they don’t consider me a potential customer) or Netflix hides certain movies and shows (probably because of license agreements). A proxy with a US IP address will help.

Infrastructure as Code

The idea behind Infrastructure as Code is that you write code to define, deploy, update and destroy your infrastructure. You can manage pretty much everything in code, including servers, databases, networks, application configuration, etc. The benefits are pretty obvious:

  • Faster time to production/market. When your infrastructure is described in code its management becomes easier.
  • Consistency. You will be eliminating manual processes.
  • Code as Documentation. Your infrastructure is represented in source files allowing anyone in the organization to understand how things work.
  • Change Management. Version control systems such as git keeps track of every modification to the code.
  • Reusability. You can package your infrastructure in reusable modules.
Read More

Go vs Crystal Performance

Go vs Crystal

You can join the discussion on HackerNews here.

It’s a follow up post to the previous Ruby vs Crystal Performance.

I guess this time it will be a fair performance comparison as both languages are compiled and statically typed.

We will perform a couple of tests:

  • Finding a number in the Fibonacci sequence as in the previous post
  • Running an HTTP server locally and performing benchmarks with wrk

Language versions installed my machine are:

  • go version go1.14.3 darwin/amd64
  • Crystal 0.34.0 (2020-04-07)

I’m curious to find out how Go and Crystal perform in comparison to each other.

Read More

Top Command Line Tools for Development and Fun

Top Command Line Tools

As a software developer I love working in the terminal where I do most of my work.

iTerm2, zsh, vim, tmux became my favorite tools but there are many others I use pretty much on a daily basis.

Let’s take a look at some of them.

Homebrew

This one you probably already know. Homebrew is a fantastic package manager for macOS and Linux with an active community of developers on Github.

You can install nearly any software using Homebrew. Every command-line tool described in this blog post below can be installed as easy as running

brew install <tool name>

Homebrew also allows you to install Desktop applications:

brew cask install firefox

To search for particular software run:

brew search postgres
Read More

Static Blog with Jekyll and Amazon Amplify

Jekyll On Amazon Amplify

AWS Amplify is a development platform for building secure, scalable mobile and web applications. Amplify covers the complete application development workflow from version control, code testing, to production deployment, and it easily scales with your business from thousands of users to tens of millions.

What is a typical workflow for deploying a static website to Amazon AWS? You create a bucket in S3, set up Route 53 and Cloudfront. If you want the site to be built and deployed on every commit you might want to add CodePipeline or a CI/CD tool of your choice such as Travis CI or Circle CI.

But with Amplify you can simplify and automate the whole process and deploy your site with just a few commands.

Read More

Domain Registration with Amazon Route 53 using AWS CLI

Amazon Route53

Amazon Route 53 provides highly available and scalable Domain Name System (DNS), domain name registration, and health-checking web services. You can register a domain name in different TLDs such as .com or .net. There are two ways of doing so: using the web interface or command line. I’m going to use the latter in this blog post.

To follow along you must have the AWS Command Line Interface (CLI) tool installed on your machine. If you don’t, here is a step by step guide from Amazon.

AWS Route 53 uses the us-east-1 endpoint. If you have a different region specified with aws configure (see in ~./aws/config) then it has to be updated to us-east-1 or you can specify the endpoint explicitly in every command.

Read More