Provisioning ACM Certificates on AWS with Terraform

AWS Certificate Manager (ACM) is a service from AWS which provide the free on-demand TLS certificate. It’s similar to the Let’s Encrypt which provide the free cert for you, but the difference is that Amazon controls the Certificate Authority (Amazon Trust Services, LLC) behind the certificates, as well as the…

Installing Nginx Pagespeed Module

PageSpeed is a technology from Google, designed to help a website’s performance optimizations. Faster websites offer a better user experience, boost rankings in Google and increase conversion rates. Pagespeed lets you measure and (automatically) optimize your web pages and comply with web performance best practices. Speed up your web site…

Accessing S3 using VPC endpoints

VPC endpoint enables creation of private connection between VPC to the supported AWS services. As an example use case, we want to accessing S3 bucket from the EC2, we may need to access it over the public Internet. By travel out from our VPC to the public internet and than…

Accessing private EC2 using the bastion host/jump host

This post is continuous post from the previous post – Deploying EC2 with Private and Public Subnet Using Terraform in AWS. Bastion hosts are instances that sit within your public subnet and are typically accessed using the SSH or RDP. The primary role for the bastion host is that it’s…

Deploying EC2 with Private and Public Subnet Using Terraform in AWS

Terraform always the simple and easy way for us to deploying our infrastructure over the cloud, in this post, I will deploying 2 EC2 in the public and private subnet and try to access into the private EC2 using the public bastion host. A bastion host is a special-purpose computer on a…

How to remove server header in Nginx

Nginx is one of the world most famous web server as per market share, security always a main concert when come to the web server and web application. By default, Nginx will always send the information in server HTTP header as well as on the error page. It’s always the…

How to automate IP2Location BIN database download in Linux

IP2Location is one of the top IP database provider in the world as their database is being updated every 1st day of the month, in order to make use the latest database to keep data up to date, we may need to download, extract and import the database to our…

AWS Cross-Account Assume Role

Recently I need to manage more than 1 AWS account which it’s not under the Organization unit. In order to browse around the 2 account I may need to have 2 set of credential and keep login and logout (unless i open 2 difference browser or using incognito mode.) Found…

Passing client User-Agent from CloudFront to origin

These few days I try to setup the CloudFront for my website and everything working fine as per expected except the real user agent is not passing from the CloudFront to my origin server, instead it’s replace the user-agent to “Amazon CloudFront” when I check from my Nginx Log. After…

Updating AWS CloudFront IP to Nginx

CloudFront become a very common CDN/Reverse proxy nowadays because of their high availability and easy to use. So if you place a CloudFront as a proxy server in front of your Nginx web server, than the Nginx web server not able to get the real customer IP address. Same thing…