Skip to content
GitHubXDiscordRSS

DataProvider

Learn how to create, update, and manage AWS DMS DataProviders using Alchemy Cloud Control.

The DataProvider resource allows you to manage AWS DMS DataProviders for database migration tasks, enabling you to specify the source and target database connections.

Create a basic DataProvider with required properties and one optional property.

import AWS from "alchemy/aws/control";
const basicDataProvider = await AWS.DMS.DataProvider("myDataProvider", {
Engine: "mysql",
DataProviderName: "MyMySQLDataProvider"
});

Configure a DataProvider with additional settings such as description and tags.

const advancedDataProvider = await AWS.DMS.DataProvider("advancedDataProvider", {
Engine: "postgres",
DataProviderName: "MyPostgresDataProvider",
Description: "This is a data provider for PostgreSQL databases",
Tags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Project", Value: "MigrationProject" }
]
});

Create a DataProvider with ExactSettings enabled to ensure that the settings are strictly applied.

const exactSettingsProvider = await AWS.DMS.DataProvider("exactSettingsDataProvider", {
Engine: "oracle",
DataProviderName: "MyOracleDataProvider",
ExactSettings: true,
Description: "Data provider with strict settings for Oracle"
});

Configure a DataProvider that adopts an existing resource instead of failing if it already exists.

const adoptExistingProvider = await AWS.DMS.DataProvider("adoptDataProvider", {
Engine: "sqlserver",
DataProviderIdentifier: "existing-sqlserver-provider",
adopt: true,
DataProviderName: "AdoptedSQLServerProvider"
});

Demonstrate a complete configuration with a variety of settings.

const completeDataProvider = await AWS.DMS.DataProvider("completeDataProvider", {
Engine: "mongodb",
DataProviderName: "MyMongoDBDataProvider",
Description: "Full configuration for MongoDB",
ExactSettings: true,
Settings: {
// Example settings structure, replace with actual settings as needed
"MongodUri": "mongodb://username:password@host:port/dbname"
},
Tags: [
{ Key: "Department", Value: "IT" },
{ Key: "Owner", Value: "DataTeam" }
]
});