SFTP được quản lý với AWS Transfer Family
Đối tác quen gửi file qua SFTP; thay vì tự vận hành SFTP server trên EC2, có thể dùng một fully managed service giữ nguyên cách làm việc của đối tác nhưng lưu tệp trực tiếp vào AWS.
Các nhà cung cấp gửi bảng giá và chứng từ cho MFTECH qua SFTP. Hệ thống hiện tại gồm hai EC2 instance Linux, mỗi instance có một Elastic IP để nhà cung cấp cho phép trên firewall của họ; tài khoản Linux được tạo thủ công và phân quyền theo tệp; dữ liệu nằm trên một shared file system được mount vào cả hai instance. MFTECH muốn chuyển sang dịch vụ được quản lý nhưng giữ nguyên ba đặc điểm: địa chỉ IP cố định, chỉ IP của nhà cung cấp được kết nối, và phân quyền theo tệp.
AWS Transfer Family cung cấp server SFTP, FTPS, FTP và AS2 do AWS quản lý, lưu dữ liệu vào Amazon S3 hoặc Amazon EFS. Có ba quyết định cấu hình:
- Loại endpoint: Public; VPC hosted với access Internal (chỉ truy cập qua private IP của endpoint); hoặc VPC hosted với access Internet Facing, gắn Elastic IP tại từng subnet (loại này chỉ hỗ trợ SFTP và FTPS). Endpoint public không giới hạn được lưu lượng bằng security group.
- Giới hạn IP nguồn: security group gắn vào endpoint đặt trong VPC, chỉ cho phép các IP được liệt kê.
- Lưu trữ và phân quyền: với EFS, mỗi user được gán POSIX profile (user ID, group ID, secondary group ID) và một IAM role; EFS dùng các ID này để kiểm tra quyền trên từng tệp và thư mục. Với S3, quyền của user do IAM role và session policy quyết định.
Thử các tổ hợp cấu hình:
Chọn loại endpoint, cách giới hạn IP và nơi lưu trữ, sau đó nhấn Thử kết nối.
- SFTP được quản lý, IP cố định để đối tác cho phép trên firewall, chỉ nhận kết nối từ IP đã biết: Transfer Family với endpoint VPC hosted, internet-facing (Elastic IP) và security group.
- Giữ phân quyền theo tệp kiểu Linux trên shared file system: EFS với POSIX profile (UID/GID) cho từng user.
- Transfer Family chỉ lưu vào S3 hoặc EFS; AWS WAF chỉ kiểm tra request HTTP(S), không lọc SFTP.
Managed SFTP with AWS Transfer Family
Partners are used to sending files over SFTP; instead of running your own SFTP servers on EC2, a fully managed service keeps their workflow unchanged while storing files directly in AWS.
Suppliers send price lists and documents to MFTECH over SFTP. Today this runs on two Linux EC2 instances, each with an Elastic IP that the suppliers allow in their firewalls; Linux accounts are created by hand with file-level permissions; the data sits on a shared file system mounted on both instances. MFTECH wants a managed service but must keep three properties: fixed IP addresses, connections only from supplier IPs, and file-level permissions.
AWS Transfer Family provides AWS-managed SFTP, FTPS, FTP and AS2 servers that store data in Amazon S3 or Amazon EFS. There are three configuration decisions:
- Endpoint type: Public; VPC hosted with Internal access (reachable only through the endpoint’s private IPs); or VPC hosted with Internet Facing access and an Elastic IP in each subnet (this type supports only SFTP and FTPS). Public endpoints cannot restrict traffic with security groups.
- Source IP restriction: a security group on the VPC hosted endpoint that allows only the listed IPs.
- Storage and permissions: with EFS, each user gets a POSIX profile (user ID, group ID, secondary group IDs) and an IAM role; EFS uses these IDs to check permissions on every file and directory. With S3, a user’s permissions come from an IAM role and a session policy.
Try the combinations:
Chọn loại endpoint, cách giới hạn IP và nơi lưu trữ, sau đó nhấn Thử kết nối.
- Managed SFTP, fixed IPs for partners to allow in their firewalls, connections only from known IPs: Transfer Family with a VPC hosted, internet-facing endpoint (Elastic IPs) and a security group.
- Linux-style file-level permissions on a shared file system: EFS with a POSIX profile (UID/GID) per user.
- Transfer Family stores only to S3 or EFS; AWS WAF inspects only HTTP(S) requests and does not filter SFTP.