# Can AWX Operator use Aurora Serverless v2 as its database?

**URL:** <https://forum.ansible.com/t/can-awx-operator-use-aurora-serverless-v2-as-its-database/40966>\
**Category:** Get Help\
**Tags:** kubernetes, awx-operator, aws, awx, postgresql\
**Created:** [March 12, 2025, 1:51am UTC](https://forum.ansible.com/t/can-awx-operator-use-aurora-serverless-v2-as-its-database/40966 "2025-03-12T01:51:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![satokom](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@satokom](https://forum.ansible.com/u/satokom)\
**Post date:** [March 12, 2025, 1:51am UTC](https://forum.ansible.com/t/can-awx-operator-use-aurora-serverless-v2-as-its-database/40966/1 "2025-03-12T01:51:53Z")

</div>

### **Description of the Issue**

I am currently using **AWX Operator 2.10.0** , which, by default, provisions a **PostgreSQL 13** database running as a **StatefulSet** within Kubernetes. This database is automatically managed by the AWX Operator’s control manager.

#### **Environment Details**

- **AWX Operator Version** : 2.10.0
- **PostgreSQL Version** : 13 (default, running as a StatefulSet)
- **Kubernetes Platform** : AWS EKS
- **Current DB Setup** : PostgreSQL 13, managed by AWX Operator
- **Planned Change** : Migrating to an external database (AWS Aurora PostgreSQL)

* * *

### **Issue / Question**

To improve redundancy, I understand that **migrating to an external database** is required.  
We are considering migrating to **AWS Aurora PostgreSQL** and exploring the possibility of using **Aurora Serverless v2** instead of a provisioned instance.  
According to AWS documentation, Aurora Serverless v2 is available:  
🔗 [Aurora Serverless v2 Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html)

Can **Aurora Serverless v2** be used as the **database for AWX Operator**?  
Are there any known **success cases, limitations, or official support statements** regarding this setup?

* * *

### **Steps to Reproduce / Test Plan**

We plan to:

1. Create an **Aurora Serverless v2 cluster**.
2. Configure **AWX Operator to use the Aurora database endpoint** in place of the default PostgreSQL instance.
3. Run **AWX tasks and monitor behavior** to ensure compatibility and stability.

* * *

### **Additional Concerns**

- Since **Aurora Serverless v2 operates within a VPC** , will AWX Operator be able to connect **without issues**?
- Will AWX jobs experience **delays due to Aurora’s auto-scaling behavior** (e.g., during scale-up events)?
- Are there any **known limitations** when using **Aurora Serverless v2 as AWX’s database**?

If anyone has experience running **AWX Operator with Aurora Serverless v2** , we would greatly appreciate any insights.  
Thank you!

---

<div class="post-metadata">

**Author:** ![satokom](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@satokom](https://forum.ansible.com/u/satokom)\
**Post date:** [May 1, 2025, 9:55am UTC](https://forum.ansible.com/t/can-awx-operator-use-aurora-serverless-v2-as-its-database/40966/2 "2025-05-01T09:55:59Z")

</div>

> **Disclaimer:** The following steps describe what worked in **our specific environment** and are provided **for reference only**. Make sure to validate everything in your own setup before applying.

## Solution & Migration Notes (Closing Issue)

**Short answer:** Yes—AWX Operator works fine with **Amazon Aurora PostgreSQL Serverless v2**.  
We have completed the migration from the in-cluster PostgreSQL 13 StatefulSet to Aurora Serverless v2 in production with no functional or performance regressions.

* * *

### References used

- AWX Operator docs – **External DB configuration**  
[https://github.com/ansible/awx-operator/blob/devel/docs/user-guide/database-configuration.md](https://github.com/ansible/awx-operator/blob/devel/docs/user-guide/database-configuration.md)
- Related discussion – “external PG dump/restore” (#1407)  
[https://github.com/ansible/awx-operator/issues/1407](https://github.com/ansible/awx-operator/issues/1407)

* * *

### Step-by-step migration

1. **Provision Aurora Serverless v2**

2. **Dump the in-cluster database**

```bash
# inside the running postgres-13 pod
pg_dump -Fc awx > /tmp/awx.dump

```

1. **Restore into Aurora**

```bash
pg_restore -h <aurora-endpoint> -U awx -d awx -Fc /tmp/awx.dump

```

4.Sanity check (example):\*

```sql
SELECT * FROM main_jobevent_20250402_01 LIMIT 10;

```

1. **Create a Secret with Aurora connection details**

```yaml

apiVersion: v1
kind: Secret
metadata:
  name: awx-operator-postgres-configuration
type: Opaque
stringData:
  host: aurora-cluster.cluster-xxxxxxxxxx.ap-northeast-1.rds.amazonaws.com
  port: "5432"
  database: awx
  username: awx
  password: "<strong-password>"

```

1. **Point AWX Operator at the new Secret**

```yaml
spec:
  postgres_configuration_secret: awx-operator-postgres-configuration

```

7.Apply → the AWX **web** & **task** pods perform a rolling update and reconnect to Aurora.\*  
8. **Validate**

- Run a few inventories / playbooks → OK
- Monitor Aurora metrics (`CommitLatency`, `QueryLatency`) → no spikes during ACU scaling events

1. **Clean up in-cluster PostgreSQL**

```bash
kubectl delete statefulset awx-postgres-13 -n awx
kubectl delete pvc -l app.kubernetes.io/name=postgresql -n awx

```
