mim-Armand / CDK-Athena-RDS

This CDK will create Athena, Glue, connecters and evthing to query a Postgress RDS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to your CDK TypeScript project

About

This CDK will create Athena, Glue, connecters and evthing to query a Postgress RDS

The cdk.json file tells the CDK Toolkit how to execute your app.

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

BOM:

  1. Amazon RDS: A PostgreSQL RDS should be already available, use this to set one up if needed: https://github.com/mim-Armand/cdk-rds-pgsql
  2. Amazon Athena: The interactive query service that integrates with the PostgreSQL database on RDS.
  3. Amazon S3: Used by Athena to store query results and can also be used to store data in a format that can be queried by Athena.
  4. Athena Query Federation: Allows you to run SQL queries across data stored in relational, non-relational, object, and custom data sources.
  5. Lambda Function: Used as a data source for Athena Federated Query. This function will connect to the PostgreSQL database and execute queries.
  6. IAM (Identity and Access Management): To manage permissions and grant the necessary access for Athena and Lambda function to communicate with RDS.
  7. AWS Glue: (Optional) To create metadata tables and making data searchable in Athena.
  8. AWS Secrets Manager: To store and retrieve database credentials securely when connecting from the Lambda function. The Secrets should already be there, use the RDS CDK mentioned above to deploy it if needed.
  9. VPC (Virtual Private Cloud): To host your RDS instance and to optionally isolate your database and control access.
  10. Security Group and Network ACLs: To control inbound and outbound traffic to your RDS instance.
  11. Subnet Group: A collection of subnets (within a VPC) to specify the network resources available to your RDS instance.
  12. CloudWatch: To monitor the performance of RDS, Athena, and Lambda services and to store logs generated by these services.
  13. AWS SDK or CLI: For scripting and automation of the setup and querying process.

About

This CDK will create Athena, Glue, connecters and evthing to query a Postgress RDS


Languages

Language:TypeScript 86.3%Language:JavaScript 13.7%