Hi, today I'm getting errors about Prefect not fin...
# ask-community
g
Hi, today I'm getting errors about Prefect not finding my secrets: KeyError: 'The secret xxx was not found. Please ensure that it was set correctly in your tenant: https://docs.prefect.io/orchestration/concepts/secrets.html'. This happens during a flow where I use the same secret multiple times to access a data source, after a while I get this error. But it must have found the secret before, since the data source was accessed earlier in the flow. Anyone else getting the same errors?
1
Never mind, flows are working again.
k
Hey @g.suijker, I think this might be more reliable if you add the secret to storage
Copy code
flow.storage = S3(bucket="my-flows", secrets=["AWS_CREDENTIALS"])
is it is used repeatedly
g
So I should not save and use the secret within the Prefect Cloud UI?
k
No you do, but this is cached for the flow run I think so you don’t keep requesting it
1
g
Thanks, that will be a better solution