---
schema_version: "1"
id: 97bb4f4e84a8024bff8f8c0bad0cdee87942022fdbbd2f2e7fe411852655e016
title: Amazon RDS Connector 1.4
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/amazon-rds-connector/latest/index.md
canonical_url: https://docs.mulesoft.com/amazon-rds-connector/latest/
source_site: docs.mulesoft.com
content_type: documentation
content_hash: a0735ee3e27cd544f1ce5ec8f7d43167beed5a48d8fabca3dae1e8095132e8eb
description: MuleSoft Documentation Site
release: "1.4"
latest: true
---
---
product: Amazon RDS Connector
version: 1.4
is-latest-version: true
---

# Amazon RDS Connector 1.4

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

> [!NOTE] Where possible, we changed noninclusive terms to align with our company value of Equality.
> We maintained certain terms to avoid any effect on customer implementations.

Anypoint Connector for Amazon RDS (Amazon RDS Connector) provides connectivity to the Amazon
Relational Database Service (Amazon RDS) API. Amazon RDS Connector enables you to interface with
Amazon RDS, which provides cost-efficient and resizable capacity and automation of time-consuming
administration tasks such as hardware provisioning, database setup, patching, and backups.

## Before You Begin

To use the Amazon RDS Connector, you must have the following:

- Access to Amazon Web Services - RDS

- AWS Identity and Access Management (IAM) user account credentials to access AWS with the connector

## POM File Information

```xml
<dependency>
  <groupId>com.mulesoft.connectors</groupId>
  <artifactId>mule-amazon-rds-connector</artifactId>
  <version>x.x.x</version>
  <classifier>mule-plugin</classifier>
</dependency>
```

## Add the Connector to Your Project

Anypoint Studio provides two ways to add the connector to your Studio project:

- From the Exchange button in the Studio taskbar

- From the Mule Palette view

### Add the Connector Using Exchange

1.  In Studio, create a Mule project.

2.  Click the Exchange icon **(X)** in the upper-left of the Studio task bar.

3.  In Exchange, click **Login** and supply your Anypoint Platform username and password.

4.  In Exchange, search for "rds".

5.  Select the connector and click **Add to project**.

6.  Follow the prompts to install the connector.

### Add the Connector in Studio

1.  In Studio, create a Mule project.

2.  In the Mule Palette view, click **(X) Search in Exchange**.

3.  In **Add Modules to Project**, type "rds" in the search field.

4.  Click this connector’s name in **Available modules**.

5.  Click **Add**.

6.  Click **Finish**.

## Configure the Connector Global Element

To use Amazon RDS Connector in your Mule application, configure a global Amazon RDS element that all
the Amazon RDS connectors in your project can use.

1.  Click the **Global Elements** tab at the bottom of the canvas.

2.  On the Global Configuration Elements screen, click **Create**.  
    The following window displays:

    ![Global Configuration Elements Wizard](/mulesoft/current/en-us/amazon-rds-connector/latest/_images/amazon-rds-config-global-wizard.png)

3.  In the Choose Global Type wizard, expand **Connector Configuration**, select **Amazon RDS
    Configuration**, and click **Ok**.  
    The following window displays:

    ![Create DB Instance Configure](/mulesoft/current/en-us/amazon-rds-connector/latest/_images/amazon-rds-create-db-instance-config.png)

4.  Configure the parameters according to instructions below:

    <table><colgroup><col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>Enter a name for the configuration for the connector to reference.</p></div></div></td></tr><tr><td><p><strong>Session Token</strong></p></td><td><div><div><p>Enter the session token provided by AWS Security Token Service (STS).</p></div></div></td></tr><tr><td><p><strong>Access Key</strong></p></td><td><div><div><p>Enter an alphanumeric text string that uniquely identifies the user who owns the account.</p></div></div></td></tr><tr><td><p><strong>Secret Key</strong></p></td><td><div><div><p>Enter the key that is used as a password.</p></div></div></td></tr><tr><td><p><strong>Try Default AWS Credentials Provider Chain</strong></p></td><td><div><div><p>Select the checkbox to use temporary credentials.</p></div></div></td></tr><tr><td><p><strong>Region Endpoint</strong></p></td><td><div><div><p>Select the region to use for the Amazon RDS client. When you do not select a region, it defaults to 'us-east-1'.</p></div></div></td></tr></tbody></table>

    Placeholder values refer to a configuration file `mule-artifact.properties` placed in the
    `src/main/resources` folder of your project. You can either enter your credentials into the
    global configuration properties, or reference a configuration file that contains these values.
    For simpler maintenance and better reusability of your project, MuleSoft recommends that you use
    a configuration file. Keeping these values in a separate file is useful if you need to deploy to
    different environments, such as production, development, and QA, where your access credentials
    differ.

