

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Transfer::User
<a name="aws-resource-transfer-user"></a>

 The `AWS::Transfer::User` resource creates a user and associates them with an existing server. You can only create and associate users with servers that have the `IdentityProviderType` set to `SERVICE_MANAGED` . Using parameters for `CreateUser` , you can specify the user name, set the home directory, store the user's public key, and assign the user's AWS Identity and Access Management (IAM) role. You can also optionally add a session policy, and assign metadata with tags that can be used to group and search for users. 

## Syntax
<a name="aws-resource-transfer-user-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-transfer-user-syntax.json"></a>

```
{
  "Type" : "AWS::Transfer::User",
  "Properties" : {
      "[HomeDirectory](#cfn-transfer-user-homedirectory)" : String,
      "[HomeDirectoryMappings](#cfn-transfer-user-homedirectorymappings)" : [ HomeDirectoryMapEntry, ... ],
      "[HomeDirectoryType](#cfn-transfer-user-homedirectorytype)" : String,
      "[Policy](#cfn-transfer-user-policy)" : String,
      "[PosixProfile](#cfn-transfer-user-posixprofile)" : PosixProfile,
      "[Role](#cfn-transfer-user-role)" : String,
      "[ServerId](#cfn-transfer-user-serverid)" : String,
      "[SshPublicKeys](#cfn-transfer-user-sshpublickeys)" : [ String, ... ],
      "[Tags](#cfn-transfer-user-tags)" : [ Tag, ... ],
      "[UserName](#cfn-transfer-user-username)" : String
    }
}
```

### YAML
<a name="aws-resource-transfer-user-syntax.yaml"></a>

```
Type: AWS::Transfer::User
Properties:
  [HomeDirectory](#cfn-transfer-user-homedirectory): String
  [HomeDirectoryMappings](#cfn-transfer-user-homedirectorymappings): 
    - HomeDirectoryMapEntry
  [HomeDirectoryType](#cfn-transfer-user-homedirectorytype): String
  [Policy](#cfn-transfer-user-policy): String
  [PosixProfile](#cfn-transfer-user-posixprofile): 
    PosixProfile
  [Role](#cfn-transfer-user-role): String
  [ServerId](#cfn-transfer-user-serverid): String
  [SshPublicKeys](#cfn-transfer-user-sshpublickeys): 
    - String
  [Tags](#cfn-transfer-user-tags): 
    - Tag
  [UserName](#cfn-transfer-user-username): String
```

## Properties
<a name="aws-resource-transfer-user-properties"></a>

