Skip to main content

Store secret strings

You can use the Secret block to store secret strings.
You can access the secret value in your workflow by loading a Secret block with the same name.
Secret values are encrypted at rest when stored in your Prefect backend. To update a secret, save the new value with the overwrite parameter set to True.
Secret blocks can also be created and updated through the Prefect UI.

Store common configuration securely

Prefect offers a set of blocks for storing common configuration. Many of these blocks are included as part of Prefect’s integration libraries. For example, use the AwsCredentials block to store AWS keys to connect to AWS services in your workflows.
You can install prefect-aws by running pip install prefect-aws.
You can load the block to use the credentials in your workflow.