This module aims to create a SFTP Server on AWS with an identity provider (IdP) based on users and passwords.
- The SFTP Server is created using the AWS Transfer Family service.
- The IdP is created using lambda functions and API Gateway.
This module will show the DNS and EndPoint that will allow us to connect to SFTP.
The credentials can be stord as AWS Secrets Manager.
The infrastructure code is based on the example provided (in the CF template) in the AWS Storage Blog article https://aws.amazon.com/blogs/storage/enable-password-authentication-for-aws-transfer-family-using-aws-secrets-manager-updated/
- IAM Roles for:
- Lambda
- Transfer
- Lambda functions
- API Gateway
- SFTP Server
- CloudWatch Log Group
module "sftp" {
source = "andresb39/sftp/aws"
version = "0.0.3"
zone_name = "example.com" # Optional
stage = "dev"
tags = {
Environment = "dev"
Project = "sftp"
Team = "devops"
}
}
- Complete: With this example we are going to create a SFTP server with Identity Provider + S3 bucket + Credentials in AWS Secret Manage
Name | Version |
---|---|
terraform | >= 1.6.0 |
archive | >= 2.4.0 |
aws | >= 5.38 |
random | >= 3.5.1 |
Name | Version |
---|---|
archive | >= 2.4.0 |
aws | >= 5.38 |
random | >= 3.5.1 |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
aws_region | The AWS region to deploy to | string |
"us-east-1" |
no |
sftp_name | The name of the SFTP server | string |
"sftp" |
no |
stage | Stage (e.g. dev, test, prod) | string |
"dev" |
no |
tags | Tags for the resources | map(string) |
{ |
no |
zone_name | The name of the Route53 zone | string |
"" |
no |
Name | Description |
---|---|
endpoint | The endpoint of the SFTP server (e.g. s-12345678.server.transfer.us-west-2.amazonaws.com) |
sftp_dns | The DNS of the SFTP server (e.g. sftp.example.com) |