Host WordPress in AWS Lightsail

If you are just starting your WordPress blog, or you already have a site hosted somewhere AWS Lightsail provides a cost effective hosting solution. To create a WordPress site in AWS Lightsail Create a Lightsail instance Log into your AWS account Navigate to the Lightsail service Set the instance location bu clicking on the Change …

Migrate a Node.js application into a Docker container

To avoid repetition, for overview and language agnostic examples on application migration to containers see Migrate your application into a Docker container Update your application Exclude downloadable libraries Add a Node.js-specific .gitignore file to the root of the Git repository. This is an example of a basic file. Read configuration values from environment variables Node.js …

Migrate a Python application into a Docker container

To avoid repetition, for overview and language agnostic examples on application migration to containers see Migrate your application into a Docker container Update your application Exclude downloadable libraries Add a Python-specific .gitignore file to the root of the Git repository. Read configuration values from environment variables Python natively supports the reading of environment variables. The …

Migrate your application into a Docker container

Containers are the future (and some of us are already there). Container technology, spearheaded by Docker, is revolutionary by allowing developers to write applications once, and run them (almost) anywhere. Containers help developers to fully test a complete application including frontend, middle tier, and databases on their workstations, and expect the same result in the …

Error: invalid SQS queue name

When you create anAWS FIFO SQS queue with Terraform, you may get the error message: Error: invalid queue name The name of an AWS FIFO SQS queue has to end with .fifo ( my-queue.fifo ) The name of any AWS SQS queue cannot be longer than 80 characters, and can only contain letters, numbers, dashes …

How to copy an image from Docker Hub to your Docker Registry

Some images on Docker Hub require the acknowledgement of the terms and conditions. This prevents CI/CD pipelines and other automated build systems to pull the image with the error message: error building image: GET https://index.docker.io/v2/store/…   : UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:store/…  Type:repository]] To solve the problem, we can manually pull the image to our workstation, …

How to change a Git commit message after push

To change a Git commit message after the commit has been pushed Open a terminal in the repository folder Use the interactive rebase command to retrieve the specified number of recent commit messages The list of the recent commits appears in your default text editor Replace the word pick with reword in the lines you …

Cannot connect to an AWS EC2 Windows instance with WINRM

When we launch an AWS EC2 instance with Windows 2012, Windows 2016, Windows 2019, the “Administrator” local account is automatically created and added to the Administrators group. We can decrypt the Administrator password using the private key of the key pair we used to launch the server. On Windows servers WINRM access is necessary during …

An argument named “root_block_device” is not expected here. Did you mean to define a block of type “root_block_device”?

In the Terraform script to create an AWS EC2 instance, we can specify the volume sizes. Separate arguments describe the root and data volumes. This feature enables the script to create the volumes without specifying the connection attributes in another block. The Terraform documentation does not show the syntax, and the Terraform example at the …