> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon Aurora (MySQL)

## Overview

Stigg's integration with Amazon Aurora (MySQL-compatible) allows you to export your product catalog, customer, and subscription data directly to your Aurora cluster for custom reporting and analysis.

<Note>
  Stigg's native data export integrations are included in the Scale plan, and are also available as an optional add-on to the Growth plan. See Stigg's pricing for more details.
</Note>

<Card title="View the full entity schema" icon="sitemap" href="./schema">
  See every table and column exported to your destination, organized by entity group.
</Card>

## Setting up the integration

### Prerequisites

You'll need an Aurora MySQL cluster with a database and a user that has permission to create tables and write data in the target schema. Aurora MySQL 3.x (MySQL 8.0-compatible) is fully supported; Aurora MySQL 2.x is supported on a best-effort basis.

<Steps>
  <Step title="Allow access">
    In the [RDS console](https://console.aws.amazon.com/rds/), go to **Databases** and select your Aurora MySQL instance. On the **Connectivity & security** tab, note the **Endpoint** and **Port** (usually `3306`).

    Confirm the **Publicly accessible** setting is set to **Yes** — it's still only reachable through whitelisted IPs at this point. If you're connecting via SSH tunnel instead, this can be left as **No**.

    You may need to select the **Writer instance** in the DB identifier list to reveal its endpoint — this is the endpoint to use, since Stigg needs to write data.

    Click the VPC security group (usually `default`) attached to the Writer instance, then click **Edit inbound rules > Add rule**:

    | Field      | Value                                                                                                    |
    | ---------- | -------------------------------------------------------------------------------------------------------- |
    | Type       | Custom TCP                                                                                               |
    | Port range | The port noted above (usually `3306`)                                                                    |
    | Source     | Stigg's static IP, in `/32` CIDR notation (or the bastion host's security group, if using SSH tunneling) |

    Save the rule.

    <Note>
      Also check the **Network ACL** attached to the cluster's VPC. From the RDS instance's VPC, open the **Main network ACL** and confirm there's an inbound rule allowing traffic on the database port from Stigg's static IP (most default ACLs already allow this via a `0.0.0.0/0` rule), and an outbound rule allowing ports `1024`–`65535` to `0.0.0.0/0`.
    </Note>

    <Note>
      If your cluster isn't accessible from the public internet, SSH tunneling through a bastion host is supported instead: allow inbound SSH (port `22`) from Stigg's static egress IP on the bastion host, create an SSH user with Stigg's public key in `~/.ssh/authorized_keys` ([contact Stigg support](mailto:support@stigg.io) for the key), and use the bastion host's security group as the source in the inbound rule above instead of Stigg's static IP. Provide the bastion host address, port, and username in the connection form.
    </Note>
  </Step>

  <Step title="Create a writer user">
    Create the database user Stigg will connect as, and grant it the required privileges:

    <CodeGroup>
      ```sql Create user theme={null}
      CREATE USER <username>@'%' IDENTIFIED BY '<some-password>';
      GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, CREATE TEMPORARY TABLES, CREATE VIEW ON *.* TO <username>@'%';
      ```
    </CodeGroup>

    If you're pre-creating the schema rather than letting Stigg create it on first sync, grant privileges on that schema only instead:

    <CodeGroup>
      ```sql Grant on pre-created schema theme={null}
      GRANT ALL PRIVILEGES ON <database_name>.* TO <username>@'%';
      ```
    </CodeGroup>

    <Warning>
      Avoid special characters (`@`, `[`, `]`, `/`, `?`, `#`, `"`, `\`, `+`, spaces, `&`, `:`, `%`) in the username and password — they can break connection string parsing.
    </Warning>
  </Step>

  <Step title="Connect Stigg with Aurora (MySQL)">
    In [Stigg](https://app.stigg.io/), navigate to **Integrations > Apps > Amazon Aurora (MySQL)**.

    Enter the following information in the connection form:

    | Field    | Description                                                |
    | -------- | ---------------------------------------------------------- |
    | Host     | The Aurora cluster's writer endpoint from your RDS console |
    | Port     | The port Aurora listens on. Defaults to `3306`.            |
    | Database | The name of the target database                            |
    | Schema   | The schema where Stigg will create and sync tables         |
    | Username | The database user Stigg will authenticate as               |
    | Password | The password for the database user                         |

    Click **Test & connect**.
  </Step>

  <Step title="Select entities to export">
    After entering your connection details, expand the **Entities to export** section to choose which entity groups to include in the sync. All groups are selected by default.

    See [Exported entities](./overview#exported-entities) for a description of each group.
  </Step>
</Steps>


## Related topics

- [Exported entities](/documentation/importing-and-exporting-data/export/overview.md#exported-entities)
- [Sync process, schedule, manual sync, and sync history](/documentation/importing-and-exporting-data/export/overview.md#sync-process)
