Part 18 of Learn AWS from Scratch

More Storage and Transfer Services

Ready-made file systems in FSx, linking your office to cloud storage with Storage Gateway, moving data with DataSync and Transfer Family, what to do when your data outgrows the internet, and a full comparison of storage services.

In this article
  1. Amazon FSx: ready-made file systems
  2. Storage Gateway: your office and the cloud
  3. Moving data
  4. Comparing storage services
  5. Hands-on: syncing with DataSync
  6. Summary
  7. Test yourself

In the previous parts we covered S3 in detail. But there are cases it doesn't solve: a Windows application needing a shared folder, servers in your office wanting to reach the cloud, a partner sending files over SFTP, or huge data that has to move.

Here's this part's map:

You want Use
A Windows file system or very high performance Amazon FSx
Your office servers reaching cloud storage Storage Gateway
Moving and syncing large data on a schedule DataSync
Partners uploading files over SFTP Transfer Family
Physically moving massive amounts Data Transfer Terminal

Amazon FSx: ready-made file systems

We've seen EFS for a shared Linux file system. FSx runs well-known file systems for you as a managed service, so you don't have to manage them yourself:

Type Protocol Good for
FSx for Windows SMB Windows applications and shared folders, tied into Active Directory
FSx for Lustre Lustre High-performance computing and model training, integrates with S3, Linux devices only
FSx for NetApp ONTAP NFS, SMB and iSCSI Moving NetApp systems, and different operating systems on the same data
FSx for OpenZFS NFS Linux workloads, moving ZFS systems, instant snapshots and clones

FSx for Lustre has two options: Scratch is cheap and fast for temporary data, but the data has no copies, so a failed disk loses it. Persistent is for long-term data, with copies inside the Availability Zone.

Storage Gateway: your office and the cloud

Have servers in your office and want to benefit from the cloud without changing your applications? Storage Gateway is software you run on-site as a virtual machine. It presents ordinary storage to your applications, while the data actually lives in AWS, with a local cache for recent files.

Your office Your apps Gateway With a local cache NFS, SMB, iSCSI or tape AWS S3 EBS snapshots Glacier
Applications in your office see ordinary storage through the gateway, which keeps the data in S3, EBS snapshots or Glacier.
Type Your apps see it as Where the data is Example
S3 File Gateway An NFS or SMB folder Objects in S3 Shared folders and file backups
Volume Gateway An iSCSI disk S3 with EBS snapshots Disks for existing servers, cached or with a full local copy
Tape Gateway A virtual tape library S3, then Glacier Backup software that relies on tape

There's a fourth type called FSx File Gateway that's no longer available to new customers, and AWS advises connecting to FSx directly.

Moving data

DataSync

DataSync moves and syncs large data on a schedule:

  • From where to where: from NFS, SMB or HDFS servers or object storage, to S3, EFS or FSx, and between AWS services themselves.
  • Agent: you run an agent on-site to move from your office, and don't need one between AWS services.
  • It moves only what changed on each run, preserves permissions and dates, and verifies data integrity.

Transfer Family

Have partners or older systems sending files over SFTP, FTPS, FTP or AS2, and don't want to run a server for them? Transfer Family gives you a managed receiving endpoint, and the files go to S3 or EFS. Users come from within the service, Active Directory or your own identity system.

Note that FTP is unencrypted, so it's available only inside a VPC. You pay by the hour for each endpoint, even without use.

When your data outgrows the internet

Before choosing how to move data, do the math. These are theoretical times at the line's full speed, and reality is slower:

Size 100 Mbps 1 Gbps 10 Gbps
1 TB 22 hours 2 hours 13 minutes
10 TB 9 days 22 hours 2 hours
100 TB 93 days 9 days 22 hours
1 PB 2.5 years 93 days 9 days

You have these options for large amounts:

  • DataSync if your line can take it, with ongoing sync.
  • Direct Connect if the transfer is large and continuous, as explained in part fourteen.
  • Data Transfer Terminal: physical sites you visit with your own storage devices, connecting them to AWS's network at high speed.

Comparing storage services

Service Type Good for
S3 Object Files, photos, backups and static sites
S3 Glacier Object archive Data that's rarely requested
EBS Network disk A disk for one server, and databases
Instance Store Temporary local disk Top speed for temporary data
EFS Linux files A folder shared between several servers
FSx for Windows SMB files Shared folders for Windows applications
FSx for Lustre High-performance files High-performance computing and model training
FSx for ONTAP Multi-protocol files Moving NetApp systems
FSx for OpenZFS NFS files Linux workloads and moving ZFS systems
Storage Gateway Bridge Your office reaching cloud storage
DataSync Transfer Scheduled sync
Transfer Family Transfer Receiving files over SFTP and friends

Hands-on: syncing with DataSync

We'll move files between two buckets, which needs no agent. From CloudShell, prepare two buckets and some files:

Bash
SRC=series-src-$RANDOM$RANDOM
DST=series-dst-$RANDOM$RANDOM

