Hi guys, I would like to know if I can have access...
# questions
a
Hi guys, I would like to know if I can have access to the data in the credentials.yml file in kedro hooks?
m
In the
after_context_created
hook, you will have access to
KedroContext
, which has
config_loader
property, which you can use to load the credentials for example.
What is your use case here? Why do you need access to credentials files?
a
I am doing an AWS login for Mlflow in hooks with our utility.
m
a
This will work in case my AWS credentials are located in the tracking server yes?
m
This is useful when you have secured MLflow instance (it’s not related to the authorization for the underlying artifact storage).
a
than it is a different use case I guess no?
m
You’ve said “AWS login for Mlflow”, so I’ve assumed authorization to a secured mlflow instance. I guess you’re looking for the authorization to the actual artifact storage used by MLflow - S3 I guess?
a
Yes
sorry for the confusion
m
Then either: • approach with the hook, if you need some custom logic there • approach with
OmegaConfigLoader
https://docs.kedro.org/en/stable/kedro_project_setup/configuration.html?highlight=OmegaConfigLoader#environment-variables-for-credentials if you’re running the latest Kedro
a
I need a custom logic, so in the hooks I can acecss the data by both context and omega config I guess
👍 1