Thread
#prefect-community
    Patrick Tan

    Patrick Tan

    3 months ago
    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.
    Kevin Kho

    Kevin Kho

    3 months ago
    It needs to be set before you import Prefect because the context is created when Prefect is imported
    Patrick Tan

    Patrick Tan

    3 months ago
    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?
    Kevin Kho

    Kevin Kho

    3 months ago
    Any reason why you didn’t use secrets ?
    Patrick Tan

    Patrick Tan

    3 months ago
    OK, if secrets work, I need to learn using secrets. 😃
    Kevin Kho

    Kevin Kho

    3 months ago
    Yes secrets will remove this headache for you