5.  On the Advanced tab, keep the Reconnection strategy default entries.

6.  Click **Test Connection** to confirm that the parameters of your global configuration are
    accurate, and that Mule is able to successfully connect to Amazon RDS.

7.  Click **OK** to save the global connector configurations.

### Configure With the XML Editor or Standalone

Ensure that you include the Amazon RDS namespaces in your configuration file.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	xmlns:rds="http://www.mulesoft.org/schema/mule/rds"
	xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:spring="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-current.xsd
	http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
	http://www.mulesoft.org/schema/mule/http
	http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
	http://www.mulesoft.org/schema/mule/rds
	http://www.mulesoft.org/schema/mule/rds/current/mule-rds.xsd
	http://www.mulesoft.org/schema/mule/ee/core
	http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd">

<!-- Put your flows and configuration elements here -->

</mule>
```

To configure Amazon RDS Connector in your application, create a global Amazon RDS configuration
outside and above your flows, using the following global configuration code:

```xml
<rds:config name="Amazon_RDS_Configuration">
	<rds:basic-connection
		accessKey="${config.accessKey}"
		secretKey="${config.secretKey}"
		region="${config.region}"/>
</rds:config>
```

If you or your Amazon Identity and Access Management users forget or lose the secret access key, you
can create a new access key.

## Use the Connector

Amazon RDS connector is an operation-based connector, which means that when you add the connector to
your flow, you need to configure a specific web service operation for the connector to perform.

## Connector Namespace and Schema

When designing your application in Studio, the act of dragging the connector operation from the
palette onto the Anypoint Studio canvas should automatically populate the XML code with the
connector namespace and schema location.

Namespace: `http://www.mulesoft.org/schema/mule/rds`

Schema Location: `http://www.mulesoft.org/schema/mule/rds/current/mule-rds.xsd`

If you are manually coding the Mule application in the Studio XML editor or other text editor, paste
the namespace and schema location into the header of your Configuration XML, inside the `<mule>`
tag.

```xml
<mule xmlns:rds="http://www.mulesoft.org/schema/mule/rds"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:spring="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-current.xsd
	http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
	http://www.mulesoft.org/schema/mule/rds
	http://www.mulesoft.org/schema/mule/rds/current/mule-rds.xsd">

      <!-- here it goes your global configuration elements and flows -->

</mule>
```

## Use Cases and Demos

- Create a DB instance of your choice over all the Amazon supported databases.

- Stop a DB instance that is available or in a running state.

- Start a DB instance that is in a stopped state.

- Retrieve information on one or all available DB instances.

- Create a DB snapshot for a DB instance.

- Retrieve information on one or all available DB snapshots.

- Delete a DB snapshot.

## Use the Connector in a Mule App in Studio

If you are developing a Mule application in Anypoint Studio 7.x, use this XML snippet in your
pom.xml file:

```xml
<dependency>
    <groupId>com.mulesoft.connectors</groupId>
    <artifactId>mule-amazon-rds-connector</artifactId>
    <version>x.x.x</version>
    <classifier>mule-plugin</classifier>
</dependency>
```

Replace `x.x.x` with the version that corresponds to the connector you are using.

### Create a Database Instance

This demo Mule application creates a DB instance.

![Creating a DB instance](/mulesoft/current/en-us/amazon-rds-connector/latest/_images/amazon-rds-create-db-instance-use-case-flow.png)

1.  Create a new Mule Project in Anypoint Studio.

2.  Add the following properties to the `mule-artifact.properties` file for your Amazon RDS
    credentials and place it in the project’s `src/main/resources` directory.

    ```text
    config.accesskey=<Access Key>
    config.secretkey=<Secret Key>
    config.region=<Region>
    ```

3.  Drag an HTTP Listener operation onto the canvas and configure the following parameters:

    ![RDS HTTP config props](/mulesoft/current/en-us/amazon-rds-connector/latest/_images/amazon-rds-http-props.png)

    <table><colgroup><col> <col></colgroup><thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Display Name</strong></p></td><td><div><div><p>Listener</p></div></div></td></tr><tr><td><p><strong>Extension Configuration</strong></p></td><td><div><div><p>If no HTTP element has been created yet, click the plus sign to add a new HTTP Listener Configuration and click OK (leave the values to its defaults).</p></div></div></td></tr><tr><td><p><strong>Path</strong></p></td><td><div><div><p><code>/create-db-instance</code></p></div></div></td></tr></tbody></table>

4.  Drag a Transform Message component after the HTTP connector to retrieve the HTTP query
    parameters and set the payload.

