Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

UpdateLocationSmb

Focus mode
UpdateLocationSmb - AWS DataSync

Modifies the following configuration parameters of the Server Message Block (SMB) transfer location that you're using with AWS DataSync.

For more information, see Configuring DataSync transfers with an SMB file server.

Request Syntax

{ "AgentArns": [ "string" ], "AuthenticationType": "string", "DnsIpAddresses": [ "string" ], "Domain": "string", "KerberosKeytab": blob, "KerberosKrb5Conf": blob, "KerberosPrincipal": "string", "LocationArn": "string", "MountOptions": { "Version": "string" }, "Password": "string", "Subdirectory": "string", "User": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

AgentArns

Specifies the DataSync agent (or agents) that can connect to your SMB file server. You specify an agent by using its Amazon Resource Name (ARN).

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 4 items.

Length Constraints: Maximum length of 128.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$

Required: No

AuthenticationType

Specifies the authentication protocol that DataSync uses to connect to your SMB file server. DataSync supports NTLM (default) and KERBEROS authentication.

For more information, see Providing DataSync access to SMB file servers.

Type: String

Valid Values: NTLM | KERBEROS

Required: No

DnsIpAddresses

Specifies the IPv4 addresses for the DNS servers that your SMB file server belongs to. This parameter applies only if AuthenticationType is set to KERBEROS.

If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right SMB file server.

Type: Array of strings

Array Members: Maximum number of 2 items.

Length Constraints: Minimum length of 7. Maximum length of 15.

Pattern: \A(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\z

Required: No

Domain

Specifies the Windows domain name that your SMB file server belongs to. This parameter applies only if AuthenticationType is set to NTLM.

If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right file server.

Type: String

Length Constraints: Maximum length of 253.

Pattern: ^[A-Za-z0-9]((\.|-+)?[A-Za-z0-9]){0,252}$

Required: No

KerberosKeytab

Specifies your Kerberos key table (keytab) file, which includes mappings between your Kerberos principal and encryption keys.

The file must be base64 encoded. If you're using the AWS CLI, the encoding is done for you.

To avoid task execution errors, make sure that the Kerberos principal that you use to create the keytab file matches exactly what you specify for KerberosPrincipal.

Type: Base64-encoded binary data object

Length Constraints: Maximum length of 65536.

Required: No

KerberosKrb5Conf

Specifies a Kerberos configuration file (krb5.conf) that defines your Kerberos realm configuration.

The file must be base64 encoded. If you're using the AWS CLI, the encoding is done for you.

Type: Base64-encoded binary data object

Length Constraints: Maximum length of 131072.

Required: No

KerberosPrincipal

Specifies a Kerberos prinicpal, which is 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 HOST/kerberosuser@MYDOMAIN.ORG.

Principal names are case sensitive. Your DataSync task execution will fail if the principal that you specify for this parameter doesn’t exactly match the principal that you use to create the keytab file.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^.+$

Required: No

LocationArn

Specifies the ARN of the SMB location that you want to update.

Type: String

Length Constraints: Maximum length of 128.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$

Required: Yes

MountOptions

Specifies the version of the Server Message Block (SMB) protocol that AWS DataSync uses to access an SMB file server.

Type: SmbMountOptions object

Required: No

Password

Specifies the password of the user who can mount your SMB file server and has permission to access the files and folders involved in your transfer. This parameter applies only if AuthenticationType is set to NTLM.

Type: String

Length Constraints: Maximum length of 104.

Pattern: ^.{0,104}$

Required: No

Subdirectory

Specifies 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 data in the specified subdirectory, DataSync must be able to mount the SMB share and access all of its data. For more information, see Providing DataSync access to SMB file servers.

Type: String

Length Constraints: Maximum length of 4096.

Pattern: ^[a-zA-Z0-9_\-\+\./\(\)\$\p{Zs}]+$

Required: No

User

Specifies the user name that can mount your SMB file server and has permission to access the files and folders involved in your transfer. This parameter applies only if AuthenticationType is set to NTLM.

For information about choosing a user with the right level of access for your transfer, see Providing DataSync access to SMB file servers.

Type: String

Length Constraints: Maximum length of 104.

Pattern: ^[^\x22\x5B\x5D/\\:;|=,+*?\x3C\x3E]{1,104}$

Required: No

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalException

This exception is thrown when an error occurs in the AWS DataSync service.

HTTP Status Code: 500

InvalidRequestException

This exception is thrown when the client submits a malformed request.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.