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 time of writing this in GitHub is NOT correct at https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/blob/528613d4580f2c1266e87d8d24fc25bf5290fe2c/examples/complete/main.tf#L113

If the syntax is not correct get the error message:

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

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

The correct syntax is

resource "aws_instance" "default" {

  ami                         = "ami-0da7a37366e7ee5f0"
  instance_type               = "t3.medium"
...
  root_block_device {
      volume_type = "gp2"
      volume_size = 100
      tags = {
        Name = "my-root-block"
      }
    }

  ebs_block_device {
      device_name = "xvdf"
      delete_on_termination = true
      volume_type = "gp2"
      volume_size  = 500
    }
  ...
}

A Calibre e-könyv konvertáló program rossz formátumra konvertál

Ha megváltoztatjuk az Előnyben résszesített kimeneti formátumot, a Calibre program néha továbbra is az előző beállítás szerint konvertálja a könyveket.

Hogy felfrissítsük a beállítást

  • Kattintsunk a Beállítások gombra
  • Kattintsunk a Viselkedés gombra
  • Ellenőrizzük le, hogy a megfelelő kimeneti formátum van beállítva.
  • Az Alkalmaz gombbal térjünk vissza a Beállítások oldalra.
  • Kattintsunk az Üdvözlő varázsló elindítása gombra
  • A varázslóban fogadjunk el minden beállítást. Ez a folyamat fel fogja frissíteni a beállításokat és Calibre a beállított formátumra fogja automatikusan konvertálni a könyveket.

Libri elektronikus könyv olvasása az Amazon Kindle Paperwhite-on

Az Amazon Kindle Paperwhite a következő formátumokat támogatja:

  • MOBI könyv (.mobi)
  • Kindle könyv (.azw csak kábelen másolható, email-ben nem küldhető)
  • Microsoft Word (.doc, .docx)
  • HTML (.htm, .html)
  • Rich Text Format (.rtf)
  • Text (.txt)
  • JPEG (.jpeg, .jpg)
  • GIF (.gif)
  • PNG images (.png)
  • Bitmaps (.bmp)
  • PDF (.pdf)

A fileokat a következő módszerekkel küldhetjük a Kindle-re

Az Amazon Kindle Paperwhite konfigurálását és a küldő email cím engedélyezését az Amazon Kindle Paperwhite konfigurálása Libri elektronikus könyv olvasásához oldalon találjátok.

Elektronikus könyv letöltése a Libri weboldaláról

A Libri internetes oldalán MOBI és EPUB formátumban vásárolhatunk könyveket.

  • A Libri oldalán vásárold meg az elektronikus könyvet,
  • Töltsd le a könyvet MOBI és EPUB formátumban.

Töltsd fel az elektronikus könyvet az Amazon Kindle Paperwhite-re

  • Keressük meg a letöltött könyvet a Letöltések mappában
  • Ha a file neve nem elég érthető, nevezzük át a file-t hogy tartalamzza a szerző nevét és a könyv címét.
  • Vágjuk ki a file-t a Letöltések mappából és illesszü be a KINDLE\Könyvek mappába

Elektronikus könyv küldése az Amazon Kindle-re

Több módon küldhetjük a könyveket :

Rossz formátum

Ha a formátum nem megfelelő, kapunk egy angol nyelvű email-t az Amazontól “There was a problem with the document(s) you sent to Kindle” tárggyal.

A levél tartalma információt ad a hibával kapcsolatban. azw3 típusú könyveket email-ben nem tudunk küldeni a Kindle-re.

Dear Customer,
The following document(s), sent at 09:21 PM on Thu, Dec 02, 2021 GMT could not be delivered to the Kindle you specified:
Az igazi humoristak_ Cikkek a magyar nep humorarol – Kalman Mikszath.azw3

Amazon Kindle Paperwhite konfigurálása Libri elektronikus könyv olvasásához

A legegyszerűbb, ha a könyveket email-ben küldjük as Amazon Kindle Paperwhite-re. Így nem kell hozzákapcsolnunk a Kindle-t a számítógépünkhöz.

Jegyezzük fel a Kindle email címét

  • Jelentkezzünk be az amazon.com web site-ba.
  • Az Accounts & Lists menüben válasszuk ki a Content & Devices pontot.
  • A Devices fülön kattints a Kindle ikonra és válaszd ki a készüléket
  • A Device Summary ablakban találjuk az Amazon Kindle Paperwhite email címét

Könyvtár kezelő és konvertáló program

Töltsük le és telepítsük a Calibre könyvtár kezelő és konvertáló programot a https://calibre-ebook.com/download címről.

A teleítés során a program felkínálja, hogy készítsünk egy Hotmail email címet. Ezt a Calibre fogja használni, hogy a könyveket email csatolmányként elküldje a Kindle címére.

Állítsuk be a könyv formátumot, amelyet a Kindle támogat.

