Gabi Pi
10/20/2021, 12:11 PMKubernetesRun
?
I tried to do the following:
run_config=KubernetesRun(
env={
"AWS_ACCESS_KEY_ID": AWS_ACCESS_KEY_ID,
"AWS_SECRET_ACCESS_KEY": AWS_SECRET_ACCESS_KEY
})
but when I run the flow, I get an error saying:
Error downloading Flow from S3: An error occurred (InvalidAccessKeyId) when calling the GetObject operation: The AWS Access Key Id you provided does not exist in our records.
Any ideas?Anna Geller
Gabi Pi
10/20/2021, 1:23 PMKubernetesRun
through a secret in the k8s cluster?Anna Geller
Gabi Pi
10/20/2021, 1:31 PMimage_pull_secrets
used only for authentication against the docker repository?Anna Geller
PrefectSecret
from the UI. It would look like this:
Secret name = secret value
AWS_CREDENTIALS=‘{“ACCESS_KEY”: “abcdef”, “SECRET_ACCESS_KEY”: “ghijklmn”}’Kevin Kho
Anna Geller
Gabi Pi
10/20/2021, 1:46 PMenv
param in KubernetesRun
would be enough.
How can I set it on agent start? I create the k8s manifest using prefect agent kubernetes install ... > manifest.yaml
and then run kubectl apply -f manifest.yaml
Gabi Pi
10/20/2021, 1:47 PMenv
in KubernetesRun
doesn't work it would be great!Anna Geller
KubernetesRun
- they were passed successfully to the Kubernetes job. If you look at the error message that you got, it’s not an error from Prefect but from AWS, telling that it couldn’t download S3 object because those credentials are invalid. Sorry, if I’m annoying by saying it again, but I would really cross check with some DevOps folks whether the IAM user with those credentials 100% do have S3 get object permissions.Kevin Kho
prefect agent kubernetes install --env AWS_ACCESS_KEY_ID=XXXXXX --env AWS_SECRET_ACCESS_KEY=XXXX
. My thinking is that the order is the Agent is the one responsible for downloading the Flow and then it gets run in the RunConfig. Checking the code.Chris L.
10/20/2021, 2:08 PMChris L.
10/20/2021, 2:24 PMKevin Kho
Chris L.
10/20/2021, 3:02 PMGabi Pi
10/20/2021, 8:38 PM