From 5dd61abe2a1bd01e129f5515b5df8aaebdddb99d Mon Sep 17 00:00:00 2001 From: Connor Kirkpatrick Date: Tue, 17 Jun 2025 10:25:17 +0100 Subject: [PATCH] Check for AWS_PROFILE or AWS_ROLE_SESSION_NAME environment variables --- core/plugin_registry.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/plugin_registry.go b/core/plugin_registry.go index 7b6a54690..c37e0bc47 100644 --- a/core/plugin_registry.go +++ b/core/plugin_registry.go @@ -41,7 +41,9 @@ import ( // potential authentication source exists so we can safely initialize the // Bedrock client without causing the AWS SDK to search for credentials. func hasAWSCredentials() bool { - if os.Getenv("AWS_ACCESS_KEY_ID") != "" && os.Getenv("AWS_SECRET_ACCESS_KEY") != "" { + if os.Getenv("AWS_PROFILE") != "" || + os.Getenv("AWS_ROLE_SESSION_NAME") != "" || + (os.Getenv("AWS_ACCESS_KEY_ID") != "" && os.Getenv("AWS_SECRET_ACCESS_KEY") != "") { return true }