Redis Connector

For detailed information about Amazon Athena Redis Connector, refer here.

Install Athena Redis Connector

To install Athena Redis Connector, search for "Serverless Application Repository" in your aws account and click on "Available applications": Make sure "Show apps that create custom IAM roles or resource policies" is marked. Search for "athena federation" and locate "AthenaRedisConnector" and click on that: For this Athena Redis Connector, there are a few fields that we need to complete:

  • Application name: Leave it as default name - AthenaRedisConnector
  • SecretNameOrPrefix: Put redis-*
  • SpillBucket: Put S3Bucket value from the cloudformation outputs here
  • AthenaCatalogName: Put redis
  • DisableSpillEncryption: leave it as default value of false
  • LambdaMemory: leave it as default value of 3008
  • LambdaTimeout: leave it as default value of 900
  • SecurityGroupIds: Put EMRSecurityGroup value from cloudformation outputs here
  • SpillPrefix: Put athena-spill-redis
  • SubnetIds: Put Subnets value from cloudformation outputs here

  • Mark "I acknowledge that this app creates custom IAM roles" and click deploy:
    This will deploy Athena Redis connector and you can refer to this lambda function in your queries as "lambda:redis"

    Redis Database and Tables with Glue Data Catalog

    Since Redis doesn't have a schema of it's own the Redis Connector can't infer the columns or data type from Redis. Redis connector needs a Glue database and tables to be setup to be able to associate the data to the schema. Cloudformation template creates the necessary Redis database and tables in Glue Catalog. Open Glue as shown here: You should see the following redis database under Glue Databases: Click on the redis database to view the database properties: Click on the Tables in redis to view the tables: Click on the Nation table to see the table schema and properties: Click on the Active Orders table to see the table schema and properties: Now that you have all connectors setup move to the next chapter to run the federated queries.