SFTP Service
OpEx Sec Rel Perf Cost Sus
If you have applications or customers who need to transfer data in or out via SFTP, AWS Transfer for SFTP will help you. It allows clients to use the tools they are used to, but allows you take advantage of cheaper storage systems like S3! You can use the console to enable it but I’ve included source code to get this setup via terraform for you.
The code builds on our simple bucket example but adds in the transfer family:
resource "aws_transfer_server" "example" {
security_policy_name = "TransferSecurityPolicy-2020-06"
tags = {
Name = local.bucket_name
Project = "${var.project}"
Environment = "${var.env}"
Owner = "${var.owner}"
CostCenter = "${var.cost}"
Confidentiality = "${var.conf}"
}
}
You can now take advantage of S3s scale and features such as versioning and intelligent tiering but access in a traditional way. The Final thing you’ll need to do is add a user with a SSH key via the console. If you don’t have a SSH already just run:
ssh-keygen
Now head to the AWS transfer pages in the Web Console for AWS. Here you will be able to add a user and your public key.
You can now connect either by the sftp command,
sftp localfile remote_file_directory/.
Or use a visual tool. You’ll need the provate key to connect.