Giter Site home page Giter Site logo

andrewhopper / supabase-on-aws Goto Github PK

View Code? Open in Web Editor NEW

This project forked from supabase-community/supabase-on-aws

0.0 0.0 0.0 4.08 MB

Self-hosted Supabase on AWS

License: Apache License 2.0

JavaScript 0.74% Python 1.45% TypeScript 76.24% PLpgSQL 20.52% Dockerfile 1.06%

supabase-on-aws's Introduction

Supabase on AWS - CloudFormation/CDK Template

Launch in minutes. Scale to millions.

This repo includes a template of starting Supabase stack on AWS via CloudFormation/CDK. This template use managed services such as Amazon ECS and Amazon Aurora etc...

Architecture

architecture-diagram

smart-cdn-caching

Deploy via CloudFormation template

Region View Stable Latest
US East (N. Virginia) View launch launch
US West (Oregon) View launch launch
Europe (Ireland) View launch launch
Asia Pacific (Tokyo) View launch launch
Asia Pacific (Osaka) View launch launch
Asia Pacific (Singapore) View launch launch
Asia Pacific (Sydney) View launch launch
Asia Pacific (Mumbai) View launch launch

Specification and Limitation

  • APIs
    • All containers run on ECS Fargate (Graviton2).
      • Only Storage API works on x86_64 platforms.
    • All components are configured with AutoScaling.
    • GraphQL is supported using PostGraphile, because pg_graphql is not supported with Amazon RDS/Aurora.
  • Service Discovery
    • Each component is discovered as ***.supabase.internal.
  • Database (PostgreSQL)
  • Supabase Studio
    • It is deployed on Amplify Hosting.
    • Todo: Add option to deploy the studio in different regions.

Fargate Task Size

Size vCPU Memory
micro 256 512
small 512 1024
medium 1024 2048
large 2048 4096
xlarge 4096 8192
2xlarge 8192 16384
4xlarge 16384 32768

IAM Policy to create CloudFormation Stack

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "CloudFormation",
            "Effect": "Allow",
            "Action": "cloudformation:*",
            "Resource": "*"
        },
        {
            "Sid": "supabase",
            "Effect": "Allow",
            "Action": [
                "application-autoscaling:*",
                "ec2:*",
                "ecs:*",
                "elasticloadbalancing:*",
                "events:*",
                "iam:*",
                "lambda:*",
                "logs:*",
                "s3:*",
                "secretsmanager:*",
                "servicediscovery:*",
                "ses:*",
                "ssm:*",
                "states:*",
                "rds:*",
                "route53:*",
            ],
            "Resource": "*"
        },
        {
            "Sid": "supabase-cdn",
            "Effect": "Allow",
            "Action": [
                "cloudfront:*",
                "wafv2:Get*",
                "wafv2:List*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "cache-manager",
            "Effect": "Allow",
            "Action": [
                "apigateway:*",
                "lambda:*",
                "logs:*",
                "sqs:*",
            ],
            "Resource": "*"
        },
        {
            "Sid": "supabase-studio",
            "Effect": "Allow",
            "Action": [
                "amplify:*",
                "codecommit:*",
                "lambda:*",
                "logs:*",
                "sns:*"
            ],
            "Resource": "*"
        }
    ]
}

Deploy via CDK

This cdk project has many resources for CloudFormation. It is highly recomended to remove these resources for CloudFormation to use it as CDK.

git clone https://github.com/mats16/supabase-on-aws.git

cd supabase-on-aws

yarn install

cdk deploy Supabase

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.