Skip to main content

AWS Terraform

The deployment consists of several Docker containers, a database for storing metadata, and persistent file storage for storing files.

This document contains instructions to deploy Datagrok using Terraform on an AWS ECS cluster with AWS RDS and AWS S3.

We addressed many typical security considerations during the development of the Terraform code. As a result, the deployed Datagrok infrastructure adheres to standard AWS security best practices.

More information about Datagrok design and components:

Basic usage

Prerequisites

  1. Check that you have the required permissions on the AWS account to perform Terraform deployment to ECS.

  2. Check that you have the required S3 permissions and DynamoDB permissions.

  3. Create an IAM role for CloudFormation stack deployment with the following policies attached:

    • IAMFullAccess
    • PowerUserAccess

You can name it something like CloudFormationExecutionRole. Its ARN will be used as the iam_role_arn variable in the Terraform module.

Deploy Datagrok components

  1. You can use our example as a template and modify it to your needs. Example: link.

  2. Make sure to change the module source to source = "git@github.com:datagrok-ai/tf-module-datagrok-core.git//aws?ref=main" or any other version you want to use.

  3. Set up AWS credentials to run Terraform code

  4. Apply the Terraform code

    terraform init --upgrade
    terraform apply
  5. Once the Datagrok container starts, the server will initialize the database. You can monitor the status by checking the running task logs in CloudWatch.

Advanced usage

The Terraform code is highly configurable. Feel free to adapt the code and variables to meet your needs and requirements. Terraform modules documentation: