PAM on Cloud AWS - "<name> or dependencies are not installed: No module named '<name>'" error while deploying Vault Server using BYOI
Symptom
The following error, or one like it mentioning another package, is thrown while deploying Vault Server in AWS using BYOI:
amazon-ebs.windows-component: TASK [vault-ansible : Check if Vault was already installed] ********************
amazon-ebs.windows-component: fatal: [default]: FAILED! => {"msg": "pypsrp or dependencies are not installed: No module named 'pypsrp'"}
Environment
12.2;12.6;13.0;13.2;14.0;14.2;14.4;14.6 Privileged Access Manager (PAM, self-hosted) Vault Server;Vault
PAM On Cloud - BYOI (Vault)
Cause
<name> module is not installed in the "Controller" machine.
Where <name> may be any dependency package as listed at https://docs.cyberark.com/pam-self-hosted/latest/en/content/pas%20cloud/images-prerequisites.htm
Resolution
In 14.6 onwards, the controller machine should be built using Terraform to avoid any missing dependencies, see doc below:
https://docs.cyberark.com/pam-self-hosted/latest/en/content/pas%20cloud/images%20-%20aws.htm
For existing controllers not deployed with Terraform:
In addition to the mentioned "Prerequisites" list of software / modules that must be on the "Controller node" machine are detailed here:
https://docs.cyberark.com/pam-self-hosted/latest/en/content/pas%20cloud/images-prerequisites.htm
After making sure the all required packages are installed, create the Vault image from the start again:
python3 ./aws-packer-build.py vault