dnf/yum both fails while being executed on instance bootstrap on Amazon Linux 2023

**Basic description of the problem:** Both commands listed below executed while instance is bootstraping fails with message: RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (R...