Hi everyone, my organization uses AWS CodeArtifact as a private repository for Python packages with SSO. The credentials expire after 12 hours. Is there a convenient way to allow Metaflow to regenerate the authentication token when deploying Flows to AWS? I was thinking of reading it from a secret and using the pip index URL as an environmental variable, but I don't think that would work.
✅ 1
h
hundreds-rainbow-67050
02/04/2025, 4:47 PM
You could have a script regenerate the credentials before calling metaflow to deploy
f
famous-potato-4109
02/04/2025, 5:06 PM
Thanks Nissan. How would that work exactly? From what I understand, a flow will reinstall the specified packages each time it runs, right? When you refresh a CodeArtifact token, how would Metaflow get the new pip index URL when the Flows are already deployed on AWS?
s
square-wire-39606
02/04/2025, 5:10 PM
Hi Abhishek - are you using @conda/@pypi?
h
hundreds-rainbow-67050
02/04/2025, 5:13 PM
The environment is resolved at deploy time, ie once. When the flow runs it doesn’t need to hit CA again
this 1
f
famous-potato-4109
02/04/2025, 5:41 PM
I'm using pypi. Thanks for the clarification Nissan. I'll try that out