Skip to main content

servers

Creates, updates, deletes, gets or lists a servers resource.

Overview

Nameservers
TypeResource
Idaws.transfer.servers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringSpecifies the unique Amazon Resource Name (ARN) of the server. (pattern: <code>arn:\S+</code>)
as_2_service_managed_egress_ip_addressesarrayThe list of egress IP addresses of this server. These IP addresses are only relevant for servers that use the AS2 protocol. They are used for sending asynchronous MDNs. These IP addresses are assigned automatically when you create an AS2 server. Additionally, if you update an existing server and add the AS2 protocol, static IP addresses are assigned as well.
certificatestringSpecifies the ARN of the Amazon Web ServicesCertificate Manager (ACM) certificate. Required when Protocols is set to FTPS.
domainstringSpecifies the domain of the storage system that is used for file transfers. There are two domains available: Amazon Simple Storage Service (Amazon S3) and Amazon Elastic File System (Amazon EFS). The default value is S3. (S3, EFS)
endpoint_detailsobjectThe virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your endpoint within your VPC, you can make your endpoint accessible only to resources within your VPC, or you can attach Elastic IP addresses and make your endpoint accessible to clients over the internet. Your VPC's default security groups are automatically assigned to your endpoint.
endpoint_typestringDefines the type of endpoint that your server is connected to. If your server is connected to a VPC endpoint, your server isn't accessible over the public internet. (PUBLIC, VPC, VPC_ENDPOINT)
host_key_fingerprintstringSpecifies the Base64-encoded SHA256 fingerprint of the server's host key. This value is equivalent to the output of the ssh-keygen -l -f my-new-server-key command.
identity_provider_detailsobjectSpecifies information to call a customer-supplied authentication API. This field is not populated when the IdentityProviderType of a server is AWS_DIRECTORY_SERVICE or SERVICE_MANAGED.
identity_provider_typestringThe mode of authentication for a server. The default value is SERVICE_MANAGED, which allows you to store and access user credentials within the Transfer Family service. Use AWS_DIRECTORY_SERVICE to provide access to Active Directory groups in Directory Service for Microsoft Active Directory or Microsoft Active Directory in your on-premises environment or in Amazon Web Services using AD Connector. This option also requires you to provide a Directory ID by using the IdentityProviderDetails parameter. Use the API_GATEWAY value to integrate with an identity provider of your choosing. The API_GATEWAY setting requires you to provide an Amazon API Gateway endpoint URL to call for authentication by using the IdentityProviderDetails parameter. Use the AWS_LAMBDA value to directly use an Lambda function as your identity provider. If you choose this value, you must specify the ARN for the Lambda function in the Function parameter for the IdentityProviderDetails data type. (SERVICE_MANAGED, API_GATEWAY, AWS_DIRECTORY_SERVICE, AWS_LAMBDA)
ip_address_typestringSpecifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your Transfer Family endpoint. The default value is IPV4. The IpAddressType parameter has the following limitations: It cannot be changed while the server is online. You must stop the server before modifying this parameter. It cannot be updated to DUALSTACK if the server has AddressAllocationIds specified. When using DUALSTACK as the IpAddressType, you cannot set the AddressAllocationIds parameter for the EndpointDetails for the server. (IPV4, DUALSTACK)
logging_rolestringThe Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFS events. When set, you can view user activity in your CloudWatch logs. (pattern: <code>(|arn:.*role/\S+)</code>)
post_authentication_login_bannerstringSpecifies a string to display when users connect to a server. This string is displayed after the user authenticates. The SFTP protocol does not support post-authentication display banners. (pattern: <code>[\x09-\x0D\x20-\x7E]*</code>)
pre_authentication_login_bannerstringSpecifies a string to display when users connect to a server. This string is displayed before the user authenticates. For example, the following banner displays details about using the system: This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel. (pattern: <code>[\x09-\x0D\x20-\x7E]*</code>)
protocol_detailsobjectThe protocol settings that are configured for your server. Avoid placing Network Load Balancers (NLBs) or NAT gateways in front of Transfer Family servers, as this increases costs and can cause performance issues, including reduced connection limits for FTPS. For more details, see Avoid placing NLBs and NATs in front of Transfer Family. To indicate passive mode (for FTP and FTPS protocols), use the PassiveIp parameter. Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer. To ignore the error that is generated when the client attempts to use the SETSTAT command on a file that you are uploading to an Amazon S3 bucket, use the SetStatOption parameter. To have the Transfer Family server ignore the SETSTAT command and upload files without needing to make any changes to your SFTP client, set the value to ENABLE_NO_OP. If you set the SetStatOption parameter to ENABLE_NO_OP, Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can determine when the client is making a SETSTAT call. To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique session ID, use the TlsSessionResumptionMode parameter. As2Transports indicates the transport method for the AS2 messages. Currently, only HTTP is supported.
protocolsarraySpecifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint. The available protocols are: SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH FTPS (File Transfer Protocol Secure): File transfer with TLS encryption FTP (File Transfer Protocol): Unencrypted file transfer AS2 (Applicability Statement 2): used for transporting structured business-to-business data If you select FTPS, you must choose a certificate stored in Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS. If Protocol includes either FTP or FTPS, then the EndpointType must be VPC and the IdentityProviderType must be either AWS_DIRECTORY_SERVICE, AWS_LAMBDA, or API_GATEWAY. If Protocol includes FTP, then AddressAllocationIds cannot be associated. If Protocol is set only to SFTP, the EndpointType can be set to PUBLIC and the IdentityProviderType can be set any of the supported identity types: SERVICE_MANAGED, AWS_DIRECTORY_SERVICE, AWS_LAMBDA, or API_GATEWAY. If Protocol includes AS2, then the EndpointType must be VPC, and domain must be Amazon S3.
s3_storage_optionsobjectSpecifies whether or not performance for your Amazon S3 directories is optimized. If using the console, this is enabled by default. If using the API or CLI, this is disabled by default. By default, home directory mappings have a TYPE of DIRECTORY. If you enable this option, you would then need to explicitly set the HomeDirectoryMapEntry Type to FILE if you want a mapping to have a file target.
security_policy_namestringSpecifies the name of the security policy for the server. (pattern: <code>Transfer[A-Za-z0-9]*SecurityPolicy-[A-Za-z0-9-]+</code>)
server_idstringSpecifies the unique system-assigned identifier for a server that you instantiate. (pattern: <code>s-([0-9a-f]{17})</code>)
statestringThe condition of the server that was described. A value of ONLINE indicates that the server can accept jobs and transfer files. A State value of OFFLINE means that the server cannot perform file transfer operations. The states of STARTING and STOPPING indicate that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of START_FAILED or STOP_FAILED can indicate an error condition. (OFFLINE, ONLINE, STARTING, STOPPING, START_FAILED, STOP_FAILED)
structured_log_destinationsarraySpecifies the log groups to which your server logs are sent. To specify a log group, you must provide the ARN for an existing log group. In this case, the format of the log group is as follows: arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:* For example, arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:* If you have previously specified a log group for a server, you can clear it, and in effect turn off structured logging, by providing an empty value for this parameter in an update-server call. For example: update-server --server-id s-1234567890abcdef0 --structured-log-destinations
tagsarraySpecifies the key-value pairs that you can use to search for and group servers that were assigned to the server that was described.
user_countintegerSpecifies the number of users that are assigned to a server you specified with the ServerId.
workflow_detailsobjectSpecifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow. In addition to a workflow to execute when a file is uploaded completely, WorkflowDetails can also contain a workflow ID (and execution role) for a workflow to execute on partial upload. A partial upload occurs when the server session disconnects while the file is still being uploaded.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_serverselectregionDescribes a file transfer protocol-enabled server that you specify by passing the ServerId parameter. The response contains a description of a server's properties. When you set EndpointType to VPC, the response will contain the EndpointDetails.
list_serversselectregionLists the file transfer protocol-enabled servers that are associated with your Amazon Web Services account.
create_serverinsertregionInstantiates an auto-scaling virtual server based on the selected file transfer protocol in Amazon Web Services. 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.
update_serverupdateregion, ServerIdUpdates the file transfer protocol-enabled server's properties after that server has been created. The UpdateServer call returns the ServerId of the server you updated.
delete_ssh_public_keydeleteregionDeletes a user's Secure Shell (SSH) public key.
delete_serverdeleteregionDeletes the file transfer protocol-enabled server that you specify. No response returns from this operation.
import_host_keyexecregion, ServerId, HostKeyBodyAdds a host key to the server that's specified by the ServerId parameter.
import_ssh_public_keyexecregion, ServerId, SshPublicKeyBody, UserNameAdds a Secure Shell (SSH) public key to a Transfer Family user identified by a UserName value assigned to the specific file transfer protocol-enabled server, identified by ServerId. The response returns the UserName value, the ServerId value, and the name of the SshPublicKeyId.
start_serverexecregion, ServerIdChanges the state of a file transfer protocol-enabled server from OFFLINE to ONLINE. It has no impact on a server that is already ONLINE. An ONLINE server can accept and process file transfer jobs. The state of STARTING indicates that the server is in an intermediate state, either not fully able to respond, or not fully online. The values of START_FAILED can indicate an error condition. No response is returned from this call.
stop_serverexecregion, ServerIdChanges the state of a file transfer protocol-enabled server from ONLINE to OFFLINE. An OFFLINE server cannot accept and process file transfer jobs. Information tied to your server, such as server and user properties, are not affected by stopping your server. Stopping the server does not reduce or impact your file transfer protocol endpoint billing; you must delete the server to stop being billed. The state of STOPPING indicates that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of STOP_FAILED can indicate an error condition. No response is returned from this call.
test_identity_providerexecregion, ServerId, UserNameIf the IdentityProviderType of a file transfer protocol-enabled server is AWS_DIRECTORY_SERVICE or API_Gateway, tests whether your identity provider is set up successfully. We highly recommend that you call this operation to test your authentication method as soon as you create your server. By doing so, you can troubleshoot issues with the identity provider integration to ensure that your users can successfully use the service. The ServerId and UserName parameters are required. The ServerProtocol, SourceIp, and UserPassword are all optional. Note the following: You cannot use TestIdentityProvider if the IdentityProviderType of your server is SERVICE_MANAGED. TestIdentityProvider does not work with keys: it only accepts passwords. TestIdentityProvider can test the password operation for a custom Identity Provider that handles keys and passwords. If you provide any incorrect values for any parameters, the Response field is empty. If you provide a server ID for a server that uses service-managed users, you get an error: An error occurred (InvalidRequestException) when calling the TestIdentityProvider operation: s-server-ID not configured for external auth If you enter a Server ID for the --server-id parameter that does not identify an actual Transfer server, you receive the following error: An error occurred (ResourceNotFoundException) when calling the TestIdentityProvider operation: Unknown server. It is possible your sever is in a different region. You can specify a region by adding the following: --region region-code, such as --region us-east-2 to specify a server in US East (Ohio).

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes a file transfer protocol-enabled server that you specify by passing the ServerId parameter. The response contains a description of a server's properties. When you set EndpointType to VPC, the response will contain the EndpointDetails.

