Amazon Linux 2 is a little more challenging to support than other Linux distributions. In particular, there is a missing implementation of posix_spawn_file_actions_addchdir for the version of glibc available there. There could be other issues with Swift Build support for that platform too, but this is the most immediate problem.