This repository is showing how to store Metabase
data which running ECS on Fargate.
All AWS resources are created by Terraform, see Deployment section. Architecture is below.
- VPC has two subnet sets, public and private respectively.
- ALB is accessible from the internet and forwards requests to ECS.
- ECS (on Fargate) is corresponding to Metabase application.
- EFS is store Metabase data permanently. So if ECS is down, Metabase data is not lost.
- RDS is in private subnet. ECS can access to RDS via Security Group.
- Install Terraform and AWS CLI your local machine.
- Create RDS user and password by below aws-cli command.
% aws ssm put-parameter \
--name "/metabase/rds/mysql/username" \
--description "rds username" \
--value "xxxxx" \
--type String
% aws ssm put-parameter \
--name "/metabase/rds/mysql/password" \
--description "rds password" \
--value "xxxxxxxxxxxx" \
--type SecureString
- Apply Terraform.
% cd terraform
% terraform init
% terraform apply
- Access to Metabase via ALB DNS name. You can retrieve by Terraform output.And connect to DB with RDS user and password.
% terraform output alb_dns_name