Skip to content

Commit

Permalink
Wrong aws_iam_authorization access key id setting (kedacore#1332)
Browse files Browse the repository at this point in the history
* Wrong aws_iam_authorization access key id setting

When getting the ACCESS_KEY_ID for AWS from Environment variables (which is currently the only working option), the `aws_iam_authorization` scaler would check if metadata.awsAccessKeyIDFromEnv was set, but it would then utilize the metadata.awsAccessKeyId for the name... while in the secretAccessKey it would then use the `FromEnv` one. This fixes that

Signed-off-by: Xavier Geerinck <[email protected]>
Signed-off-by: Aaron Schlesinger <[email protected]>
  • Loading branch information
XavierGeerinck authored and arschles committed Nov 30, 2020
1 parent d28dad0 commit 2d0b24e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/scalers/aws_iam_authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2d0b24e

Please sign in to comment.