How to set default AWS credentials in ODBC data source

Problem

There are times when you want to use default AWS credentials instead of specifying Access Key and Secret Key individually in Amazon S3 ODBC driver data sources (created with ODBC PowerPack).

You can accomplish that by configuring them in AWS credentials file or in Windows Environment Variables. It is useful to set them in either of these locations because you can then control them in a central place. All you have to do to make this happen is to perform these steps below.

Solution

Step 1: Configure Amazon Storage Connection

  1. Open ODBC data source based on Amazon S3 driver
  2. Set Default credentials option in ODBC data source and configure it there:

Step 2: Configure default AWS credential keys

You can do in two places. Choose the one that suits you more:

  • Windows Environment Variables
  • AWS profile credentials file

Environment Variables configuration

  1. Hit Windows Start button and open System Properties window, by searching for variables:
  2. Then select Advanced tab and click Environment Variables… button:
  3. Finally, create system variables for Access Key and Secret Key:

AWS credentials file configuration

  1. Open AWS credentials file for editing (it is usually located in %USERPROFILE%\.aws\config)
  2. Set aws_access_key_id and aws_secret_access_key properties, e.g.:
    [default]
    aws_access_key_id = AKIAIOSFODNN7EXAMPLE
    aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    

References

Contact us

If you encounter any challenges or have specific use cases, please contact our support team via chat or ticket.