New RunLLM response generated: >>>*# Question* Hi...
# runllm-flyte-trial
a
New RunLLM response generated: >>>*# Question* Hi Team, Is there a way to NOT pass the AWS Access and Secret Key to every pod which is running a node in the workflow. This practically exposes the keys to all the developers. # Answer Yes, you can avoid passing AWS Access and Secret Keys as environment variables by using Flyte's secret management feature. This allows you to securely pass sensitive information to your tasks without exposing it in the UI or logs. According to Flyte's documentation on secrets, you can use Kubernetes secrets, AWS Secret Manager, or Vault to manage and inject secrets into your Flyte tasks. For example, you can define secrets using the
Secret
class and retrieve them securely within your task:
Copy code
import flytekit
from flytekit import Secret, task, workflow

SECRET_NAME = "aws_secret_key"
SECRET_GROUP = "aws"

@task(secret_requests=[Secret(group=SECRET_GROUP, key=SECRET_NAME)])
def secret_task() -> str:
    secret_val = flytekit.current_context().secrets.get(SECRET_GROUP, SECRET_NAME)
    # Use the secret value securely
    return secret_val

@workflow
def wf() -> str:
    return secret_task()
Would you like more detail on this approach? Sources: - Flyte Secrets Documentation - GitHub Issue on Obfuscating Sensitive Data - Flytesnacks Example on Using Secrets Slack Link https://flyte-org.slack.com/archives/CP2HDHKE1/p1719519743.309949 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.