Have you tried this on an Amazon ECS Cluster (Amazon ECS clusters - Amazon Elastic Container Service)? (OR) Are you using a single instance such as c5a.16xlarge (32 cores)? Perhaps, you are referring to the former? If it is the latter, you should have no problem as far as I know.
I think I fixed this problem
On AWS when compiling openfoam, calculix and precice, many of the libraries are placed on the headnode. However to run a problem, it is submitted as a batch job to the compute nodes. I am also using a separate file system (Lustre) to hold the run files. This separate file system cannot find the libraries on the head node, (even with the proper path given by the LD_LIBRARY_PATH variable). The fix is to copy the library files onto the Lustre file system and set the LD_LIBRARY_PATH variable to that location.
(Satish…I am using a ECS Cluster with Lustre file system)