-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Invalid aws session token #962
Comments
To address the issue with the @property
def profile(self) -> dict[str, Any | None]:
self.temporary_credentials = self._get_temporary_credentials() # type: ignore
profile = {
**self.mapped_params,
**self.profile_args,
"aws_access_key_id": self.temporary_credentials.access_key,
"aws_secret_access_key": self.get_env_var_format("aws_secret_access_key"),
}
if self.temporary_credentials.token:
profile["aws_session_token"] = self.get_env_var_format("aws_session_token")
return self.filter_null(profile) This code ensures that
|
HI @ssulca , thanks for reporting the issue and proposing a solution! |
…ist (astronomer#1022) Set `aws_session_token` in the Athena profile only if it exists to avoid passing an empty string as a token to the AWS API. Closes: astronomer#962
Cosmos in AthenaAccessKeyProfileMapping always tries to use a session token, even when it is not provided by the Airflow connection
Context
When setting up a new aws connection using only
aws_access_key_id
andaws_secret_access_key
, itgenerates a profile like this:
But
AthenaAccessKeyProfileMapping
sets theaws_session_token
as an empty string, and dbt takes this value,resulting in.
Propose solutions
In profile function
Add a condition that check if there is a token.
The text was updated successfully, but these errors were encountered: