Recent posts

Customize Go tests with Flag options

1 minute read

Often some tests of a Go package need to interact with another system. You can mock it but at a certain point, the tests should run against a real system located at a certain address, using a some credentials, and so on. The real system has some parameters that should not be hardcoded because they are ephemeral or because is not safe. To customize these p...

Debugging EC2 user_data script

1 minute read

AWS EC2 instances can be initialized easily at startup using a custom script in the user_data field. Our instances will be ready to use and have all tools installed. It is a great advantage when the initialization script is easy, because we don’t need to use separate tool like Ansible. However, user_data can be tricky because it is not so friendly to debu...

Kubernetes The Hard Way - Write Ansible inventory from template with Terraform

1 minute read

Once the instances are provisioned to AWS using a Terraform script, I need to configure them using Ansible. To tell Ansible the remote targets to configure, I wrote an inventory file that lists the IP addresses and the hostnames. Each time I created the AWS sandbox, the IP addresses changed and I needed to copy-paste them on the inventory file. Since this...

Inspecting HTTP Cache-Control

4 minute read

I was following the ACloudGuru tutorial to setup a web server with httpd on a EC2 instance and a AWS Cognito Identity Pool.