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 …
Tag Archives: DevOps
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, …
Continue reading “How to copy an image from Docker Hub to your Docker Registry”
Create password protected Zip file on Mac
To create a password protected Zip file from the command line on a Mac Create a folder for the source files, Move the source files into the folder, Open a terminal in the parent folder, Execute the command: Zip will ask for the password.
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 …
Continue reading “How to change a Git commit message after push”
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 …
Continue reading “Cannot connect to an AWS EC2 Windows instance with WINRM”
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 …
Failed to install cookbooks from lockfile
During Chef cookbook testing with Test Kitchen only one “converge” action can update the Policyfile.lock.json at a time. If you test multiple recipes in the same cookbook, wait for the “Updating policy lock using /usr/local/bin/chef-cli update” message before starting the next converge otherwise we get the error message: STDOUT: Installing cookbooks from lockSTDERR: Error: Failed …
Continue reading “Failed to install cookbooks from lockfile”
Move AWS EC2 instance to another subnet or availability zone
When we move an EC2 instance from one subnet to another or to another availability zone the EC2 Metadata Service stops working on the instance. We get the error message: Unable to get IAM security credentials from EC2 Instance Metadata Service. To enable the EC2 Metadata Service again, we need to update the routing configuration …
Continue reading “Move AWS EC2 instance to another subnet or availability zone”
Cannot modify the instance class because there are no instances of the requested class available in the current instance’s availability zone
When you change the instance type of an AWS RDS instance, the availability zone of the instance has to have available capacity of the selected type. Some older availability zones (us-east-1a) have more old instance types than new types available. If the instance type you selected is not available in the current zone of the …
Exit from Bash script on error without closing the terminal window
To terminate the script in case of an error, we can use the “-e” option. When a bash script is “sourced”, called from an alias with a leading dot like my-alias=’. /my-script to execute in the same process, or a function is executed from a terminal window and the script exits on an error, it …
Continue reading “Exit from Bash script on error without closing the terminal window”