5.  Click the component to open its properties editor.  
    The DataWeave script should look similar to the following:

    ```dataweave
    %dw 2.0
    output application/java
    ---
    {
    	dbInstanceClass : attributes.queryParams.dbInstanceClass,
    	dbInstanceIdentifier : attributes.queryParams.dbInstanceIdentifier,
    	engine : attributes.queryParams.engine,
    	allocatedStorage : attributes.queryParams.allocatedStorage,
    	masterUsername : attributes.queryParams.masterUsername,
    	masterUserPassword : attributes.queryParams.masterUserPassword
    }
    ```

6.  Add a Logger component after the Transform Message component to print the payload data that was
    set in the previous processor to the Mule Console.

7.  Configure the Logger according to the table below:

    <table><colgroup><col> <col></colgroup><thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Display Name</strong></p></td><td><div><div><p>Logger (or any other name you prefer)</p></div></div></td></tr><tr><td><p><strong>Message</strong></p></td><td><div><div><p><code>#[payload]</code></p></div></div></td></tr><tr><td><p><strong>Level</strong></p></td><td><div><div><p>INFO</p></div></div></td></tr></tbody></table>

8.  Drag the Amazon RDS Connector next to the Logger component.

9.  Configure the RDS connector by adding a new Amazon RDS Global Element:

    1.  Click the plus sign next to the Extension Configuration field.

    2.  Configure the global element according to the table below:

        <table><colgroup><col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Value</strong></p></td><td><div><div><p>Name</p></div></div></td></tr><tr><td><p><strong>Enter a name for the configuration for the connector to reference.</strong></p></td><td><div><div><p>&lt;Configuration_Name&gt;</p></div></div></td></tr><tr><td><p><strong>Session Token</strong></p></td><td><div><div><p>Session token provided by AWS Security Token Service (STS)</p></div></div></td></tr><tr><td><p><strong><code>${config.sessiontoken}</code></strong></p></td><td><div><div><p>Access Key</p></div></div></td></tr><tr><td><p><strong>Alphanumeric text string that uniquely identifies the user who owns the account</strong></p></td><td><div><div><p><code>${config.accesskey}</code></p></div></div></td></tr><tr><td><p><strong>Secret Key</strong></p></td><td><div><div><p>Key that plays the role of a password</p></div></div></td></tr><tr><td><p><strong><code>${config.secretkey}</code></strong></p></td><td><div><div><p>Region Endpoint</p></div></div></td></tr><tr><td><p><strong>Region to set for the Amazon RDS Client</strong></p></td><td><div><div><p>When not selected from the drop down list, it defaults to 'us-east-1'.</p></div></div></td></tr></tbody></table>

    3.  Your configuration should look like this:

        ![RDS use case config](/mulesoft/current/en-us/amazon-rds-connector/latest/_images/amazon-rds-create-db-instance-config.png)

    4.  The corresponding XML configuration should be as follows:

        ```xml
        <rds:config name="Amazon_RDS_Configuration">
            <rds:basic-connection accessKey="${config.accessKey}" secretKey="${config.secretKey}"/>
        </rds:config>
        ```

10. Click **Test Connection** to confirm that Mule can connect with the Amazon RDS instance.

11. If the connection is successful, click **OK** to save the configurations. Otherwise, review or
    correct any incorrect parameters, then test again.

12. Back in the properties editor of the Amazon RDS connector, configure the parameters for the
    createDbInstance operation:

    <table><colgroup><col> <col></colgroup><thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td colspan="2"><p><strong>General</strong></p></td></tr><tr><td><p><strong>Display Name</strong></p></td><td><div><div><p>Enter a the name to display for the Create DB instance.</p></div></div></td></tr><tr><td><p><strong>Extension Configuration</strong></p></td><td><div><div><p>Enter the reference name to the global element you created.</p></div></div></td></tr><tr><td><p><strong>Db instance class</strong></p></td><td><div><div><p><code>#[payload.dbInstanceClass]</code></p></div></div></td></tr><tr><td><p><strong>Db instance identifier</strong></p></td><td><div><div><p>Enter a valid identifier to uniquely identify the DB instance.</p></div></div></td></tr><tr><td><p><strong>Engine</strong></p></td><td><div><div><p>Choose from among the six DB engines that Amazon RDS supports.</p></div></div></td></tr><tr><td colspan="2"><p><strong>Security</strong></p></td></tr><tr><td><p><strong>Master username</strong></p></td><td><div><div><p>Enter a valid user name for the database.</p></div></div></td></tr><tr><td><p><strong>Master user password</strong></p></td><td><div><div><p>Enter the password for the database user.</p></div></div></td></tr><tr><td colspan="2"><p><strong>Storage and Maintenance</strong></p></td></tr><tr><td><p><strong>Allocated storage</strong></p></td><td><div><div><p>A number representing the storage in GB.</p></div></div></td></tr></tbody></table>

    ![Create DB instance parameter props](/mulesoft/current/en-us/amazon-rds-connector/latest/_images/amazon-rds-create-db-instance-param-config.png)

