CreateServer - AWS Transfer Family


Instantiates an autoscaling virtual server based on the selected file transfer protocol in AWS. When you make updates to your file transfer protocol-enabled server or when you work with users, use the service-generated ServerId property that is assigned to the newly created server.

Request Syntax

{ "Certificate": "string", "EndpointDetails": { "AddressAllocationIds": [ "string" ], "SubnetIds": [ "string" ], "VpcEndpointId": "string", "VpcId": "string" }, "EndpointType": "string", "HostKey": "string", "IdentityProviderDetails": { "InvocationRole": "string", "Url": "string" }, "IdentityProviderType": "string", "LoggingRole": "string", "Protocols": [ "string" ], "Tags": [ { "Key": "string", "Value": "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.


The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. Required when Protocols is set to FTPS.

Type: String

Length Constraints: Maximum length of 1600.

Required: No


The virtual private cloud (VPC) endpoint settings that are configured for your file transfer protocol-enabled server. When you host your endpoint within your VPC, you can make it accessible only to resources within your VPC, or you can attach Elastic IPs and make it accessible to clients over the internet. Your VPC's default security groups are automatically assigned to your endpoint.

Type: EndpointDetails object

Required: No


The type of VPC endpoint that you want your file transfer protocol-enabled server to connect to. You can choose to connect to the public internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, you can restrict access to your server and resources only within your VPC.

Type: String


Required: No


The RSA private key as generated by the ssh-keygen -N "" -m PEM -f my-new-server-key command.


If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, don't update the host key. Accidentally changing a server's host key can be disruptive.

For more information, see Changing the Host Key for Your AWS Transfer Family Server in the AWS Transfer Family User Guide.

Type: String

Length Constraints: Maximum length of 4096.

Required: No


Required when IdentityProviderType is set to API_GATEWAY. Accepts an array containing all of the information required to call a customer-supplied authentication API, including the API Gateway URL. Not required when IdentityProviderType is set to SERVICE_MANAGED.

Type: IdentityProviderDetails object

Required: No


Specifies the mode of authentication for a file transfer protocol-enabled server. The default value is SERVICE_MANAGED, which allows you to store and access user credentials within the AWS Transfer Family service. Use the API_GATEWAY value to integrate with an identity provider of your choosing. The API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call for authentication using the IdentityProviderDetails parameter.

Type: String


Required: No


Allows the service to write your users' activity to your Amazon CloudWatch logs for monitoring and auditing purposes.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: arn:.*role/.*

Required: No


Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint. The available protocols are:

  • Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH

  • File Transfer Protocol Secure (FTPS): File transfer with TLS encryption

  • File Transfer Protocol (FTP): Unencrypted file transfer

Type: Array of strings

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

Valid Values: SFTP | FTP | FTPS

Required: No


Key-value pairs that can be used to group and search for file transfer protocol-enabled servers.

Type: Array of Tag objects

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

Required: No

Response Syntax

{ "ServerId": "string" }

Response Elements

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

The following data is returned in JSON format by the service.


The service-assigned ID of the file transfer protocol-enabled server that is created.

Type: String

Length Constraints: Fixed length of 19.

Pattern: ^s-([0-9a-f]{17})$


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


You do not have sufficient access to perform this action.

HTTP Status Code: 400


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

HTTP Status Code: 500


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

HTTP Status Code: 400


The requested resource does not exist.

HTTP Status Code: 400


The request has failed because the AWS Transfer Family service is not available.

HTTP Status Code: 500


The request was denied due to request throttling.

HTTP Status Code: 400

HTTP Status Code: 400



The following example creates a new file transfer protocol-enabled server using a VPC_ENDPOINT.

Sample Request

{ "EndpointDetails": { "AddressAllocationIds": [ "eipalloc-01a2eabe3c04d5678", "eipalloc-102345be" ], "SubnetIds": [ "subnet-045eaa6f0789a7cde", "subnet-0a1d0f222daffde11" ], "EndpointType": "VPC_ENDPOINT", "HostKey": "Your RSA private key", "IdentityProviderDetails": "IdentityProvider", "IdentityProviderType": "SERVICE_MANAGED", "LoggingRole": "CloudWatchLoggingRole", "Tags": [ { "Key": "Name", "Value": "MySFTPServer" } ] }


Sample Response

{ "ServerId": "s-01234567890abcdef" }

See Also

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