KNOWLEDGE BASE

How to Update Amazon Athena keypairwithout modifying existing workbooks or datasources


Published: 18 Oct 2022
Last Modified Date: 19 Oct 2022

Question

Sometimes a different "Access Key ID" and "Secret Access Key" is used in production and testing environment to connect to Amazon Athena. Manually updating the information in every workbook and/or the data sources take a long time. Is there a way to set the default keypair information shared with all the workbooks?

 

Environment

  • Tableau Desktop
  • Tableau Prep Builder
  • Tableau Server 
  • Amazon Athena

Answer

To set key-value pairs of user and password in [athena.properties] file, follow the steps below.

1. Create a text file (Use ISO-8859-1/Latin-1 encoding, without BOM, Byte-Order-Mark) and name it [athena.properties].

2. Set the following key-value pairs in [athena.properties].
Note: Only the key name "user" and "password" work, The other key name like "User" and "Password" do not work.
user=<Access Key ID>
password=<Secret Access Key>
3. Place the [athena.properties] file in the following directories.
  • For Tableau Desktop:  ...\My Tableau Repository\Datasources.
  • For Tableau Prep:  ..\My Tableau Prep Repository\Datasources.
  • For Tableau Server: ...\Tableau Server Data Directory\tabsvc\vizqlserver\Datasources.
4. Restart Tableau Desktop/Tableau Prep or Tableau Server.

5. At the Amazon Athena connecting window of your workbooks or datasources, click [Sign In] button directly without editing any existing connecting information. The connecting will use the user and password that you set in [athena.properties].
User-added image




 

Additional Information

You only can set one user key and one password key in [athena.properties], meaning only one set of "Access Key ID" and "Secret Access Key" can be used as a global setting in [athena.properties].
For more details, see Amazon Athena JDBC driver setting guide: Using Athena with the JDBC driver
Please also see the Amazon guide about Access Key when you want to try this workaround: Best practices for managing AWS access keys
Did this article resolve the issue?