Lesson 3 of 6 Batch Ingestion and Integration Services

Receiving Partner Files with AWS Transfer Family

This lesson explains how AWS Transfer Family provides managed SFTP, FTPS and FTP endpoints that store files directly in Amazon S3 or Amazon EFS, for partners and legacy systems that cannot change how they send files.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the supported protocols and storage options.
  • Choose an authentication method for partners.
  • Process uploaded files automatically with managed workflows.

Protocols and storage

AWS Transfer Family provides managed file transfer servers, so partners can keep sending files with the tools they already use. SFTP, file transfer over SSH, is the most common choice for exchanging files with partners. FTPS is FTP secured with TLS, for systems that require it. Plain FTP is unencrypted, so it is supported only inside a VPC, for legacy systems. AS2 is used for business-to-business exchange of EDI documents, with signed receipts that prove delivery. The following table summarises the protocols.

ProtocolTypical use
SFTPThe most common choice for partner file exchange over SSH
FTPSFTP secured with TLS, for systems that require it
FTPUnencrypted; only inside a VPC for legacy systems
AS2Business-to-business exchange of EDI documents with signed receipts

Files are stored in S3 or EFS, so they are immediately available to Glue, Athena and other services. SFTP connectors also let AWS push and pull files to and from external SFTP servers.

True or false

Transfer Family protocols

Exam skills 2.1.4

Decide whether each statement about Transfer Family is true.

Log in to try this activity Interactive activities are free with an account.

Authentication

Partners connecting to AWS Transfer Family can authenticate in several ways. Service-managed users are defined in Transfer Family itself and authenticate with SSH public keys, which suits a modest number of partners. AWS Directory Service lets users from Microsoft Active Directory sign in with their existing credentials. A custom identity provider, implemented with a Lambda function or API Gateway, connects to an existing user store, such as a legacy database of partner accounts.

Whichever method is used, each user maps to an IAM role and a home directory. The role and a session policy restrict the user to their own prefix in the S3 bucket, so partners cannot see or modify each other's files.

The following diagram shows how each supplier is confined to its own S3 prefix in a Transfer Family SFTP design that replaces an on-premises server.

The replacement SFTP design. Suppliers keep their clients and the existing host name, which Route 53 now points at a Transfer Family SFTP endpoint. Each service-managed user has an IAM role and a home directory under its own S3 prefix, so one supplier cannot reach another supplier's files.
The prefix names are illustrative.
Match the pairs

Partner authentication

Exam skills 2.1.4 · 4.1.2

Match each situation with the Transfer Family identity option.

Log in to try this activity Interactive activities are free with an account.

Managed workflows

Files uploaded by partners usually need processing before they can be used, and Transfer Family managed workflows perform that processing automatically after each upload, without separate event plumbing. A workflow is a sequence of steps.

  • Copy the file to another location, such as the raw zone of the data lake.
  • Tag the file, for example with the partner's name, so later processing and permissions can use the tag.
  • Decrypt files that partners encrypted with PGP.
  • Run a Lambda function for custom validation or processing, and delete the original upload.

Each workflow also has exception-handling steps that run if a step fails, for example moving the file to a quarantine location and notifying the operations team.

The following diagram shows a workflow's steps and its exception handling.

A Transfer Family managed workflow that runs after each upload: copy the file to the raw zone, tag it with the partner's name, decrypt PGP files, and run a Lambda function that validates the file and deletes the original. If a step fails, exception steps move the file to quarantine and notify the operations team.
A workflow can use any of these steps, in any order.
Put in order

A Transfer Family workflow

Exam skills 2.1.4 · 1.3.3

Put the steps of a managed workflow for partner uploads in order.

Log in to try this activity Interactive activities are free with an account.
Worked example

Partner files over SFTP

Forty suppliers upload daily stock files over SFTP to a server that the company wants to retire. The suppliers cannot change their software. The replacement design has the following elements.

RequirementDesign
Suppliers keep their SFTP clientsTransfer Family SFTP endpoint with the existing host name in Route 53
Each supplier sees only its own filesService-managed users, each with a role and home directory under its own prefix
Files are processed on arrivalA managed workflow copies each file to the raw zone, tags it with the supplier and invokes a validation Lambda function
Encrypted filesA workflow step decrypts PGP files with keys in Secrets Manager

Suppliers notice no change, and the files land directly in S3, where the existing batch pipeline picks them up.

Check yourself

Which Transfer Family protocol suits EDI exchange with trading partners?

Show answer

AS2. SFTP suits general partner file uploads.

Exam Tips

Remember for the exam

  • When partners must keep uploading files over SFTP, use Transfer Family with S3.
  • To process files after an SFTP upload, use Transfer Family managed workflows.
  • For EDI exchange with trading partners, use the AS2 protocol.
  • To authenticate against an existing user store, use a custom identity provider.
  • Restrict each partner to their own prefix through the user's role and home directory.