diff --git a/src/awx_plugins/credentials/aws_assumerole.py b/src/awx_plugins/credentials/aws_assumerole.py index ba69d24b0a..58d216369b 100644 --- a/src/awx_plugins/credentials/aws_assumerole.py +++ b/src/awx_plugins/credentials/aws_assumerole.py @@ -149,7 +149,7 @@ def aws_assumerole_backend( ) credential_key = credential_key_hash.hexdigest() - credentials = _aws_cred_cache.get(credential_key, None) + credentials = _aws_cred_cache.get(credential_key, {}) # If there are no credentials for this user/ARN *or* the credentials # we have in the cache have expired, then we need to contact AWS again. diff --git a/tests/credential_plugins_test.py b/tests/credential_plugins_test.py index e7dc0017dd..34c61becf6 100644 --- a/tests/credential_plugins_test.py +++ b/tests/credential_plugins_test.py @@ -172,7 +172,7 @@ def test_aws_assumerole_identifier( def mock_getcreds( access_key: str | None, secret_key: str | None, - role_arn: str | None, + role_arn: str, external_id: int, ) -> dict: return {