13. Verify that your XML looks like this:

    ```xml
    <rds:create-db-instance
    	config-ref="Amazon_RDS_Configuration"
    	dbInstanceClass="#[payload.dbInstanceClass]"
    	dbInstanceIdentifier="#[payload.dbInstanceIdentifier]"
    	engine="#[payload.engine]"
    	allocatedStorage="#[payload.allocatedStorage]"
    	doc:name="Create db instance"
    	masterUsername="#[payload.masterUsername]"
    	masterUserPassword="#[payload.masterUserPassword]"/>
    ```

14. Add a Logger component after the RDS connector to print the payload data that was output from
    the Create DB instance processor to the Mule Console. Configure the Logger according to the
    table below.

    <table><colgroup><col> <col></colgroup><thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td><p><strong>Display Name</strong></p></td><td><div><div><p>Logger (or any other name you prefer)</p></div></div></td></tr><tr><td><p><strong>Message</strong></p></td><td><div><div><p><code>#[payload]</code></p></div></div></td></tr><tr><td><p><strong>Level</strong></p></td><td><div><div><p>INFO</p></div></div></td></tr></tbody></table>

15. Drag a Transform Message component after the Logger component to set the payload that would be
    transferred to the browser.

16. Click the component to open its properties editor. The DataWeave script should look similar to
    the following:

    ```dataweave
    %dw 2.0
    output application/json
    ---
    {
        success: true,
        info: payload
    }
    ```

17. Save and Run the project as a Mule Application:  
    In Package Explorer, right-click the project and click **Run As > Mule Application**.

18. Open a browser and check the response after entering the URL
    `http://localhost:8081/create-db-instance`.  
    You should see the generated DB instance ID in the browser and its information in the console.

### Demo XML Code

Paste this code into your XML Editor to load the flow for this example use case into your Mule
application.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	xmlns:rds="http://www.mulesoft.org/schema/mule/rds"
	xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:spring="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-current.xsd
	http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
	http://www.mulesoft.org/schema/mule/http
	http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
	http://www.mulesoft.org/schema/mule/rds
	http://www.mulesoft.org/schema/mule/rds/current/mule-rds.xsd
	http://www.mulesoft.org/schema/mule/ee/core
	http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd">

	<http:listener-config
		name="HTTP_Listener_config"
		doc:name="HTTP Listener config">
		<http:listener-connection
			host="127.0.0.1"
			port="8081" />
	</http:listener-config>

	<rds:config
		name="Amazon_RDS_Configuration"
		doc:name="Amazon RDS Configuration">
		<rds:basic-connection
			accessKey="${config.accessKey}"
			secretKey="${config.secretKey}" />
	</rds:config>

	<flow name="create-db-instance-flow">
		<http:listener
			config-ref="HTTP_Listener_config"
			path="/create-db-instance"
			doc:name="Listener"/>
		<ee:transform doc:name="Transform Message">
			<ee:message >
				<ee:set-payload ><![CDATA[%dw 2.0
output application/java
---
{
	dbInstanceClass : attributes.queryParams.dbInstanceClass,
	dbInstanceIdentifier : attributes.queryParams.dbInstanceIdentifier,
	engine : attributes.queryParams.engine,
	allocatedStorage : attributes.queryParams.allocatedStorage,
	masterUsername : attributes.queryParams.masterUsername,
	masterUserPassword : attributes.queryParams.masterUserPassword
}]]></ee:set-payload>
			</ee:message>
		</ee:transform>

		<logger level="INFO" doc:name="Logger" message="#[payload]"/>
		<rds:create-db-instance
			config-ref="Amazon_RDS_Configuration"
			dbInstanceClass="#[payload.dbInstanceClass]"
			dbInstanceIdentifier="#[payload.dbInstanceIdentifier]"
			engine="#[payload.engine]"
			allocatedStorage="#[payload.allocatedStorage]"
			doc:name="Create db instance"
		 	masterUsername="#[payload.masterUsername]"
			masterUserPassword="#[payload.masterUserPassword]"/>

		 <logger level="INFO" doc:name="Logger" message="#[payload]"/>

		<ee:transform doc:name="Transform Message">
			<ee:message >
				<ee:set-payload ><![CDATA[%dw 2.0
output application/json
---
{
	success: true,
    info: payload
}]]></ee:set-payload>
			</ee:message>
		</ee:transform>

	</flow>

</mule>
```

## See Also

- [Amazon RDS Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-rds-connector-release-notes-mule-4)

- [Amazon RDS Connector](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-amazon-rds-connector/)

- [Salesforce Help](https://help.salesforce.com)