`HomeDirectory`  <a name="cfn-transfer-user-homedirectory"></a>
The landing directory (folder) for a user when they log in to the server using the client.  
A `HomeDirectory` example is `/bucket_name/home/mydirectory`.  
You can use the `HomeDirectory` parameter for `HomeDirectoryType` when it is set to either `PATH` or `LOGICAL`.
*Required*: No  
*Type*: String  
*Pattern*: `^(|/.*)$`  
*Minimum*: `0`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HomeDirectoryMappings`  <a name="cfn-transfer-user-homedirectorymappings"></a>
Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your user and how you want to make them visible. You must specify the `Entry` and `Target` pair, where `Entry` shows how the path is made visible and `Target` is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your AWS Identity and Access Management (IAM) role provides access to paths in `Target`. This value can be set only when `HomeDirectoryType` is set to *LOGICAL*.  
The following is an `Entry` and `Target` pair example.  
 `[ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ]`   
In most cases, you can use this value instead of the session policy to lock your user down to the designated home directory ("`chroot`"). To do this, you can set `Entry` to `/` and set `Target` to the value the user should see for their home directory when they log in.  
The following is an `Entry` and `Target` pair example for `chroot`.  
 `[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ]`   
*Required*: No  
*Type*: Array of [HomeDirectoryMapEntry](aws-properties-transfer-user-homedirectorymapentry.md)  
*Minimum*: `1`  
*Maximum*: `50000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HomeDirectoryType`  <a name="cfn-transfer-user-homedirectorytype"></a>
The type of landing directory (folder) that you want your users' home directory to be when they log in to the server. If you set it to `PATH`, the user will see the absolute Amazon S3 bucket or Amazon EFS path as is in their file transfer protocol clients. If you set it to `LOGICAL`, you need to provide mappings in the `HomeDirectoryMappings` for how you want to make Amazon S3 or Amazon EFS paths visible to your users.  
If `HomeDirectoryType` is `LOGICAL`, you must provide mappings, using the `HomeDirectoryMappings` parameter. If, on the other hand, `HomeDirectoryType` is `PATH`, you provide an absolute path using the `HomeDirectory` parameter. You cannot have both `HomeDirectory` and `HomeDirectoryMappings` in your template.
*Required*: No  
*Type*: String  
*Allowed values*: `PATH | LOGICAL`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Policy`  <a name="cfn-transfer-user-policy"></a>
 A session policy for your user so you can use the same IAM role across multiple users. This policy restricts user access to portions of their Amazon S3 bucket. Variables that you can use inside this policy include `${Transfer:UserName}` , `${Transfer:HomeDirectory}` , and `${Transfer:HomeBucket}` .   
 For session policies, AWS Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the `Policy` argument.   
 For an example of a session policy, see [Example session policy](https://docs.aws.amazon.com/transfer/latest/userguide/session-policy.html) .   
 For more information, see [AssumeRole](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) in the *AWS Security Token Service API Reference * . 
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PosixProfile`  <a name="cfn-transfer-user-posixprofile"></a>
Specifies the full POSIX identity, including user ID (`Uid`), group ID (`Gid`), and any secondary groups IDs (`SecondaryGids`), that controls your users' access to your Amazon Elastic File System (Amazon EFS) file systems. The POSIX permissions that are set on files and directories in your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.  
*Required*: No  
*Type*: [PosixProfile](aws-properties-transfer-user-posixprofile.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Role`  <a name="cfn-transfer-user-role"></a>
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that controls your users' access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access your resources when servicing your users' transfer requests.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^arn:.*role/\S+$`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServerId`  <a name="cfn-transfer-user-serverid"></a>
A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^s-([0-9a-f]{17})$`  
*Minimum*: `19`  
*Maximum*: `19`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SshPublicKeys`  <a name="cfn-transfer-user-sshpublickeys"></a>
Specifies the public key portion of the Secure Shell (SSH) keys stored for the described user.  
To delete the public key body, set its value to zero keys, as shown here:  
 `SshPublicKeys: []` 
*Required*: No  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-transfer-user-tags"></a>
Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any purpose.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-transfer-user-tag.md)  
*Minimum*: `1`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserName`  <a name="cfn-transfer-user-username"></a>
A unique string that identifies a user and is associated with a `ServerId`. This user name must be a minimum of 3 and a maximum of 100 characters long. The following are valid characters: a-z, A-Z, 0-9, underscore '\$1', hyphen '-', period '.', and at sign '@'. The user name can't start with a hyphen, period, or at sign.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[\w][\w@.-]{2,99}$`  
*Minimum*: `3`  
*Maximum*: `100`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-transfer-user-return-values"></a>

### Ref
<a name="aws-resource-transfer-user-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the username, such as `transfer_user` . 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-transfer-user-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-transfer-user-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
 The Amazon Resource Name associated with the user, in the form ` arn:aws:transfer:region: account-id :user/ server-id / username` .   
 An example of a user ARN is: `arn:aws:transfer:us-east-1:123456789012:user/user1` . 

`ServerId`  <a name="ServerId-fn::getatt"></a>
The ID of the server to which the user is attached.  
 An example `ServerId` is `s-01234567890abcdef` . 

`UserName`  <a name="UserName-fn::getatt"></a>
A unique string that identifies a Transfer Family user account associated with a server.  
 An example `UserName` is `transfer-user-1` . 

# AWS::Transfer::User HomeDirectoryMapEntry
<a name="aws-properties-transfer-user-homedirectorymapentry"></a>

 Represents an object that contains entries and targets for `HomeDirectoryMappings` . 

## Syntax
<a name="aws-properties-transfer-user-homedirectorymapentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-transfer-user-homedirectorymapentry-syntax.json"></a>

```
{
  "[Entry](#cfn-transfer-user-homedirectorymapentry-entry)" : String,
  "[Target](#cfn-transfer-user-homedirectorymapentry-target)" : String,
  "[Type](#cfn-transfer-user-homedirectorymapentry-type)" : String
}
```

### YAML
<a name="aws-properties-transfer-user-homedirectorymapentry-syntax.yaml"></a>

