ACCOUNT_ID
, WORKGROUP
, BUCKET_NAME
and SCHEMA
with the your account information.
WORKGROUP
should be primary
unless otherwise specified during connection configuration.BUCKET
should refer to the bucket created in the previous step.SCHEMA
used below does not need to be created ahead of time. If it does not exist, it will be created automatically before transferring data.📘 Athena vs. S3 permissions Because Athena uses S3 as the underlying storage layer, the Resource access requested in the policy is scoped down via resource-specific permissions in the S3 actions.
📘 Schema vs. Database During destination onboarding, you will be asked to provide both a “schema” and a “database”. Though those are mostly synonymous in Athena, they are used for two different purposes here:
schema
should be the name of the folder in S3 under which the final data will be written.database
should be the name of the folder in S3 in which the Athena query results are written (i.e., the automatically generatedathena_output/
data).
transfer-service-policy
(this will be referenced in the next step), add a description, and click Create policy.transfer-role
, and click Create role.🚧 Alternative authentication method: AWS User with HMAC Access Key ID & Secret Access Key Role based authentication is the preferred authentication mode for Athena based on AWS recommendations, however, HMAC Access Key ID & Secret Access Key is an alternative authentication method that can be used if preferred.
- Navigate to the IAM service page.
- Navigate to the Users navigation tab, and click Add users.
- Enter a User name for the service, for example,
transfer-service
, click Next. Under Select AWS access type, select the Access key - Programatic access option. Click Next: Permissions.- Click the Attach existing policies directly option, and search for the name of the policy created in the previous step. Select the policy, and click Next: Tags.
- Click Next: Review and click Create user.
- In the Success screen, record the Access key ID and the Secret access key.