File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,9 @@ def set_iam_properties(info: RedshiftProperty) -> RedshiftProperty:
131131 )
132132
133133 if info .credentials_provider is not None :
134- if any ((info .access_key_id , info .secret_access_key , info .session_token , info .profile )):
134+ if info .auth_profile is None and any (
135+ (info .access_key_id , info .secret_access_key , info .session_token , info .profile )
136+ ):
135137 raise InterfaceError (
136138 "Invalid connection property setting. It is not valid to provide both Credentials provider and "
137139 "AWS credentials or AWS profile"
@@ -142,7 +144,7 @@ def set_iam_properties(info: RedshiftProperty) -> RedshiftProperty:
142144 "credentials_provider."
143145 )
144146 elif info .profile is not None :
145- if any ((info .access_key_id , info .secret_access_key , info .session_token )):
147+ if info . auth_profile is None and any ((info .access_key_id , info .secret_access_key , info .session_token )):
146148 raise InterfaceError (
147149 "Invalid connection property setting. It is not valid to provide any of access_key_id, "
148150 "secret_access_key, or session_token when profile is provided"
You can’t perform that action at this time.
0 commit comments