Skip to main content
Question

AmazonAhenaConnector - How to specify a specific workgroup in the connection details?

  • November 11, 2022
  • 1 reply
  • 112 views

Our Athena Connections are configured using a specific workgroup name (rather than the default primary one).

Can I specify the workgroup name somewhere in the connection parameters?

Below is the error I receive when trying to list the named queries for this connection.

```

AmazonAthenaConnector: An error occurred while listing named queries: 'FMEException: 936005: AmazonAthenaConnector: The requested AWS operation returned an error: 'An error occurred (AccessDeniedException) when calling the ListNamedQueries operation: User: arn:aws:iam::<nr>:user/testing is not authorized to perform: athena:ListNamedQueries on resource: arn:aws:athena:eu-west-1:<nr>:workgroup/primary because no identity-based policy allows the athena:ListNamedQueries action''

```

When I try to query with a specific query it (obviously) also fails, but with a more generic error:

```

AmazonAthenaConnector: The bucket 'pnh-raw-data-euw1-s3-factsheets-output' does not exist or can not be accessed: 'An error occurred (403) when calling the HeadBucket operation: Forbidden'

```

Specifiying a workgroup name is a standard option on the driver properties of a athena jdbc connection.

1 reply

  • Author
  • November 21, 2022

For anybody interested in this issue...

I am currently using a SQLExecutor with a JDBC connection to connect to Athena.

see the fme documentation how to install a custom jdbc driver, download the athena jdbc jar from aws website and place in correct folder.

use as connection string like this: jdbc:awsathena://AWSRegion=<region>;User=<key>;Password=<secret>;Workgroup=<workgroup>;

driver class: com.simba.athena.jdbc.Driver

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings