Pasha Kravtsov
05/18/2022, 10:43 PMKevin Kho
Pasha Kravtsov
05/18/2022, 10:47 PMKevin Kho
Pasha Kravtsov
05/18/2022, 10:48 PMfrom pydantic import BaseSettings
from pydantic_kms_secrets import KMSSecretStr, decrypt_kms_secrets
class Settings(BaseSettings):
env: str
secrets_kms_key_id: str # This model attribute must exist to decrypt secrets
kms_secret_1: KMSSecretStr
kms_secret_2: KMSSecretStr
class Config:
env_file = ".env"
settings = decrypt_kms_secrets(Settings())
which works without issue outside of Prefect in my main applicationFailed to load and execute flow run: FlowStorageError('An error occurred while unpickling the flow:\n ClientError("An error occurred (ValidationException) when calling the Decrypt operation: 1 validation error detected: Value at \'ciphertextBlob\' failed to satisfy constraint: Member must have length greater than or equal to 1")')
Kevin Kho
Pasha Kravtsov
05/18/2022, 11:09 PMKevin Kho