Erre a formátumra fogja Calibre konvertálni a letöltött könyveket.

  • Kattintsunk a Beállítások gombra
  • Kattintsunk a Viselkedés ikonra
  • Állítsuk be MOBI-t az Előnyben részesített kimeneti formátumra, mozgassuk a Kindle által támogatott formátumokat az Előnyben részesített forrás formátumok sorrendjének a tetjére, és kattintsunk az Alkalmaz gombra.

Engedélyezzük az email fogadását

Biztonsági okokból az Amazon Kindle Paperwhite csak azokról az email címekről fogad el könyvet, amelyeket engedélyezünk az amazon.com oldalán.

  • Jelentkezzünk be az amazon.com web site-ba.
  • Az Accounts & Lists menüben válasszuk ki a Content & Devices pontot.
  • A Preferences fülön a Personal Document Settings szekcióban a Approved Personal Document E-mail List alatt kattints az Add a new approved e-mail address linkre és adjuk hozzá a hotmail email címet, amelyet az előbb regisztráltunk.

Quiet down the low frequency vibration of the LRDCS2603S bottom freezer LG refrigerator

LG uses a piston-type compressor in its new refrigerators. The company offers 10-year warranty on the new design, but the new compressor generates a very strong 60 Hz vibration. You can hear it as a low-frequency hum and shakes the entire house.

The guitar tuner app detects it in the living room far away from the kitchen as a strong and steady 60 Hz sound between B and B flat.

We love the features of the new refrigerator, but the vibration really bothered us. We could not reduce the noise in the kitchen, but we were able to significantly reduce the transfer of the vibration to the floor that shook the house.

We have purchased a few items at Home Depot and placed the refrigerator on a soft padded surface. You need:

  • 1 pack of Everbuilt Furniture Cups 2-1/4″ (4 pack). Item number 745 892
  • 2 packs of Everbuilt Felt Sliders 3-1/2″ diameter (4 pack). Item number 218 925

Build four towers with one Furniture Cup and two Felt Sliders for each, using the adhesive on the sliders to hold them together.

Empty the refrigerator and place the towers under the rollers.

The refrigerator rollers sit perfectly in the dents of the Furniture Cups, and the sliders adequately dampen the low-frequency vibration. The white felt at the bottom allows you to slide the refrigerator on the hard surface, but keeps it in place when you open and close the doors.

If two Felt Sliders don’t provide enough dampening, you can add a third one to provide better insulation.

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 lock
STDERR: Error: Failed to install cookbooks from lockfile
Reason: (NoMethodError) undefined method `[]’ for nil:NilClass

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 on the instance. Follow the steps at

https://aws.amazon.com/premiumsupport/knowledge-center/waiting-for-metadata/

As a summary:

Check the Gateway Address matches the IP address range of the subnet. In a PowerShell window execute:

route print

Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
  169.254.169.254  255.255.255.255      10.254.79.1      15

It should belong to the IPv4 CIDR of the subnet

If the Gateway Address does not belong to the IP address range of the subnet

  1. Confirm that the latest version of EC2Config (Windows Server 2012R2 and earlier) or EC2Launch (Windows Server 2016 or later) is installed on the instance.
  2. To apply the route to the instance, restart the EC2Config service (on Windows Server 2012R2 and earlier), or run the following command from an elevated PowerShell session (on Windows Server 2016 or later):
Import-Module c:\ProgramData\Amazon\EC2-Windows\Launch\Module\Ec2Launch.psm1 ; Add-Routes

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 instance you get the error message:

We’re sorry, your request to modify DB instance … has failed.

Cannot modify the instance class because there are no instances of the requested class available in the current instance’s availability zone. Please try your request again at a later time.

To upgrade an RDS instance to a new type that is not available in the current availability zone:

  1. Find an AZ that has the desired instance type
    • Try to launch an instance with the new instance type and see which zones have available capacity
  2. Change the RDS instance to multi-AZ
    • Click the Modify button and change the instance to multi-AZ
  3. If the secondary instance is not created in a zone that has available capacity of your desired instance type, change the instance back to single-AZ and return to step 2, to set it to multi-AZ again.
  4. Reboot with failover to the secondary instance to make it the primary instance in the new availability zone
    • Click the Actions button and select Reboot
    • Select Reboot with failover
  5. Change the instance back to single-AZ
  6. Upgrade the instance type

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.

#!/bin/bash
set -e

or

#!/bin/bash -e

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 closes the terminal window.

To keep the terminal open, execute the script in a subprocess. It is easy to update existing scripts. Enclose the main part of the script in parentheses to open a new subprocess and add the “set -e” option to it. In case of an error the script terminates the subprocess and returns to the terminal session.

#!/bin/bash

my_function() {
  ...
}

(
  set -e
  ...
  my entry point to the script
  ...
)