AWS Glue Sources > Before you begin > Create a connection
  

Create a connection

You use the Amazon Athena connection to connect to the Amazon Athena source system and create schema to use in AWS Glue. Create an Amazon Athena connection object in Administrator.
    1In Administrator, select Connections.
    2Click Add Connection.
    3Search for and select Amazon Athena and then click Next.
    4Enter the following connection details:
    Connection property
    Description
    Connection Name
    Name of the connection.
    Each connection name must be unique within the organization. Connection names can contain alphanumeric characters, spaces, and the following special characters: _ . + -,
    Maximum length is 255 characters.
    Description
    Description of the connection. Maximum length is 4000 characters.
    5Enter properties specific to the Amazon Athena connection:
    Runtime Environment
    The name of the runtime environment where you want to run tasks.
    6Select the authentication type to connect to Amazon Athena and enter the required properties.
    You can select one of the following authentication types:
    7Click Test to test your connection to the source system.
    8Click Save.

Permanent IAM credentials

Permanent IAM credentials authentication is the default type that requires the access key and secret key of the IAM user to connect to Amazon Athena.
The following table describes the basic connection properties for permanent IAM credentials authentication:
Property
Description
Access Key
The access key of the IAM user to connect to Amazon Athena.
Secret Key
The secret key of the IAM user to connect to Amazon Athena.
JDBC URL
The URL to connect to Amazon Athena.
Enter the JDBC URL in the following format:
jdbc:athena://Region=<region_name;OutputLocation=<S3_Output_Location>;Workgroup=<Workgroup_Name>;
It is mandatory to specify the AWS region. You can either add the AWS region in the JDBC URL or specify it in one of the locations recognized by the AWS default region provider chain.
For more information about the AWS default region provider chain, see the AWS documentation.
If you use a workgroup with customer-managed query results, specify at least one of the two parameters in the JDBC URL, either the S3 output location or the workgroup name. For a workgroup with Athena-managed query results, specify only the workgroup name and do not include the S3 output location in the JDBC URL.

EC2 instance profile

You can configure AWS Identity and Access Management (IAM) authentication to connect to Amazon Athena when the Secure Agent is installed on an Amazon Elastic Compute Cloud (EC2) system.
The following table describes the basic connection properties for EC2 instance profile authentication:
Property
Description
JDBC URL
The URL of the Amazon Athena connection.
Enter the JDBC URL in the following format:
jdbc:athena://Region=<region_name;OutputLocation=<S3_Output_Location>;Workgroup=<Workgroup_Name>;
It is mandatory to specify the AWS region. You can either add the AWS region in the JDBC URL or specify it in one of the locations recognized by the AWS default region provider chain.
For more information about the AWS default region provider chain, see the AWS documentation.
If you use a workgroup with customer-managed query results, specify at least one of the two parameters in the JDBC URL, either the S3 output location or the workgroup name. For a workgroup with Athena-managed query results, specify only the workgroup name and do not include the S3 output location in the JDBC URL.