Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2551,6 +2551,32 @@ export const platform: NavMenuConstant = {
name: 'Credits',
url: '/guides/platform/credits' as `/${string}`,
},
{
name: 'AWS Marketplace',
url: '/guides/platform/aws-marketplace',
items: [
{
name: 'Getting Started',
url: '/guides/platform/aws-marketplace/getting-started',
},
{
name: 'Account Setup',
url: '/guides/platform/aws-marketplace/account-setup',
},
{
name: 'Manage your subscription',
url: '/guides/platform/aws-marketplace/manage-your-subscription',
},
{
name: 'Invoices',
url: '/guides/platform/aws-marketplace/invoices',
},
{
name: 'FAQ',
url: '/guides/platform/aws-marketplace/faq',
},
],
},
{
name: 'Billing FAQ',
url: '/guides/platform/billing-faq' as `/${string}`,
Expand Down
26 changes: 26 additions & 0 deletions apps/docs/content/guides/database/postgres/row-level-security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,32 @@ alter table "table_name" enable row level security;

Once you have enabled RLS, no data will be accessible via the [API](/docs/guides/api) when using the public `anon` key, until you create policies.

<Admonition type="caution" label="`auth.uid()` Returns `null` When Unauthenticated">

When a request is made without an authenticated user (e.g., no access token is provided or the session has expired), `auth.uid()` returns `null`.

This means that a policy like:

```sql
USING (auth.uid() = user_id)
```

will silently fail for unauthenticated users, because:

```sql
null = user_id
```

is always false in SQL.

To avoid confusion and make your intention clear, we recommend explicitly checking for authentication:

```sql
USING (auth.uid() IS NOT NULL AND auth.uid() = user_id)
```

</Admonition>

## Authenticated and unauthenticated roles

Supabase maps every request to one of the roles:
Expand Down
14 changes: 14 additions & 0 deletions apps/docs/content/guides/deployment/branching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@ Supabase branches create separate environments that spin off from your main proj
- **Persistent Branches**: Persistent branches are long-lived branches. They aren't automatically paused or deleted due to non-inactivity or merging.
- **Managing Branches**: You can create, review, and merge branches either automatically via our [GitHub integration](/docs/guides/deployment/branching/github-integration) or directly [through the dashboard](/docs/guides/deployment/branching/dashboard) (currently in beta). All branches show up in the branches page in the dashboard, regardless of how they were created.
- **Data-less**: New branches do not start with any data from your main project. This is meant to better protect your sensitive production data. To start your branches with data, you can use a [seed file](/docs/guides/deployment/branching/github-integration#seeding) if using the GitHub integration.

## Deploying to production

When you merge any branch into your main project, Supabase automatically runs a deployment workflow to deploy your changes to production. The deployment workflow is expressed as a Directed Acyclic Graph where each node represents one of the following deployment steps.

1. **Clone** - Checks out your repository at the specified git branch (optional for [Branching via Dashboard](/docs/guides/deployment/branching/dashboard))
2. **Pull** - Retrieves database migrations from your main project (also initialises the migration history table when Branching via Dashboard)
3. **Health** - Waits up to 2 minutes for all Supabase services on your branch to be running and healthy, including Auth, API, Database, Storage, and Realtime
4. **Configure** - Updates service configurations based on your config.toml file (only available for [Branching via GitHub](/docs/guides/deployment/branching/github-integration))
5. **Migrate** - Applies pending database migrations and vault secrets to your branch
6. **Seed** - Runs seed files to populate your branch with initial data (must be [enabled in config.toml](/docs/guides/deployment/branching/configuration#branch-configuration-with-remotes) for persistent branches)
7. **Deploy** - Deploys any changed Edge Functions and updates function secrets

If a parent deployment step fails, all dependent children steps will be skipped. For e.g., if your database migrations failed at step 5, our runner will not seed your branch because step 6 is skipped. If you are using GitHub integration, the same deployment workflow will be run on every commit pushed to your git branch.
13 changes: 13 additions & 0 deletions apps/docs/content/guides/deployment/branching/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ subtitle: 'Common issues and solutions for Supabase branching'

This guide covers common issues you might encounter when using Supabase branching and how to resolve them.

## Monitoring deployments

To check deployment status and troubleshoot failures:

1. Go to your project dashboard
2. Navigate to "Manage Branches"
3. Click on your branch to view deployment logs
4. Check the "View logs" section for detailed error messages

For programmatic monitoring, you can use the [Management API](https://api.supabase.com/api/v1#tag/environments/post/v1/projects/{ref}/branches) to poll branch status.

For detailed troubleshooting guidance, see our [Troubleshooting guide](/docs/guides/deployment/branching/troubleshooting).

## Common issues

### Rolling back migrations
Expand Down
25 changes: 25 additions & 0 deletions apps/docs/content/guides/platform/aws-marketplace.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
id: 'aws-marketplace'
title: 'AWS Marketplace'
---

You can purchase Supabase through the AWS Marketplace. Buying through AWS Marketplace can mean simpler billing, faster progress toward your AWS spend commitments, and centralized purchasing across all your AWS accounts. Start the purchase process from our marketplace [product page](https://aws.amazon.com/marketplace/pp/prodview-zjciuce2qsb3q).

When you make a purchase on AWS Marketplace, AWS will calculate sales taxes, VAT, GST, service tax, etc. (“Indirect Taxes”), if applicable, based on the location of your AWS account. You can find more details in the [AWS tax help guide](https://aws.amazon.com/tax-help/marketplace-buyers/).

### Plans available through the AWS Marketplace

- Free Plan: not available
- Pro Plan: available, self-serve
- Team Plan: available, self-serve
- Enterprise Plan: available, via AWS Marketplace Private Offer. [Contact us](https://forms.supabase.com/enterprise) for more information.

## More information

- Implications of managing your Supabase organization through the AWS Marketplace. Refer to the [Account Setup guide](./aws-marketplace/account-setup#implications-of-linking-a-supabase-organization-to-a-marketplace-subscription).
- [AWS Marketplace FAQ](./aws-marketplace/faq)
- General guidance on using the AWS Marketplace as a buyer. Refer to the [AWS documentation](https://docs.aws.amazon.com/marketplace/latest/buyerguide/using-aws-marketplace-as-a-subscriber.html).

## Next steps

- Purchase Supabase through the AWS Marketplace. Refer to the [Getting Started guide](./aws-marketplace/getting-started).
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
id: 'account-setup'
title: 'Account Setup'
---

After purchasing a Supabase subscription on the AWS Marketplace, the next and final step is to link the newly purchased subscription to a Supabase organization. This can either be an existing organization or a newly created one.

An AWS Marketplace subscription is linked to exactly one Supabase organization. If you want to manage multiple organizations through the AWS Marketplace, you must purchase a separate marketplace subscription for each organization.

<Image
alt="Supabase product subscribe"
src={{
dark: '/docs/img/guides/platform/aws-marketplace-onboarding-page-extended--dark.png',
light: '/docs/img/guides/platform/aws-marketplace-onboarding-page-extended--light.png',
}}
zoomable
/>

## Implications of linking a Supabase organization to a marketplace subscription

- The billing details from your AWS account, such as the billing address and tax ID, are used. These details are managed through the [AWS Billing and Cost Management console](https://console.aws.amazon.com/billing).
- The subscription plan is managed through the AWS Marketplace. You can read more about this in the [Manage your subscription](./manage-your-subscription#manage-your-subscription-plan) guide.
- Charges will come from AWS rather than Supabase, using the default payment method set in your AWS account.
- The [Spend Cap](/docs/guides/platform/cost-control#spend-cap) for the organization is disabled. The Spend Cap is not available for organizations managed through AWS.
- When you downgrade your plan to the Free Plan, all projects within the organization will be paused if you exceed the [free projects limit](/docs/guides/platform/billing-on-supabase#free-plan).

### Linking an existing Supabase organization

Linking an existing organization will result in the following:

- The organization will be upgraded or downgraded to the plan purchased on the AWS Marketplace.
- The organization’s billing cycle will be adjusted. The start date will be set to the date your marketplace subscription became active.
- The credit card you have on file with Supabase may receive a closing charge. This charge covers usage costs incurred up until the point when the marketplace subscription became active.

## Prerequisites for linking a Supabase organization to a marketplace subscription

- The Supabase user must have the Owner or Admin role
- There must be no overdue invoices within the organization
- The organization must not already be managed through another marketplace (e.g. Vercel Marketplace)
21 changes: 21 additions & 0 deletions apps/docs/content/guides/platform/aws-marketplace/faq.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
id: 'aws-marketplace-faq'
title: 'AWS Marketplace FAQ'
---

#### The payment for completing the subscription on the AWS Marketplace fails.

For more information on payment errors, refer to the [AWS documentation](https://docs.aws.amazon.com/marketplace/latest/buyerguide/buyer-paying-for-products.html#payment-methods).

#### How can the Spend Cap for an organization managed through the AWS Marketplace be enabled?

For organizations on the Pro Plan that are managed through the AWS Marketplace, the Spend Cap is not available.
In your AWS account, you can set up a budget for marketplace purchases (or for a specific marketplace product) and receive notifications once the budget is exceeded.

#### How to cancel your AWS Marketplace subscription

You can cancel your marketplace subscription within 48 hours of purchase. To do so, open a support ticket via the Supabase dashboard. After the 48-hour period, cancellation is no longer possible. If you cancel within the first 48 hours, the upfront charge for the fixed subscription fee will be refunded. Any usage costs incurred up to that point will not be refunded.

#### Does purchasing Supabase through the AWS Marketplace count toward your AWS spend commitment?

Yes, marketplace purchases do count toward the spend commitment.
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
id: 'getting-started'
title: 'Getting Started'
---

## Before you start

Depending on whether a Supabase organization is managed and billed through the AWS Marketplace or directly through the Supabase platform, there are differences. To help you make an informed decision about which approach is better suited for your needs, you can find an overview of these differences in the table below.

| Feature/Aspect | Managed via AWS Marketplace | Managed directly via Supabase platform |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Available Plans | Pro, Team, Enterprise | Free, Pro, Team, Enterprise |
| Mid-cycle downgrades | No | Yes |
| Cost Control | Spend Cap not available | Spend Cap available |
| Downgrade Behaviour | If a downgrade to the Free Plan causes you to exceed the [free projects limit](/docs/guides/platform/billing-on-supabase#free-plan), all projects will be paused. | If a downgrade to the Free Plan causes you to exceed the [free projects limit](/docs/guides/platform/billing-on-supabase#free-plan), you have the option to prevent pausing by transferring projects. |
| Invoicing | Separate invoices, one for fixed costs and one for usage costs | One invoice for both fixed costs and usage costs |

## Purchase Supabase through the AWS Marketplace

Purchasing Supabase through the AWS Marketplace involves two steps. First, you purchase the corresponding subscription on the marketplace. Then, to complete the setup, you must link this subscription to a Supabase organization on the Supabase platform.

For more details on completing the setup and what it means to link an organization, see our [Account Setup guide](./account-setup).

<StepHikeCompact>
<StepHikeCompact.Step step={1}>
<StepHikeCompact.Details title="Go to the AWS Marketplace" fullWidth>
Go to the [Supabase product page on the AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-zjciuce2qsb3q) and click "View purchase options".
<Image
alt="Supabase product overview on the AWS Marketplace"
src="/docs/img/guides/platform/aws-marketplace-listing-overview.png"
zoomable
/>
</StepHikeCompact.Details>
</StepHikeCompact.Step>
<StepHikeCompact.Step step={2}>
<StepHikeCompact.Details title="Configure the subscription" fullWidth>
Select the desired plan (Pro Plan or Team Plan) and configure whether the subscription should automatically renew after one month.

<Admonition type="danger">

Disabling auto-renewal means that the subscription will be downgraded to the Free Plan after one month.

If the downgrade causes you to exceed the [free projects limit](/docs/guides/platform/billing-on-supabase#free-plan), **all** projects within the organization will be paused. We do not make the decision about which projects continue to run and which are paused. You must then decide which projects you want to keep active and manually reactivate them through the Supabase dashboard.

</Admonition>

<Image
alt="Supabase purchase options on the AWS Marketplace"
src="/docs/img/guides/platform/aws-marketplace-listing-purchase-options.png"
zoomable
/>
</StepHikeCompact.Details>
</StepHikeCompact.Step>
<StepHikeCompact.Step step={3}>
<StepHikeCompact.Details title="Subscribe" fullWidth>
Click "Subscribe" at the bottom of the page.
<Image
alt="Supabase product subscribe"
src="/docs/img/guides/platform/aws-marketplace-listing-subscribe.png"
zoomable
/>
</StepHikeCompact.Details>
</StepHikeCompact.Step>
<StepHikeCompact.Step step={4}>
<StepHikeCompact.Details title="Go to the Supabase platform" fullWidth>
After the payment has been confirmed and your marketplace subscription is active, click "Set up your account" to be redirected to the Supabase platform.
<Image
alt="Supabase product subscribe"
src="/docs/img/guides/platform/aws-marketplace-listing-success.png"
zoomable
/>
</StepHikeCompact.Details>
</StepHikeCompact.Step>
<StepHikeCompact.Step step={5}>
<StepHikeCompact.Details title="Complete the setup on the Supabase platform" fullWidth>
Complete the setup by linking a Supabase organization to the AWS Marketplace subscription.
<Image
alt="Supabase product subscribe"
src={{
dark: '/docs/img/guides/platform/aws-marketplace-onboarding-page--dark.png',
light: '/docs/img/guides/platform/aws-marketplace-onboarding-page--light.png',
}}
zoomable
/>
</StepHikeCompact.Details>
</StepHikeCompact.Step>

</StepHikeCompact>
32 changes: 32 additions & 0 deletions apps/docs/content/guides/platform/aws-marketplace/invoices.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
id: 'invoices'
title: 'Invoices'
---

## Where to find your invoices

You can view your invoices in the [AWS Billing and Cost Management console](https://console.aws.amazon.com/billing/home#/bills) under the "Bills" section.

<Image
alt="Subscription upgrade modal"
src="/docs/img/guides/platform/aws-marketplace-invoices.png"
zoomable
/>

## What invoices you get from AWS

You'll receive two invoices for your marketplace subscription.

### Invoice 1 - charge type "subscription"

- What for: The fixed subscription fee paid in advance
- When: At the time of subscription, and in subsequent months on the same day of the month the subscription was started

### Invoice 2 - charge type "usage"

- What for: Usage that exceeds the quota included in the plan, or usage not covered by the plan (e.g. Custom Domain add-on, IPv4 add-on, additionally provisioned Disk IOPS).
- When: No later than the third day of the month for the previous month. This is independent of your subscription’s billing cycle and instead covers the period from the first to the last day of the previous month.

## More information

- Detailed explanations of how each usage item is billed, independent of the AWS Marketplace. Refer to the [Manage Your Usage guide](../manage-your-usage).
Loading
Loading