The "config" and "credentials" Files - Access Module

Teradata® Tools and Utilities Access Module Reference

Product
Access Module
Release Number
16.20
Published
November 2020
Language
English (United States)
Last Update
2020-11-18
dita:mapPath
igy1527114222333.ditamap
dita:ditavalPath
igy1527114222333.ditaval
dita:id
B035-2425
lifecycle
previous
Product Category
Teradata Tools and Utilities

The config file contains the region name where the Amazon S3 bucket is located. The config file supports comments.

By convention, the Amazon command line utilities obtain configuration and authentication data from files in the user’s home directory. The files are known as config, with a location of ~/.aws/config and credentials with a location of ~/.aws/credentials. The syntax for these files is defined by the AWS documentation although the examples should be sufficient to create these files if they are not already present.

Many AWS users will have these files present since development and administration is often performed using the AWS CLI utilities. The TPT-S3 connector is able to interpret these files to obtain the region, access_key_id, and secret_access_key if they are not provided via module parameters or shell environment variables.

These files are broken up into sections called “profiles”. Each section is identified with the profile name in square brackets. The profile [default] is expected to be present and other profiles can be provided as shown in the shaded example below. The desired profile can be selected by the S3Profile module parameter.

The following is an example of the contents of the config file with a default location of ~/.aws/config:

[default]
region = us-west-2
[export_job_7]
region = us-east
[load_job_5]
region = us-west-2
# I support comments

The credentials file contains the user credentials such as "Access Key Id" and "Secret Access Key".

The following is an example of the contents of the credentials file with a default location of ~/.aws/credentials:

[default]
aws_access_key_id = AKIA************T6XA
aws_secret_access_key = Mpm1********************************CNT4
[export_job_7]
aws_access_key_id = AKIA************WLCX
aws_secret_access_key = Mpm1********************************QQL7
[load_job_5]
aws_access_key_id = AKIA************WWNB
aws_secret_access_key = Mpm1********************************CNT4

These files can have sections called profiles, identified with an arbitrary name in square brackets which can correspond to the descriptions of the load or export job. Any particular profile from the config and the credentials files can be selected for use through the initialization string parameter named S3Profile.

You need to create a .aws directory under your home directory and keep the config file and the credentials file under the .aws directory. The .aws directory is the default location to keep the config file and the credentials file.
On the Windows platform the name of the directory is aws instead of .aws, and the HOME environment variable has to be manually created.

You can also store the config file and the credentials file in any directory of your choice. However, you need to specify the directory path where the config file and the credentials file are stored, through the initialization string parameter named S3ConfigDir.