How to supply httpoison with a certificate from a string?

I have installed an elasticsearch cloud on kuibernetes and I am trying to use the elasticsearch library to connect to that cluster. Where I get stuck is with the ssl part. This is my runtime.exs:

config :app, ElasticsearchCluster,
url: System.get_env(“ELASTIC_HOST”),
username: System.get_env(“ELASTIC_USERNAME”),
password: System.get_env(“ELASTIC_PASSWORD”),
default_options: [
hackney: [
ssl_options:
[cacerts: System.get_env(“ELASTIC_CERT”)]
]
]

This does not work as erlang demands a certfile. Is there a way to pass a certificate authority certificate to the ssl_options from an environment variable?