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
06/10/2020, 9:04 PMcreds = prefect.context.secrets["CREDS"]
?Darragh
06/10/2020, 9:09 PMKeyError: 'CREDS'
CREDS
and value arn:aws:secretsmanager:eu-west-1:11111111:/local/aws/credentials-abcd
Unexpected error: KeyError('CREDS',)
Chris White
06/10/2020, 9:16 PMPREFECT__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
06/10/2020, 9:20 PMDarragh
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?export 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
06/10/2020, 9:31 PMDarragh
06/10/2020, 9:37 PMChris White
06/10/2020, 10:56 PMMarvin
06/10/2020, 10:56 PM