SELECT
arn,
as_2_service_managed_egress_ip_addresses,
certificate,
domain,
endpoint_details,
endpoint_type,
host_key_fingerprint,
identity_provider_details,
identity_provider_type,
ip_address_type,
logging_role,
post_authentication_login_banner,
pre_authentication_login_banner,
protocol_details,
protocols,
s3_storage_options,
security_policy_name,
server_id,
state,
structured_log_destinations,
tags,
user_count,
workflow_details
FROM aws.transfer.servers
WHERE region = '{{ region }}' -- required
;

INSERT examples

Instantiates an auto-scaling virtual server based on the selected file transfer protocol in Amazon Web Services. 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.

INSERT INTO aws.transfer.servers (
Certificate,
Domain,
EndpointDetails,
EndpointType,
HostKey,
IdentityProviderDetails,
IdentityProviderType,
LoggingRole,
PostAuthenticationLoginBanner,
PreAuthenticationLoginBanner,
Protocols,
ProtocolDetails,
SecurityPolicyName,
Tags,
WorkflowDetails,
StructuredLogDestinations,
S3StorageOptions,
IpAddressType,
region
)
SELECT
'{{ Certificate }}',
'{{ Domain }}',
'{{ EndpointDetails }}',
'{{ EndpointType }}',
'{{ HostKey }}',
'{{ IdentityProviderDetails }}',
'{{ IdentityProviderType }}',
'{{ LoggingRole }}',
'{{ PostAuthenticationLoginBanner }}',
'{{ PreAuthenticationLoginBanner }}',
'{{ Protocols }}',
'{{ ProtocolDetails }}',
'{{ SecurityPolicyName }}',
'{{ Tags }}',
'{{ WorkflowDetails }}',
'{{ StructuredLogDestinations }}',
'{{ S3StorageOptions }}',
'{{ IpAddressType }}',
'{{ region }}'
RETURNING
server_id
;