aws s3 mb s3://$SRC
aws s3 mb s3://$DST

for i in 1 2 3; do
  echo "file $i" > file$i.txt
  aws s3 cp file$i.txt s3://$SRC/
done

echo "source: $SRC  destination: $DST"

Open DataSync in the console and choose Create task:

  1. Source: create a new location of type S3, select the series-src-... bucket, and choose to create an IAM role automatically.
  2. Destination: the same with the series-dst-... bucket.
  3. Settings: name the task series-sync, choose Enhanced if a mode option appears, and leave the rest as it is.
  4. Run: create the task, then choose Start.

When it finishes, check the destination:

Bash
aws s3 ls s3://$DST/

Now add one file and run the task again:

Bash
echo "file 4" > file4.txt
aws s3 cp file4.txt s3://$SRC/

On the new run's page you'll find one file transferred, because DataSync moves only what changed. That's what sets it apart from a full copy every time.

Bash
aws s3 rb s3://$SRC --force
aws s3 rb s3://$DST --force

Summary

  • FSx offers ready-made file systems: Windows, Lustre, ONTAP and OpenZFS.
  • Storage Gateway lets your office see the cloud as ordinary storage.
  • DataSync is for scheduled sync, and Transfer Family for receiving over SFTP.
  • Work out the transfer time before deciding, and note that Snowball is closed to new customers.

Test yourself

Before you move on, try these questions to check you've got this part. Each one is a practical scenario, and the explanation appears once you answer.

Question 1 of 5

A company is moving a Windows application that keeps its files on a shared SMB folder, with users signing in through Active Directory. It wants a managed service with no file servers to run. What fits?

Show the answer

Correct answer: A

This gives Windows applications a real SMB file share tied into Active Directory, and AWS runs it for you.

  • B: EFS is a shared file system for Linux, over NFS.
  • C: This is for high-performance computing, and works with Linux devices only.
  • D: S3 is reached through an API, and isn't a folder an application can open over SMB.

Review: Amazon FSx: ready-made file systems in this part, and What is FSx for Windows File Server? in the AWS docs.

Question 2 of 5

A research team runs a three-day simulation on a Linux cluster. It reads its input from S3, needs very high throughput, and saves its results back to S3, so a failed file system would only mean a re-run. Which option costs the least?

Show the answer

Correct answer: C

Lustre is built for this speed and integrates with S3, and Scratch is the cheap option for temporary data, since nothing here depends on the data surviving a failure.

  • A: This is for SMB file shares, not high-performance Linux clusters.
  • B: This suits long-term data, and you'd pay for copies the team doesn't need.
  • D: This is a general shared folder, and isn't built for this level of performance.

Review: Amazon FSx: ready-made file systems in this part, and Deployment and storage class options for FSx for Lustre file systems in the AWS docs.

Question 3 of 5

A hospital's backup software writes to physical tapes, and staff are tired of storing and shipping them. It wants the backups in AWS, without changing the backup software. What fits?

Show the answer

Correct answer: B

This presents a virtual tape library to the backup software, and the data goes to S3 and then Glacier.

  • A: This shows applications an NFS or SMB folder, while this software writes to tape.
  • C: This shows servers an iSCSI disk, not a tape library.
  • D: This receives files over protocols such as SFTP, which tape-based software doesn't use.

Review: Storage Gateway: your office and the cloud in this part, and What is Tape Gateway? in the AWS docs.

Question 4 of 5

A new AWS customer has 100 TB on its own storage devices, which must be in S3 within two weeks. Its only line runs at 100 Mbps. What fits?

Show the answer

Correct answer: D

The team takes its own storage devices to a physical AWS site with a high-speed connection and uploads from there, so the slow line no longer matters.

  • A: At full speed, 100 TB over this line takes about 93 days.
  • B: This is closed to new customers.
  • C: Setting it up takes weeks and sometimes months, so it could miss the deadline.

Review: When your data outgrows the internet in this part, and What is Data Transfer Terminal? in the AWS docs.

Question 5 of 5

A company is leaving its data center. Its 30 TB NFS server must be copied to AWS and kept in sync until the cutover, and its partners send daily files over SFTP and can't change how they do it. Which two services fit? (Choose two.)

Show the answer

Correct answer: B + E

DataSync copies the NFS data, and on each later run moves only what changed. Transfer Family gives partners a managed SFTP endpoint, with their files going to S3 or EFS.

  • A: This is for backup software that writes to tape.
  • C: This is a high-performance file system, and doesn't move data out of a data center.
  • D: This shows on-site servers an iSCSI disk, and the company is leaving its site.

Review: DataSync and Transfer Family in this part, and How AWS DataSync works and What is AWS Transfer Family? in the AWS docs.

That completes the storage section. You now have a strong application with a database, a network and storage, but its pieces are all wired directly together. In part nineteen we start the modern applications section, separating them with SQS, SNS and Kinesis.