diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c58175825c..6ce2f3f2991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ ### Improvements +- Bug fix in aws_iam_authorization to utilize correct secret from env key name ([PR #1332](https://github.com/kedacore/keda/pull/1332)) + ### Breaking Changes ### Other diff --git a/pkg/scalers/aws_iam_authorization.go b/pkg/scalers/aws_iam_authorization.go index bdd33d830d7..e542ad01cad 100644 --- a/pkg/scalers/aws_iam_authorization.go +++ b/pkg/scalers/aws_iam_authorization.go @@ -30,7 +30,7 @@ func getAwsAuthorization(authParams, metadata, resolvedEnv map[string]string) (a if metadata["awsAccessKeyID"] != "" { meta.awsAccessKeyID = metadata["awsAccessKeyID"] } else if metadata["awsAccessKeyIDFromEnv"] != "" { - meta.awsAccessKeyID = resolvedEnv[metadata["awsAccessKeyID"]] + meta.awsAccessKeyID = resolvedEnv[metadata["awsAccessKeyIDFromEnv"]] } if len(meta.awsAccessKeyID) == 0 {