```
  [Entry](#cfn-transfer-user-homedirectorymapentry-entry): String
  [Target](#cfn-transfer-user-homedirectorymapentry-target): String
  [Type](#cfn-transfer-user-homedirectorymapentry-type): String
```

## Properties
<a name="aws-properties-transfer-user-homedirectorymapentry-properties"></a>

`Entry`  <a name="cfn-transfer-user-homedirectorymapentry-entry"></a>
Represents an entry for `HomeDirectoryMappings`.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^/.*$`  
*Minimum*: `0`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Target`  <a name="cfn-transfer-user-homedirectorymapentry-target"></a>
Represents the map target that is used in a `HomeDirectoryMapEntry`.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^/.*$`  
*Minimum*: `0`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-transfer-user-homedirectorymapentry-type"></a>
Specifies the type of mapping. Set the type to `FILE` if you want the mapping to point to a file, or `DIRECTORY` for the directory to point to a directory.  
By default, home directory mappings have a `Type` of `DIRECTORY` when you create a Transfer Family server. You would need to explicitly set `Type` to `FILE` if you want a mapping to have a file target.
*Required*: No  
*Type*: String  
*Allowed values*: `FILE | DIRECTORY`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Transfer::User PosixProfile
<a name="aws-properties-transfer-user-posixprofile"></a>

The full POSIX identity, including user ID (`Uid`), group ID (`Gid`), and any secondary groups IDs (`SecondaryGids`), that controls your users' access to your Amazon EFS file systems. The POSIX permissions that are set on files and directories in your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.

## Syntax
<a name="aws-properties-transfer-user-posixprofile-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-transfer-user-posixprofile-syntax.json"></a>

```
{
  "[Gid](#cfn-transfer-user-posixprofile-gid)" : Number,
  "[SecondaryGids](#cfn-transfer-user-posixprofile-secondarygids)" : [ Number, ... ],
  "[Uid](#cfn-transfer-user-posixprofile-uid)" : Number
}
```

### YAML
<a name="aws-properties-transfer-user-posixprofile-syntax.yaml"></a>

```
  [Gid](#cfn-transfer-user-posixprofile-gid): Number
  [SecondaryGids](#cfn-transfer-user-posixprofile-secondarygids): 
    - Number
  [Uid](#cfn-transfer-user-posixprofile-uid): Number
```

## Properties
<a name="aws-properties-transfer-user-posixprofile-properties"></a>

`Gid`  <a name="cfn-transfer-user-posixprofile-gid"></a>
The POSIX group ID used for all EFS operations by this user.  
*Required*: Yes  
*Type*: Number  
*Minimum*: `0`  
*Maximum*: `4294967295`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecondaryGids`  <a name="cfn-transfer-user-posixprofile-secondarygids"></a>
The secondary POSIX group IDs used for all EFS operations by this user.  
*Required*: No  
*Type*: Array of Number  
*Minimum*: `0 | 0`  
*Maximum*: `16 | 4294967295`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Uid`  <a name="cfn-transfer-user-posixprofile-uid"></a>
The POSIX user ID used for all EFS operations by this user.  
*Required*: Yes  
*Type*: Number  
*Minimum*: `0`  
*Maximum*: `4294967295`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Transfer::User Tag
<a name="aws-properties-transfer-user-tag"></a>

Creates a key-value pair for a specific resource. Tags are metadata that you can use to search for and group a resource for various purposes. You can apply tags to servers, users, and roles. A tag key can take more than one value. For example, to group servers for accounting purposes, you might create a tag called `Group` and assign the values `Research` and `Accounting` to that group.

## Syntax
<a name="aws-properties-transfer-user-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-transfer-user-tag-syntax.json"></a>

```
{
  "[Key](#cfn-transfer-user-tag-key)" : String,
  "[Value](#cfn-transfer-user-tag-value)" : String
}
```

### YAML
<a name="aws-properties-transfer-user-tag-syntax.yaml"></a>

```
  [Key](#cfn-transfer-user-tag-key): String
  [Value](#cfn-transfer-user-tag-value): String
```

## Properties
<a name="aws-properties-transfer-user-tag-properties"></a>

`Key`  <a name="cfn-transfer-user-tag-key"></a>
The name assigned to the tag that you create.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-transfer-user-tag-value"></a>
Contains one or more values that you assigned to the key name you create.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)