Darragh
06/10/2020, 9:03 PM"secrets":[{"name": "CREDS", "valueFrom": "arn:aws:secretsmanager:eu-west-1:11111111:secret:local/aws/credentials-abcd"}]
In Flow, I read like this:
creds = prefect.context.secrets.CREDS
But I keep getting the following:
AttributeError: 'dict' object has no attribute 'CREDS'
Confused face.Chris White
creds = prefect.context.secrets["CREDS"]
?Darragh
06/10/2020, 9:09 PMKeyError: 'CREDS'
Darragh
06/10/2020, 9:12 PMCREDS
and value arn:aws:secretsmanager:eu-west-1:11111111:/local/aws/credentials-abcd
Darragh
06/10/2020, 9:16 PMUnexpected error: KeyError('CREDS',)
Chris White
PREFECT__CONTEXT__SECRETS__CREDS
environment variable?Darragh
06/10/2020, 9:19 PM"secrets":[""name": "CREDS", "valueFrom": "arn:aws:secretsmanager:eu-west-1:11111111local/aws/credentials-abcd"}]
and then reading it in the flow as prefect.context.secrets["CREDS"]
I didn’t spot anything about the format of environment variable you mentioned above?Chris White
Darragh
06/10/2020, 9:22 PMThis adds support for Native AWS Secrets Manager and/or Parameter Store in your flows.
in https://docs.prefect.io/orchestration/agents/fargate.html
So I need the env var as well, as part of the agent config? Do I still need to add it in the secrets section of the config?Darragh
06/10/2020, 9:25 PMexport PREFECT__CONTEXT__SECRETS__CREDS=arn:aws:secrets....
in the env where i start the agent? Do I need to pass it as an variable in the "environments"
section as well?Chris White
Darragh
06/10/2020, 9:37 PMDarragh
06/10/2020, 9:38 PMDarragh
06/10/2020, 10:02 PMDarragh
06/10/2020, 10:02 PMChris White
Chris White
Marvin
06/10/2020, 10:56 PM