# Amazon RDS (/integrations/rds)



{/* MANUAL-CONTENT-START:intro */}

Use [Amazon RDS Aurora Serverless](https://aws.amazon.com/rds/aurora/serverless/) through the Data API to query or modify rows, execute SQL, and inspect the database schema from a workflow.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Integrate Amazon RDS Aurora Serverless into the workflow using the Data API. Can query, insert, update, delete, and execute raw SQL without managing database connections.

## Actions [#actions]

### RDS Query [#rds-query]

Execute a SELECT query on Amazon RDS using the Data API

#### Input [#input]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `region` | string | Yes | AWS region (e.g., us-east-1) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster (e.g., arn:aws:rds:us-east-1:123456789012:cluster:my-cluster) |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name to connect to (e.g., mydb, production\_db) |
| `query` | string | Yes | SQL SELECT query to execute (e.g., SELECT \* FROM users WHERE status = :status) |

#### Output [#output]

| Parameter | Type | Description |
| - | - | - |
| `message` | string | Operation status message |
| `rows` | array | Array of rows returned from the query |
| `rowCount` | number | Number of rows returned |

### RDS Insert [#rds-insert]

Insert data into an Amazon RDS table using the Data API

#### Input [#input-1]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `region` | string | Yes | AWS region (e.g., us-east-1) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster (e.g., arn:aws:rds:us-east-1:123456789012:cluster:my-cluster) |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name to connect to (e.g., mydb, production\_db) |
| `table` | string | Yes | Table name to insert into |
| `data` | object | Yes | Data to insert as key-value pairs |

#### Output [#output-1]

| Parameter | Type | Description |
| - | - | - |
| `message` | string | Operation status message |
| `rows` | array | Array of inserted rows |
| `rowCount` | number | Number of rows inserted |

### RDS Update [#rds-update]

Update data in an Amazon RDS table using the Data API

#### Input [#input-2]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `region` | string | Yes | AWS region (e.g., us-east-1) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster (e.g., arn:aws:rds:us-east-1:123456789012:cluster:my-cluster) |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name to connect to (e.g., mydb, production\_db) |
| `table` | string | Yes | Table name to update |
| `data` | object | Yes | Data to update as key-value pairs |
| `conditions` | object | Yes | Conditions for the update (e.g., \{"id": 1}) |

#### Output [#output-2]

| Parameter | Type | Description |
| - | - | - |
| `message` | string | Operation status message |
| `rows` | array | Array of updated rows |
| `rowCount` | number | Number of rows updated |

### RDS Delete [#rds-delete]

Delete data from an Amazon RDS table using the Data API

#### Input [#input-3]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `region` | string | Yes | AWS region (e.g., us-east-1) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster (e.g., arn:aws:rds:us-east-1:123456789012:cluster:my-cluster) |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name to connect to (e.g., mydb, production\_db) |
| `table` | string | Yes | Table name to delete from |
| `conditions` | object | Yes | Conditions for the delete (e.g., \{"id": 1}) |

#### Output [#output-3]

| Parameter | Type | Description |
| - | - | - |
| `message` | string | Operation status message |
| `rows` | array | Array of deleted rows |
| `rowCount` | number | Number of rows deleted |

### RDS Execute [#rds-execute]

Execute raw SQL on Amazon RDS using the Data API

#### Input [#input-4]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `region` | string | Yes | AWS region (e.g., us-east-1) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster (e.g., arn:aws:rds:us-east-1:123456789012:cluster:my-cluster) |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name to connect to (e.g., mydb, production\_db) |
| `query` | string | Yes | Raw SQL query to execute (e.g., CREATE TABLE users (id SERIAL PRIMARY KEY, name VARCHAR(255))) |

#### Output [#output-4]

| Parameter | Type | Description |
| - | - | - |
| `message` | string | Operation status message |
| `rows` | array | Array of rows returned or affected |
| `rowCount` | number | Number of rows affected |

### RDS Introspect [#rds-introspect]

Introspect Amazon RDS Aurora database schema to retrieve table structures, columns, and relationships

#### Input [#input-5]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `region` | string | Yes | AWS region (e.g., us-east-1) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster (e.g., arn:aws:rds:us-east-1:123456789012:cluster:my-cluster) |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name to connect to (e.g., mydb, production\_db) |
| `schema` | string | No | Schema to introspect (default: public for PostgreSQL, database name for MySQL) |
| `engine` | string | No | Database engine (aurora-postgresql or aurora-mysql). Auto-detected if not provided. |

#### Output [#output-5]

| Parameter | Type | Description |
| - | - | - |
| `message` | string | Operation status message |
| `engine` | string | Detected database engine type |
| `tables` | array | Array of table schemas with columns, keys, and indexes |
| `schemas` | array | List of available schemas in the database |