UPDATE examples

Updates the file transfer protocol-enabled server's properties after that server has been created. The UpdateServer call returns the ServerId of the server you updated.

UPDATE aws.transfer.servers
SET
Certificate = '{{ Certificate }}',
ProtocolDetails = '{{ ProtocolDetails }}',
EndpointDetails = '{{ EndpointDetails }}',
EndpointType = '{{ EndpointType }}',
HostKey = '{{ HostKey }}',
IdentityProviderDetails = '{{ IdentityProviderDetails }}',
LoggingRole = '{{ LoggingRole }}',
PostAuthenticationLoginBanner = '{{ PostAuthenticationLoginBanner }}',
PreAuthenticationLoginBanner = '{{ PreAuthenticationLoginBanner }}',
Protocols = '{{ Protocols }}',
SecurityPolicyName = '{{ SecurityPolicyName }}',
ServerId = '{{ ServerId }}',
WorkflowDetails = '{{ WorkflowDetails }}',
StructuredLogDestinations = '{{ StructuredLogDestinations }}',
S3StorageOptions = '{{ S3StorageOptions }}',
IpAddressType = '{{ IpAddressType }}',
IdentityProviderType = '{{ IdentityProviderType }}'
WHERE
region = '{{ region }}' --required
AND ServerId = '{{ ServerId }}' --required
RETURNING
server_id;

DELETE examples

Deletes a user's Secure Shell (SSH) public key.

DELETE FROM aws.transfer.servers
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Adds a host key to the server that's specified by the ServerId parameter.

EXEC aws.transfer.servers.import_host_key
@region='{{ region }}' --required
@@json=
'{
"ServerId": "{{ ServerId }}",
"HostKeyBody": "{{ HostKeyBody }}",
"Description": "{{ Description }}",
"Tags": "{{ Tags }}"
}'
;