{"id":3092,"date":"2021-05-14T13:59:00","date_gmt":"2021-05-14T11:59:00","guid":{"rendered":"https:\/\/blog.besharp.it\/?p=3092"},"modified":"2021-05-14T17:06:17","modified_gmt":"2021-05-14T15:06:17","slug":"managing-an-amazon-s3-bucket-via-sftp-using-aws-transfer-family","status":"publish","type":"post","link":"https:\/\/blog.besharp.it\/managing-an-amazon-s3-bucket-via-sftp-using-aws-transfer-family\/","title":{"rendered":"Managing an Amazon S3 bucket via SFTP using AWS Transfer Family"},"content":{"rendered":"\n
Protocols for file transfer to remote servers have been around since the dawn of computer networking. FTP (exactly, File Transfer Protocol) is one of the fundamental building blocks of the internet. Developed by an MIT student in the early 1970s, FTP has become the standard for remote file transfer and management for decades.<\/p>\n\n\n\n
Over the years, FTP has been upgraded to provide several advantages. Most importantly, SFTP and FTPS have been developed to supplant the historical protocol by establishing secure data streams.<\/p>\n\n\n\n
The managed AWS service, AWS Transfer Family, provides a fully managed set of resources to support an additional way to transfer files in and out of AWS. This service allows the exposure of a convenient interface to manage objects on Amazon S3 and Amazon EFS using well-known file transfer protocols like FTP, SFTP, and FTPS.<\/p>\n\n\n\n
How does it work?<\/h2>\n\n\n\n
This AWS service allows you to avoid the maintenance hurdles of self-managed FTP servers. In fact, AWS Transfer Family takes care of scaling the underlying EC2 servers granting the right capabilities, keeping the whole service highly available.<\/p>\n\n\n\n
For user authentication, AWS Transfer Family allows you to choose between service-managed and custom solutions. The first option, however, while allowing a very quick configuration of the service using Aws generated SSH RSA keys for SFTP Authentication, does not support the integration with existing authentication mechanisms or even plain old username password authentication.. The second option instead, gives you \u201ccarte blanche\u201d when you need to integrate an existing identity provider. For example it is possible to use LDAP or Microsoft Active Directory as IdP, or set up custom Auth systems backed by ad-hoc lambda functions.<\/p>\n\n\n\n
As said before, AWS Transfer Family allows access to remote files stored on S3 or EFS by employing FTP, SFTP, and FTPS protocols. It\u2019s important to note that the usage of FTP is not supported for internet-facing workloads, in fact, simple FTP connections are considered insecure due to the plain text transfer of credentials, allowing only VPC mode.<\/p>\n\n\n\n
Why do I need AWS Transfer Family?<\/h2>\n\n\n\n
The provisioning of the infrastructure needed to maintain an architecture enabling FTP, SFTP, or FTPS file transfer can be very burdensome in both economic and maintenance terms, AWS Transfer Family allows you to configure new environments or migrate existing ones limiting these concerns.<\/p>\n\n\n\n
It must be pointed out that the migration of similar workloads to AWS Transfer Family doesn\u2019t affect the user experience, allowing them to use the FTP clients that they are accustomed to, such as Cyberduck, FileZilla, WinSCP, etc.<\/p>\n\n\n\n
Meanwhile, the usage of this service allows you to bring your data into a durable and highly available storage service. As we\u2019ll see in the following part, the adoption of S3, for example, can give space to a significant number of interesting business cases.<\/p>\n\n\n\n
Self-managed user authentication<\/h2>\n\n\n\n
To configure self-managed user authentication in AWS Transfer Family, we\u2019ll need to specify an API Gateway endpoint and a role to invoke it.<\/p>\n\n\n\n