Configuring AWS DataSync transfers with an SMB file server
With AWS DataSync, you can transfer data between your Server Message Block (SMB) file server and one of the following AWS storage services:
To set up this kind of transfer, you create a location for your SMB file server. You can use this as a transfer source or destination.
Providing DataSync access to SMB file servers
DataSync connects to your file server using the SMB protocol and can authenticate with NTLM or Kerberos.
Topics
Supported SMB versions
By default, DataSync automatically chooses a version of the SMB protocol based on negotiation with your SMB file server.
You also can configure DataSync to use a specific SMB version, but we recommend doing this only if DataSync has trouble negotiating with the SMB file server automatically. DataSync supports SMB versions 1.0 and later. For security reasons, we recommend using SMB version 3.0.2 or later. Earlier versions, such as SMB 1.0, contain known security vulnerabilities that attackers can exploit to compromise your data.
See the following table for a list of options in the DataSync console and API:
Console option | API option | Description |
---|---|---|
Automatic |
|
DataSync and the SMB file server negotiate the highest version of SMB that they mutually support between 2.1 and 3.1.1. This is the default and recommended option. If you instead
choose a specific version that your file server doesn't
support, you may get an |
SMB 3.0.2 |
|
Restricts the protocol negotiation to only SMB version 3.0.2. |
SMB 2.1 |
|
Restricts the protocol negotiation to only SMB version 2.1. |
SMB 2.0 |
|
Restricts the protocol negotiation to only SMB version 2.0. |
SMB 1.0 |
|
Restricts the protocol negotiation to only SMB version 1.0. |
Using NTLM authentication
To use NTLM authentication, you provide a user name and password that allows DataSync to access the SMB file server that you're transferring to or from. The user can be a local user on your file server or a domain user in your Microsoft Active Directory.
Using Kerberos authentication
To use Kerberos authentication, you provide a Kerberos principal, Kerberos key table (keytab) file, and Kerberos configuration file that allows DataSync to access the SMB file server that you're transferring to or from.
Prerequisites
You need to create a couple Kerberos artifacts and configure your network so that DataSync can access your SMB file server.
-
Create a Kerberos keytab file by using the ktpass
or kutil utility. The following example creates a keytab file by using
ktpass
. The Kerberos realm that you specify (MYDOMAIN.ORG
) must be upper case.ktpass /out C:\YOUR_KEYTAB.keytab /princ HOST/kerberosuser@MYDOMAIN.ORG /mapuser kerberosuser /pass * /crypto AES256-SHA1 /ptype KRB5_NT_PRINCIPAL
-
Prepare a simplified version of the Kerberos configuration file (
krb5.conf
). Include information about the realm, the location of the domain admin servers, and mappings of hostnames onto a Kerberos realm.Verify that the
krb5.conf
content is formatted with the correct mixed casing for the realms and domain realm names. For example:[libdefaults] dns_lookup_realm = true dns_lookup_kdc = true forwardable = true default_realm = MYDOMAIN.ORG [realms] MYDOMAIN.ORG = { kdc = mydomain.org admin_server = mydomain.org } [domain_realm] .mydomain.org = MYDOMAIN.ORG mydomain.org = MYDOMAIN.ORG
-
In your network configuration, make sure that your Kerberos Key Distribution Center (KDC) server port is open. The KDC port is typically TCP port 88.
DataSync configuration options for Kerberos
When creating an SMB location that uses Kerberos, you configure the following options.
Console option | API option | Description |
---|---|---|
SMB server |
|
The domain name of the SMB file server that your DataSync agent will mount. For Kerberos, you can't specify the file server's IP address. |
Kerberos principal |
|
An identity in your Kerberos realm that has permission to access the files, folders, and file metadata in your SMB file server. A Kerberos principal might look like
Principal names are case sensitive. |
Keytab file |
|
A Kerberos key table (keytab) file, which includes mappings between your Kerberos principal and encryption keys. |
Kerberos configuration file |
|
A |
DNS IP addresses (optional) |
|
The IPv4 addresses for the DNS servers that your SMB file server belongs to. If you have multiple domains in your environment, configuring this makes sure that DataSync connects to the right SMB file server. |
Required permissions
The identity that you provide DataSync must have permission to mount and access your SMB file server's files, folders, and file metadata.
If you provide an identity in your Active Directory, it must be a member of an Active Directory group with one or both of the following user rights (depending the metadata that you want DataSync to copy):
User right | Description |
---|---|
Restore files and directories
( |
Allows DataSync to copy object ownership, permissions, file metadata, and NTFS discretionary access lists (DACLs). This user right is usually granted to members of the Domain Admins and Backup Operators groups (both of which are default Active Directory groups). |
Manage auditing and security log
( |
Allows DataSync to copy NTFS system access control lists (SACLs). This user right is usually granted to members of the Domain Admins group. |
If you want to copy Windows ACLs and are transferring between an SMB file server and another storage system that uses SMB (such as Amazon FSx for Windows File Server or FSx for ONTAP), the identity that you provide DataSync must belong to the same Active Directory domain or have an Active Directory trust relationship between their domains.
DFS Namespaces
DataSync doesn't support Microsoft Distributed File System (DFS) Namespaces. We recommend specifying an underlying file server or share instead when creating your DataSync location.
Creating your SMB transfer location
Before you begin, you need an SMB file server that you want to transfer data from.
-
Open the AWS DataSync console at https://console.aws.amazon.com/datasync/
. -
In the left navigation pane, expand Data transfer, then choose Locations and Create location.
-
For Location type, choose Server Message Block (SMB).
You configure this location as a source or destination later.
-
For Agents, choose the DataSync agent that can connect to your SMB file server.
You can choose more than one agent. For more information, see Using multiple DataSync agents.
-
For SMB server, enter the domain name or IP address of the SMB file server that your DataSync agent will mount.
Remember the following with this setting:
-
You can't specify an IP version 6 (IPv6) address.
-
If you're using Kerberos authentication, you must specify a domain name.
-
-
For Share name, enter the name of the share exported by your SMB file server where DataSync will read or write data.
You can include a subdirectory in the share path (for example,
/path/to/subdirectory
). Make sure that other SMB clients in your network can also mount this path.To copy all the data in the subdirectory, DataSync must be able to mount the SMB share and access all of its data. For more information, see Required permissions.
-
(Optional) Expand Additional settings and choose an SMB Version for DataSync to use when accessing your file server.
By default, DataSync automatically chooses a version based on negotiation with the SMB file server. For information, see Supported SMB versions.
-
For Authentication type, choose NTLM or Kerberos.
-
Do one of the following depending on your authentication type:
-
(Optional) Choose Add tag to tag your SMB location.
Tags are key-value pairs that help you manage, filter, and search for your locations. We recommend creating at least a name tag for your location.
-
Choose Create location.
The following instructions describe how to create SMB locations with NTLM or Kerberos authentication.