I sort of suspect the error wasn’t just about resources, since it continued after given gobs of resources.
One of the AWS container advocates mentioned it was likely something like the nofile ulimit: https://twitter.com/nathankpeck/status/1098992994131283968