{"id":13880675,"url":"https://github.com/supabase-community/supabase-on-aws","last_synced_at":"2025-04-04T20:16:01.784Z","repository":{"id":48573019,"uuid":"516950577","full_name":"supabase-community/supabase-on-aws","owner":"supabase-community","description":"Self-hosted Supabase on AWS","archived":false,"fork":false,"pushed_at":"2024-07-26T07:44:32.000Z","size":4185,"stargazers_count":468,"open_issues_count":30,"forks_count":72,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-28T19:11:23.955Z","etag":null,"topics":["aws","cdk","cloudformation","supabase"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supabase-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-23T03:47:39.000Z","updated_at":"2025-03-26T22:15:40.000Z","dependencies_parsed_at":"2023-11-27T10:30:42.686Z","dependency_job_id":"1e6e2d1e-256f-4b3f-a87e-ebb3d07a598c","html_url":"https://github.com/supabase-community/supabase-on-aws","commit_stats":{"total_commits":558,"total_committers":4,"mean_commits":139.5,"dds":0.005376344086021501,"last_synced_commit":"e007ad2abb54cb21133e9ddd0c2a1b421a5ff182"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":"mats16/codespaces-cdk-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fsupabase-on-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fsupabase-on-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fsupabase-on-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fsupabase-on-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase-community","download_url":"https://codeload.github.com/supabase-community/supabase-on-aws/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247062661,"owners_count":20877307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cdk","cloudformation","supabase"],"created_at":"2024-08-06T08:03:22.574Z","updated_at":"2025-04-04T20:16:01.768Z","avatar_url":"https://github.com/supabase-community.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Supabase on AWS - CloudFormation/CDK Template\n\n_Launch in minutes. Scale to millions._\n\nThis 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...\n\n## Architecture\n\n![architecture-diagram](docs/images/architecture-diagram.png)\n\n![smart-cdn-caching](docs/images/smart-cdn-caching.png)\n\n## Deploy via CloudFormation template\n\n| Region | View | Stable | Latest |\n|:--|:--|:--|:--|\n| US East (N. Virginia) | [View][us-east-1] | [![launch][launch]][stable-us-east-1] | [![launch][launch]][latest-us-east-1] |\n| US West (Oregon) | [View][us-west-2] | [![launch][launch]][stable-us-west-2] | [![launch][launch]][latest-us-west-2] |\n| Europe (Ireland) | [View][eu-west-1] | [![launch][launch]][stable-eu-west-1] | [![launch][launch]][latest-eu-west-1] |\n| Asia Pacific (Tokyo) | [View][ap-northeast-1] | [![launch][launch]][stable-ap-northeast-1] | [![launch][launch]][latest-ap-northeast-1] |\n| Asia Pacific (Osaka) | [View][ap-northeast-3] | [![launch][launch]][stable-ap-northeast-3] | [![launch][launch]][latest-ap-northeast-3] |\n| Asia Pacific (Singapore) | [View][ap-southeast-1] | [![launch][launch]][stable-ap-southeast-1] | [![launch][launch]][latest-ap-southeast-1] |\n| Asia Pacific (Sydney) | [View][ap-southeast-2] | [![launch][launch]][stable-ap-southeast-2] | [![launch][launch]][latest-ap-southeast-2] |\n| Asia Pacific (Mumbai) | [View][ap-south-1] | [![launch][launch]][stable-ap-south-1] | [![launch][launch]][latest-ap-south-1] |\n\n[launch]: https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png\n\n[us-east-1]: https://supabase-on-aws-us-east-1.s3.amazonaws.com/stable/Supabase.template.json\n[us-west-2]: https://supabase-on-aws-us-west-2.s3.amazonaws.com/stable/Supabase.template.json\n[eu-west-1]: https://supabase-on-aws-eu-west-1.s3.amazonaws.com/stable/Supabase.template.json\n[ap-northeast-1]: https://supabase-on-aws-ap-northeast-1.s3.amazonaws.com/stable/Supabase.template.json\n[ap-northeast-3]: https://supabase-on-aws-ap-northeast-3.s3.amazonaws.com/stable/Supabase.template.json\n[ap-southeast-1]: https://supabase-on-aws-ap-southeast-1.s3.amazonaws.com/stable/Supabase.template.json\n[ap-southeast-2]: https://supabase-on-aws-ap-southeast-2.s3.amazonaws.com/stable/Supabase.template.json\n[ap-south-1]: https://supabase-on-aws-ap-south-1.s3.amazonaws.com/stable/Supabase.template.json\n\n[stable-us-east-1]: https://us-east-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-us-east-1.s3.amazonaws.com/stable/Supabase.template.json\u0026param_SesRegion=us-east-1\n[stable-us-west-2]: https://us-west-2.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-us-west-2.s3.amazonaws.com/stable/Supabase.template.json\u0026param_SesRegion=us-west-2\n[stable-eu-west-1]: https://eu-west-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-eu-west-1.s3.amazonaws.com/stable/Supabase.template.json\u0026param_SesRegion=eu-west-1\n[stable-ap-northeast-1]: https://ap-northeast-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-ap-northeast-1.s3.amazonaws.com/stable/Supabase.template.json\u0026param_SesRegion=ap-northeast-1\n[stable-ap-northeast-3]: https://ap-northeast-3.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-ap-northeast-3.s3.amazonaws.com/stable/Supabase.template.json\u0026param_SesRegion=ap-northeast-3\n[stable-ap-southeast-1]: https://ap-southeast-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-ap-southeast-1.s3.amazonaws.com/stable/Supabase.template.json\u0026param_SesRegion=ap-southeast-1\n[stable-ap-southeast-2]: https://ap-southeast-2.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-ap-southeast-2.s3.amazonaws.com/stable/Supabase.template.json\u0026param_SesRegion=ap-southeast-2\n[stable-ap-south-1]: https://ap-south-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-ap-south-1.s3.amazonaws.com/stable/Supabase.template.json\u0026param_SesRegion=ap-south-1\n\n[latest-us-east-1]: https://us-east-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-us-east-1.s3.amazonaws.com/latest/Supabase.template.json\u0026param_SesRegion=us-east-1\n[latest-us-west-2]: https://us-west-2.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-us-west-2.s3.amazonaws.com/latest/Supabase.template.json\u0026param_SesRegion=us-west-2\n[latest-eu-west-1]: https://eu-west-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-eu-west-1.s3.amazonaws.com/latest/Supabase.template.json\u0026param_SesRegion=eu-west-1\n[latest-ap-northeast-1]: https://ap-northeast-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-ap-northeast-1.s3.amazonaws.com/latest/Supabase.template.json\u0026param_SesRegion=ap-northeast-1\n[latest-ap-northeast-3]: https://ap-northeast-3.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-ap-northeast-3.s3.amazonaws.com/latest/Supabase.template.json\u0026param_SesRegion=ap-northeast-3\n[latest-ap-southeast-1]: https://ap-southeast-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-ap-southeast-1.s3.amazonaws.com/latest/Supabase.template.json\u0026param_SesRegion=ap-southeast-1\n[latest-ap-southeast-2]: https://ap-southeast-2.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-ap-southeast-2.s3.amazonaws.com/latest/Supabase.template.json\u0026param_SesRegion=ap-southeast-2\n[latest-ap-south-1]: https://ap-south-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=Supabase\u0026templateURL=https://supabase-on-aws-ap-south-1.s3.amazonaws.com/latest/Supabase.template.json\u0026param_SesRegion=ap-south-1\n\n### Optional templates\n\n| Template | Link |\n|:--|:--|\n| AWS WAF (Web ACL) | [![launch][launch]][waf-latest] |\n\n[waf-latest]: https://us-east-1.console.aws.amazon.com/cloudformation/home#/stacks/create/review?stackName=SupabaseWaf\u0026templateURL=https://supabase-on-aws-us-east-1.s3.amazonaws.com/latest/SupabaseWaf.template.json\n\n### Specification and Limitation\n\n- APIs\n  - All containers run on ECS Fargate (Graviton2).\n  - All components are configured with AutoScaling.\n  - GraphQL is not supported, because [pg_graphql](https://github.com/supabase/pg_graphql) is not supported with Amazon RDS/Aurora.\n- Service Discovery\n  - Each component is discovered as `***.supabase.internal`.\n- Database (PostgreSQL)\n  - [Amazon Aurora Serverless v2](https://aws.amazon.com/rds/aurora/serverless/) is used.\n  - Todo: Add automatically password rotation.\n- Supabase Studio\n  - It is deployed on [Amplify Hosting](https://aws.amazon.com/amplify/hosting/).\n  - Todo: Add option to deploy the studio in different regions.\n  - ⚠️ Warning: Supabase Studio is **open to web** and can be accessed by malicious actors. We **strongly** suggest you active ['Access control'](https://docs.aws.amazon.com/amplify/latest/userguide/access-control.html) globaly and setup a strong password and username.\n\n#### Fargate Task Size\n\n| Size | vCPU | Memory |\n|:--|:--|:--|\n| micro | 256 | 512 |\n| small | 512 | 1024 |\n| medium | 1024 | 2048 |\n| large | 2048 | 4096 |\n| xlarge | 4096 | 8192 |\n| 2xlarge | 8192 | 16384 |\n| 4xlarge | 16384 | 32768 |\n\n#### IAM Policy to create CloudFormation Stack\n\n```json\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"CloudFormation\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"cloudformation:*\",\n            \"Resource\": \"*\"\n        },\n        {\n            \"Sid\": \"supabase\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"application-autoscaling:*\",\n                \"ec2:*\",\n                \"ecs:*\",\n                \"elasticloadbalancing:*\",\n                \"events:*\",\n                \"iam:*\",\n                \"lambda:*\",\n                \"logs:*\",\n                \"s3:*\",\n                \"secretsmanager:*\",\n                \"servicediscovery:*\",\n                \"ses:*\",\n                \"ssm:*\",\n                \"states:*\",\n                \"rds:*\",\n                \"route53:*\"\n            ],\n            \"Resource\": \"*\"\n        },\n        {\n            \"Sid\": \"supabaseCDN\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"cloudfront:*\",\n                \"wafv2:Get*\",\n                \"wafv2:List*\"\n            ],\n            \"Resource\": \"*\"\n        },\n        {\n            \"Sid\": \"cacheManager\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"apigateway:*\",\n                \"lambda:*\",\n                \"logs:*\",\n                \"sqs:*\"\n            ],\n            \"Resource\": \"*\"\n        },\n        {\n            \"Sid\": \"supabaseStudio\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"amplify:*\",\n                \"codecommit:*\",\n                \"lambda:*\",\n                \"logs:*\",\n                \"sns:*\"\n            ],\n            \"Resource\": \"*\"\n        }\n    ]\n}\n```\n\n## Deploy via CDK\n\nThis cdk project has many resources for CloudFormation. **It is highly recomended to remove these resources for CloudFormation to use it as CDK**.\n\n```bash\ngit clone https://github.com/mats16/supabase-on-aws.git\n\ncd supabase-on-aws\n\nyarn install\n\ncdk deploy Supabase\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase-community%2Fsupabase-on-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase-community%2Fsupabase-on-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase-community%2Fsupabase-on-aws/lists"}