Cloud Data Access
Also available as:
PDF
loading table of contents...

Using Configuration Properties to Authenticate

To configure authentication with S3, explicitly declare the credentials in a configuration file such as core-site.xml:

<property>
  <name>fs.s3a.access.key</name>
  <value>ACCESS-KEY</value>
</property>

<property>
  <name>fs.s3a.secret.key</name>
  <value>SECRET-KEY</value>
</property>

If using AWS Session credentials for authentication, the secret key must be that of the session, and the fs.s3a.session.token option set to your session token.

<property>
  <name>fs.s3a.session.token</name>
  <value>SESSION-TOKEN</value>
</property>

This configuration can be added for a specific bucket. For more information, refer to Using Per-Bucket Credentials to Authenticate.

Next Steps

To protect these credentials, we recommend that you use the credential provider framework to securely store and access your credentials.

To validate that you can successfully authenticate with S3, try referencing S3 in a URL.