Hi, I am storing flow in S3. Setting credential wi...
# ask-community
p
Hi, I am storing flow in S3. Setting credential with environment variable PREFECT__CONTEXT__SECRETS__AWS_CREDENTIALS prior to running python code works, but it does not work if I set the environment variable inside python program like this.
k
It needs to be set before you import Prefect because the context is created when Prefect is imported
p
it works! but having to set env before import is not so elegant. Is there any other option to pass AWS credential for storing flow to S3 bucket?
k
Any reason why you didn’t use secrets ?
p
OK, if secrets work, I need to learn using secrets. :)
k
Yes secrets will remove this headache for you