Skip to content

Instantly share code, notes, and snippets.

@lukeorland
Created July 16, 2020 19:09
Show Gist options
  • Save lukeorland/9be30772425de94465cffb2229e225f3 to your computer and use it in GitHub Desktop.
Save lukeorland/9be30772425de94465cffb2229e225f3 to your computer and use it in GitHub Desktop.
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