Created
July 16, 2020 19:09
-
-
Save lukeorland/9be30772425de94465cffb2229e225f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from prefect import Flow, Parameter | |
from prefect.tasks.secrets import PrefectSecret | |
aws_secret = PrefectSecret(name=None) # initializes Task, unrelated to binding it within a Flow | |
with Flow("parameter_to_secret") as flow: | |
aws_credentials_secret_name = Parameter( | |
'aws_credentials_secret_name', default='AWS_CREDENTIALS', | |
) | |
aws_credentials = aws_secret(name=aws_credentials_secret_name) | |
aws_credentials['ACCESS_KEY'] | |
flow.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment