AWS Transfer for SFTP
User Guide

CreateServer

Instantiates an autoscaling virtual server based on Secure File Transfer Protocol (SFTP) in AWS. The call returns the ServerId property assigned by the service to the newly created server. Reference this ServerId property when you make updates to your server, or work with users.

The response returns the ServerId value for the newly created server.

Request Syntax

{ "IdentityProviderDetails": { "InvocationRole": "string", "Url": "string" }, "IdentityProviderType": "string", "LoggingRole": "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.

IdentityProviderDetails

An array containing all of the information required to call a customer-supplied authentication API. This parameter is not required when the IdentityProviderType value of server that is created uses the SERVICE_MANAGED authentication method.

Type: IdentityProviderDetails object

Required: No

IdentityProviderType

The mode of authentication enabled for this service. The default value is SERVICE_MANAGED, which allows you to store and access SFTP user credentials within the service. An IdentityProviderType value of API_GATEWAY indicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.

Type: String

Valid Values: SERVICE_MANAGED | API_GATEWAY

Required: No

LoggingRole

A value that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.

Type: String

Pattern: arn:.*role/.*

Required: No

Tags

Key-value pairs that can be used to group and search for 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.

ServerId

The service-assigned ID of the SFTP server that is created.

Type: String

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

Errors

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

InternalServiceError

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

HTTP Status Code: 500

InvalidRequestException

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

HTTP Status Code: 400

ServiceUnavailableException

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

HTTP Status Code: 500

Examples

Example

The following example creates a new SFTP server.

Sample Request

{ "IdentityProviderDetails": "IdentityProvider", "IdentityProviderType": "SERVICE_MANAGED", "LoggingRole": "CloudWatchLoggingRole", "Tags": [ { "Key": "Name", "Value": "MySFTPServer" } ] }

Example

Sample Response

{ "ServerId": "s-abcd1234adlljl" }

See Also

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