The way your code is written, the name filter is indeed being read too early. You would need to restructure the code so that aws.lb.get_load_balancer() is being called inside the lambda from nlb["load_balancer"]["ingress"][0]["hostname"].apply().
Within the apply lambda, the hostname becomes a string. Outside the apply, it will always be a pulumi.Output<string>, which cannot be passed into the "name=" filter. If you're familiar with asynchronous calls using Python Futures or Javascript Promises, the pulumi.Output model follows very similar design patterns.