AWS dms: DMS Virtual Mode: Oracle support, optional Secret/IAM role
Summary
Expands DMS Schema Conversion Virtual Mode offline source to Oracle, makes Secret and IAM role optional for virtual-mode data providers, and updates DDL script requirements for SQL Server and Oracle.
Security assessment
Documents that virtual-mode data providers can omit Secret/IAM role and that any provided Secret must be a Secrets Manager ARN in the same account/Region, but DMS does not validate existence or access. This is credential/IAM handling guidance, not a fix for a specific vulnerability.
Evidence
+For a data provider in **Virtual Mode** , DMS Schema Conversion does not use a **Secret** or **IAM role** to connect to a database. If you provide a **Secret** for the data provider, it must be an AWS Secrets Manager secret ARN. The ARN must be in the same AWS account and AWS Region as the migration project. DMS Schema Conversion saves the value but does not check whether the secret exists or that you have access to it.
Diff
diff --git a/dms/latest/userguide/virtual-data-provider.md b/dms/latest/userguide/virtual-data-provider.md index cb46165..1350f9d 100644 --- a//dms/latest/userguide/virtual-data-provider.md +++ b//dms/latest/userguide/virtual-data-provider.md @@ -13 +13 @@ AWS Database Migration Service (DMS) offers **Virtual Mode** for data providers - * Offline source – Convert schemas from exported script files without connecting to your source database. Use this when direct connectivity to your source database is not available. **Virtual Mode** for offline source is currently available for Microsoft SQL Server source databases. + * Offline source – Convert schemas from exported script files without connecting to your source database. Use this when direct connectivity to your source database is not available. **Virtual Mode** for offline source is currently available for Microsoft SQL Server and Oracle source databases. @@ -32 +32 @@ To create a data provider in **Virtual Mode** , turn on **Virtual Mode** on the - 3. For **Secret** , choose any existing valid secret. + 3. If the selected source or target data provider has **Virtual Mode** turned on, **Secret** and **IAM role** are optional for that data provider. You can leave them empty, or provide one or both. @@ -36 +36 @@ To create a data provider in **Virtual Mode** , turn on **Virtual Mode** on the -When you create or modify a migration project, you specify a Secret and an IAM role for all data providers, including data providers with **Virtual Mode** turned on. For data providers in **Virtual Mode** , these credentials are not used to connect to a database. +For a data provider in **Virtual Mode** , DMS Schema Conversion does not use a **Secret** or **IAM role** to connect to a database. If you provide a **Secret** for the data provider, it must be an AWS Secrets Manager secret ARN. The ARN must be in the same AWS account and AWS Region as the migration project. DMS Schema Conversion saves the value but does not check whether the secret exists or that you have access to it. @@ -38 +38,5 @@ When you create or modify a migration project, you specify a Secret and an IAM r - 4. For **IAM role** , choose the IAM role that has read access to the secret. +For a data provider that does _not_ have **Virtual Mode** turned on, both **Secret** and **IAM role** remain required. + +If you change a data provider from **Virtual Mode** to a direct connection, you must provide both a **Secret** and an **IAM role** for that data provider. Provide them before you launch or refresh the project. + + 4. (Optional) For **IAM role** , select the IAM role that has read access to the secret. @@ -61 +65 @@ When you turn on **Virtual Mode** for a source data provider, you can convert sc -Supported source databases dialects +Supported source database dialects @@ -64 +68 @@ Supported source databases dialects - * DDL scripts exported from Microsoft SQL Server + * DDL scripts exported from Microsoft SQL Server. For more information, see [Export SQL Server database objects](./export-sql-server-database-objects.html). @@ -66,3 +70 @@ Supported source databases dialects -###### Note - -You can export database objects using SQL Server Management Studio (SSMS) or SQL Server Management Objects (SMO). For more information, see [Export SQL Server database objects](./export-sql-server-database-objects.html). + * DDL scripts exported from Oracle Database. For more information, see [Export Oracle database objects](./export-oracle-database-objects.html). @@ -78 +80,6 @@ DDL scripts requirements - * Include a separate `.sql` file with a `CREATE DATABASE` statement for each database. + * Each file contains one `CREATE` statement for the database object. + + * Database objects referenced in the script use schema-qualified names. + + * DMS Schema Conversion applies only the `CREATE` statement in each file. It skips any other `ALTER` or `DROP` statements, except for the dependent-object statements described in the following note. + @@ -80 +86,0 @@ DDL scripts requirements - * Each object file starts with a `USE [`database_name`]` statement that identifies which source database the object belongs to. @@ -82 +87,0 @@ DDL scripts requirements - * Each file contains one `CREATE` statement for the database object. @@ -84 +89,8 @@ DDL scripts requirements - * Database objects referenced in the script use schema-qualified names (for example, `dbo.TableName`). If no schema is specified, `dbo` is used. +###### Note + +The export tool might include additional statements in the same file alongside the primary `CREATE` statement for related dependent objects. DMS Schema Conversion processes these additional statements when they are associated with the primary object. + +Microsoft SQL Server + + +SQL Server DDL scripts also require the following: @@ -86 +98,7 @@ DDL scripts requirements - * Any `ALTER` and `DROP` statements in the file are skipped. + * Include a separate `.sql` file with a `CREATE DATABASE` statement for each database. + + * Each object file must start with a `USE [`database_name`]` statement that identifies which source database the object belongs to. + + * Schema-qualified names use the format `schema.ObjectName` (for example, `dbo.Customers`). + + * If no schema is specified in the object name, `dbo` is used as the default schema. @@ -93 +111 @@ DDL scripts requirements -When exporting, SQL Server may include additional statements in the same file alongside the primary `CREATE` statement. DMS Schema Conversion processes the following: +When exporting from SQL Server, the tool might include additional statements for dependent objects in the same file. For example: @@ -101 +119,30 @@ When exporting, SQL Server may include additional statements in the same file al - * `ALTER TABLE ... ADD CONSTRAINT DEFAULT` – named default constraints + * `ALTER TABLE ... ADD CONSTRAINT` – named constraints + + + + +For information about how to export SQL Server database objects, see [Export SQL Server database objects](./export-sql-server-database-objects.html). + +Oracle + + +Oracle DDL scripts also require the following: + + * Include a separate `.sql` file with a `CREATE USER `schema_name` NO AUTHENTICATION;` statement for each schema. This statement defines the schema node in the object tree. + + * Schema-qualified names use the format `SCHEMA_NAME.OBJECT_NAME` (for example, `HR.EMPLOYEES`). + + + + +###### Note + +When exporting from Oracle, the tool might include additional statements for dependent objects in the same file. For example: + + * `CREATE INDEX` – indexes defined on the table + + * `CREATE TRIGGER` – triggers associated with the table + + * `ALTER TABLE ... ADD CONSTRAINT` – named constraints + + * `ALTER TABLE ... ADD PRIMARY KEY` – primary key definitions @@ -103 +149,0 @@ When exporting, SQL Server may include additional statements in the same file al - * `ALTER TABLE ... ALTER COLUMN ... NOT FOR REPLICATION` – column replication settings @@ -106,0 +153 @@ When exporting, SQL Server may include additional statements in the same file al +For information about how to export Oracle database objects, see [Export Oracle database objects](./export-oracle-database-objects.html). @@ -108 +155 @@ When exporting, SQL Server may include additional statements in the same file al -All other `ALTER` and `DROP` statements in the file are skipped. +DMS Schema Conversion uses only the scripts that you upload to build the source object tree. It doesn't connect to your source database to check that the scripts are complete or correct. The quality of your scripts affects how well DMS Schema Conversion parses each object, resolves references between objects, and converts them. For the best conversion results, upload valid, well-formatted DDL scripts that include all objects that your source objects require. @@ -113 +160 @@ S3 folder structure -DMS Schema Conversion scans all folders under the S3 path that you specify. It searches for `.sql` files to load database objects. The S3 path can point to a bucket or any prefix in the bucket. The `USE [`database_name`]` statement in each file identifies the source database for that object. +When you specify an S3 path, DMS Schema Conversion scans all folders under that path. It searches for `.sql` files to load database objects. The S3 path can point to a bucket or any prefix in the bucket. @@ -115 +162 @@ DMS Schema Conversion scans all folders under the S3 path that you specify. It s -Store the scripts for each database in a separate folder to avoid file name and object name collisions. +Store the scripts for each schema or database in a separate folder to avoid file name and object name collisions.