Athena is a serverless, interactive query service that makes it easy to analyze large amounts of structured and semi-structured data stored in Amazon S3 using standard SQL.
Here's how you can connect Athena with Locale:
Step 1: Get the Access Key and Secret Key
To connect Athena with Locale, you need to provide your AWS access key and Secret key.
Here's how you can get them:
- Sign in to the AWS Management Console.
- Open the IAM console.
- In the left navigation pane, choose Users.
- Choose or create an IAM user.
- Choose the Security credentials tab.
- In the Access keys section, choose to Create access key.
- Download the CSV file that contains your new access key and secret key.
๐ก It is recommended to create a new IAM user for Locale and give this user minimum required permissions.
โ
Step 2: Set Up IAM Permissions
To create an IAM user with the right permission to use AWS Athena, you can either assign the predefined policy AWSQuicksightAthenaAccess
or create a custom policy with more limited access.
Here's how to do it:
- Create an IAM permission policy.
- Choose the JSON tab.
- Enter the following policy:
Replace your-bucket-name
in the policy JSON with the name of the bucket where you are going to store the output of Athena queries.
4. Attach the policy to the IAM user created in Step 1
โ
5. Select the policy you want to attach, either your custom policy or predefined AWSQuicksightAthenaAccess
policy.
โ
๐ก If you are using AWSQuicksightAthenaAccess
policy, attach an extra policy which has read access to the output s3 bucket.
โ
Step 3: Configure Athena as a Data Connection
Perform the following steps to configure Athena as a data connection:
- Go to
Add data connections
and selectAws Athena
Database.
โ
2. Configure Athena as a data connection by entering the following details.
Datasource Name
โ A unique name to identify the data source. You could have multiple AWS Athena databases connecting to Locale so you can use this name to uniquely differentiate between each of them within Localeโs platform.AWS Region
โ The AWS Region where Athena is hosted. For exampleus-east-1
Access Key
โ IAM user access key which we created in Step 1.Secret Key
โ IAM user Secret key which we created in Step 1.Output S3 bucket
โ S3 bucket URI to store the output of Athena queries. For examples3://athena-output-bucket
โ
3. Click on Test & Finish Setup
and wait for it to be authenticated.
Congratulations ๐, you've successfully added AWS Athena to Locale.
Happy Alerting!