Logger - error: {removed_failing_handler,'Elixir.Logger'}

This is a post related to ExAws :emfile warnings - [warning] ExAws: HTTP ERROR: :emfile for URL:

I’m having a hard time isolating the cause of this issue. We have 2 Elixir apps related to this error: one is a dependency, the other is the “parent” app that uses the dependency.
In short, I can call a Lambda function concurrently from our dependency when running it standalone, and I see no error other than those that stem from the fact that some other dependencies (e.g. ex_aws) make calls to the deprecated Logger.warn instead of Logger.warning. This generates an error like the following:

iex(3)> :gen_event handler Logger.Backends.Console installed in Logger terminating
** (exit) an exception was raised:
    ** (KeyError) key :warn not found in: %{alert: :red, critical: :red, debug: :cyan, emergency: :red, enabled: true, error: :red, info: :normal, notice: :normal, warning: :yellow}
        :erlang.map_get(:warn, %{alert: :red, critical: :red, debug: :cyan, emergency: :red, enabled: true, error: :red, info: :normal, notice: :normal, warning: :yellow})
        (logger 1.13.4) lib/logger/backends/console.ex:316: Logger.Backends.Console.color_event/4
        (logger 1.13.4) lib/logger/backends/console.ex:250: Logger.Backends.Console.log_event/5
        (logger 1.13.4) lib/logger/backends/console.ex:148: Logger.Backends.Console.handle_event/2
        (stdlib 3.16.1) gen_event.erl:627: :gen_event.server_update/4
        (stdlib 3.16.1) gen_event.erl:609: :gen_event.server_notify/4
        (stdlib 3.16.1) gen_event.erl:351: :gen_event.handle_msg/6
        (stdlib 3.16.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

I can manually edit the dependencies in my deps/, recompile, and this error goes away.

However, when I move over to the parent application that uses our dependency, we continue to get an error re emfile:

ExAws: HTTP ERROR: :emfile for URL: "https://lambda.something-something"

I don’t see the same error re Logger.Backends.Console as when I ran the exact same code from within the dependency… but after a few of the emfile errors I see an error that might be related:

Logger - error: {removed_failing_handler,'Elixir.Logger'}

Any ideas why would the errors be different? Why would the logger give out and is it maybe related to the emfile error?

Sorry this is a confusing post, I’m talking to the walls at this point. Any ideas welcome!