Configuring Authentication

Connections to DynamoDB require authentication. You must configure the connector to provide your AWS credentials and authenticate the connection to the database.

You can authenticate your connection by using a credentials file or by using access keys (an access key and a secret key).

You can set the connection properties described below in a connection string or in a DSN (in the odbc.ini file). Settings in the connection string take precedence over settings in the DSN.

Using a Credentials File

You can provide AWS credentials by using a special credentials file that contains the access keys and secret keys of multiple users.

For information about the format of a credentials file, see the "AWS Credentials File Format" section in the AWS SDK for Java Developer Guide: http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/credentials.html#aws-credentials-file-format.

To configure authentication using a credentials file:

  1. Set the Region attribute to the AWS region to which you want to connect.
  2. Set the AuthMechanism attribute to 1.
  3. Set the CredentialFile attribute to the full path and name of the AWS credentials file that you want to use.
  4. Set the ProfileName attribute to the name of the profile to use from the AWS credentials file.

Using Access Keys

You can provide an access key and a secret key to authenticate your connection. If you are using temporary credentials, then you must also provide a session token.

Note:

Temporary credentials are only valid for a limited amount of time. Contact your DynamoDB server administrator to get temporary credentials.

To configure authentication using access keys:

  1. Set the Region attribute to the AWS region to which you want to connect.
  2. Set the AuthMechanism attribute to 0.
  3. Set the AccessKey attribute to your access key ID for connecting to the DynamoDB service.
  4. Set the SecretKey attribute to the secret access key corresponding to your access key ID.
  5. If you are using temporary credentials, then do the following:
    1. Set the TempCredentials attribute to 1.
    2. Set the SessionToken attribute to your session token.

Related topics

  • Authentication Driver Configuration Options on page 1
  • Configuring the Driver on page 1