Instructions

Step 0 - Check Local AWS CLI Config

Before you start to configure DataGrip, please ensure your AWS CLI config is EXACTLY like following screenshot

  • IAM Role Profile needs to store in the credentials

aws cli config

You can refer to this official AWS document: Configuration basics - AWS command-Line Interface

Step 1 - Install DataGrip

For Mac User

  • Option 1: If you have brew installed on your workstation, you could execute the following command in your favourite terminal
1
brew install --cask datagrip

For Windows User

Once we have installed DataGrip locally, we can start to configure the connection.

Step 2 - Setup Athena Data Source

General Tab

  • User: Your AWS Access Key
  • Password: Your AWS Secret Access Key
  • Region: Your AWS Region

Advanced Tab

  • AwsCredentialsProviderArguments: Your AWS IAM Role Profile Name
  • AwsCredentialsProviderClass: com.simba.athena.amazonaws.auth.profile.ProfileCredentialsProvider
  • S3OutputLocation: s3://aws-athena-query-results-[Your AWS Account ID]-[Your AWS Region]/

Once you configure everything correct, you shall be able to connect to AWS Athena in DataGrip

connect success

FAQ

Q: No AWS profile named ‘prod’ error connect success

A: You might see this following error during the your configuration, this is primarily due to wrong AWS CLI profile setup that DataGrip cannot find the expected IAM role profile.

You can follow Step 0 to solve this issue.