Create an SFTP connector with VPC-based egress
This topic provides step-by-step instructions for creating SFTP connectors with VPC connectivity. VPC_LATTICE-enabled connectors use Amazon VPC Lattice to route traffic through your Virtual Private Cloud, enabling secure connections to private endpoints or using your own NAT gateways for internet access.
When to use VPC connectivity
Use VPC connectivity for SFTP connectors in these scenarios:
-
Private SFTP servers: Connect to SFTP servers that are only accessible from your VPC.
-
On-premises connectivity: Connect to on-premises SFTP servers through AWS Direct Connect or AWS Site-to-Site VPN connections.
-
Custom IP addresses: Use your own NAT gateways and Elastic IP addresses, including BYOIP scenarios.
-
Centralized security controls: Route file transfers through your organization's central ingress/egress controls.

Prerequisites for VPC_LATTICE-enabled SFTP connectors
Before creating a VPC_LATTICE-enabled SFTP connector, you must complete the following prerequisites:
How VPC-based connectivity works
VPC Lattice enables you to securely share VPC resources with other AWS services. AWS Transfer Family uses a service network to simplify the resource sharing process. The key components are:
-
Resource Gateway: Serves as the point of access into your VPC. You create this in your VPC with a minimum of two Availability Zones.
-
Resource Configuration: Contains the private IP address or public DNS name of the SFTP server you want to connect to.
When you create a VPC_LATTICE-enabled connector, AWS Transfer Family uses Forward Access Session (FAS) to temporarily obtain your credentials and associate your Resource Configuration with our service network.
Required setup steps
-
VPC infrastructure: Ensure you have a properly configured VPC with the necessary subnets, route tables, and security groups for your SFTP server connectivity requirements.
-
Resource Gateway: Create a Resource Gateway in your VPC using the VPC Lattice
create-resource-gateway
command. The Resource Gateway must be associated with subnets in at least two Availability Zones. For more information, see Resource gateways in the Amazon VPC Lattice User Guide. -
Resource Configuration: Create a Resource Configuration that represents the target SFTP server using the VPC Lattice
create-resource-configuration
command. You can specify either:-
A private IP address for private endpoints
-
A public DNS name for public endpoints (IP addresses are not supported for public endpoints)
-
-
Authentication credentials: Store the SFTP user credentials in AWS Secrets Manager as described in Store authentication credentials for SFTP connectors in Secrets Manager .
Important
The Resource Gateway and Resource Configuration must be created in the same AWS account. When creating a Resource Configuration, you must first have a Resource Gateway in place.
For more information on VPC resource configurations, see Resource configurations in the Amazon VPC Lattice User Guide.
Note
VPC connectivity for SFTP connectors is available in AWS Regions where
Amazon VPC Lattice resources are available. For more information, see VPC Lattice FAQs
Create a VPC_LATTICE-enabled SFTP connector
After completing the prerequisites, you can create an SFTP connector with VPC connectivity using the AWS CLI, AWS Management Console, or AWS SDKs.
Monitoring VPC connector status
VPC_LATTICE-enabled connectors have an asynchronous setup process. After creation, monitor the connector status:
-
PENDING: The connector is being provisioned. Service network provisioning is in progress, which typically takes several minutes.
-
ACTIVE: The connector is ready for use and can transfer files.
-
ERRORED: The connector failed to provision. Check the error details for troubleshooting information.
Check the connector status using the describe-connector
command:
aws transfer describe-connector --connector-id c-1234567890abcdef0
During the PENDING state, the test-connection
API will return "Connector
not available" until provisioning is complete.
Limitations and considerations
-
Public endpoints: When connecting to public endpoints through VPC, you must provide a DNS name in the Resource Configuration. Public IP addresses are not supported.
-
Regional availability: VPC connectivity is available in select AWS Regions. Cross-region resource sharing is not supported.
-
Availability Zone requirements: Resource Gateways must be associated with subnets in at least two Availability Zones. Not all Availability Zones support VPC Lattice in every region.
-
Connection limits: Maximum of 350 connections per resource with a 350-second idle timeout for TCP connections.
Cost considerations
There are no additional charges from AWS Transfer Family beyond regular service charges. However, customers may be subject to additional charges from Amazon VPC Lattice associated with sharing their Amazon Virtual Private Cloud resources, and NAT gateway charges if they use their own NAT gateways for egress to internet.
For complete AWS Transfer Family pricing information, see the AWS Transfer Family pricing
page
VPC connectivity examples for SFTP connectors
This section provides examples of creating SFTP connectors with VPC connectivity for various scenarios. Before using these examples, ensure you have completed the VPC infrastructure setup as described in the VPC connectivity documentation.
Example: Private endpoint connection
This example shows how to create an SFTP connector that connects to a private SFTP server accessible only from your VPC.
Prerequisites
-
Create a Resource Gateway in your VPC:
aws vpc-lattice create-resource-gateway \ --name my-private-server-gateway \ --vpc-identifier vpc-1234567890abcdef0 \ --subnet-ids subnet-1234567890abcdef0 subnet-0987654321fedcba0
-
Create a Resource Configuration for your private SFTP server:
aws vpc-lattice create-resource-configuration \ --name my-private-server-config \ --resource-gateway-identifier rgw-1234567890abcdef0 \ --resource-configuration-definition ipResource={ipAddress="10.0.1.100"} \ --port-ranges 22
Create the VPC_LATTICE-enabled connector
-
Create the SFTP connector with VPC connectivity:
aws transfer create-connector \ --access-role arn:aws:iam::123456789012:role/TransferConnectorRole \ --sftp-config UserSecretId=my-private-server-credentials,TrustedHostKeys="ssh-rsa AAAAB3NzaC..." \ --egress-config VpcLattice={ResourceConfigurationArn=arn:aws:vpc-lattice:us-east-1:123456789012:resourceconfiguration/rcfg-1234567890abcdef0,PortNumber=22}
-
Monitor the connector status until it becomes
ACTIVE
:aws transfer describe-connector --connector-id c-1234567890abcdef0
The remote SFTP server will see connections coming from the Resource Gateway's IP address within your VPC CIDR range.
Example: Public endpoint via VPC
This example shows how to route connections to a public SFTP server through your VPC to leverage centralized security controls and use your own NAT Gateway IP addresses.
Prerequisites
-
Create a Resource Gateway in your VPC (same as private endpoint example).
-
Create a Resource Configuration for the public SFTP server using its DNS name:
aws vpc-lattice create-resource-configuration \ --name my-public-server-config \ --resource-gateway-identifier rgw-1234567890abcdef0 \ --resource-configuration-definition dnsResource={domainName="sftp.example.com"} \ --port-ranges 22
Note
For public endpoints, you must use a DNS name, not an IP address.
Create the connector
-
Create the SFTP connector:
aws transfer create-connector \ --access-role arn:aws:iam::123456789012:role/TransferConnectorRole \ --sftp-config UserSecretId=my-public-server-credentials,TrustedHostKeys="ssh-rsa AAAAB3NzaC..." \ --egress-config VpcLattice={ResourceConfigurationArn=arn:aws:vpc-lattice:us-east-1:123456789012:resourceconfiguration/rcfg-0987654321fedcba0,PortNumber=22}
Traffic will flow from the connector to your Resource Gateway, then through your NAT Gateway to reach the public SFTP server. The remote server will see your NAT Gateway's Elastic IP address as the source.
Example: Cross-account private endpoint
This example shows how to connect to a private SFTP server in a different AWS account by using resource sharing.
Note
If you already have cross-VPC resource sharing enabled through other mechanisms, such as AWS Transit Gateway, you don't need to configure the resource sharing described here. The existing routing mechanisms, such as Transit Gateway route tables, are automatically used by SFTP connectors. You only need to create a Resource Configuration in the same account where you're creating the SFTP connector.
Account A (Resource Provider) - Share the Resource Configuration
-
Create Resource Gateway and Resource Configuration in Account A (same as previous examples).
-
Share the Resource Configuration with Account B using AWS Resource Access Manager:
aws ram create-resource-share \ --name cross-account-sftp-share \ --resource-arns arn:aws:vpc-lattice:us-east-1:111111111111:resourceconfiguration/rcfg-1234567890abcdef0 \ --principals 222222222222
Account B (Resource Consumer) - Accept and Use the Share
-
Accept the resource share invitation:
aws ram accept-resource-share-invitation \ --resource-share-invitation-arn arn:aws:ram:us-east-1:111111111111:resource-share-invitation/invitation-id
-
Create the SFTP connector in Account B:
aws transfer create-connector \ --access-role arn:aws:iam::222222222222:role/TransferConnectorRole \ --sftp-config UserSecretId=cross-account-server-credentials,TrustedHostKeys="ssh-rsa AAAAB3NzaC..." \ --egress-config VpcLattice={ResourceConfigurationArn=arn:aws:vpc-lattice:us-east-1:111111111111:resourceconfiguration/rcfg-1234567890abcdef0,PortNumber=22}
The connector in Account B can now access the private SFTP server in Account A through the shared Resource Configuration.
Common troubleshooting scenarios
Here are solutions for common issues when creating VPC_LATTICE-enabled connectors:
-
Connector stuck in PENDING status: Check that your Resource Gateway is ACTIVE and has subnets in supported Availability Zones. If the connector is still stuck with a status of PENDING, call
UpdateConnector
using the same configuration parameters that you used initially. This triggers a new status event that might resolve the problem. -
Connection timeouts: Verify security group rules allow traffic on port 22 and that your VPC routing is correct.
-
DNS resolution issues: For public endpoints, ensure your VPC has internet connectivity through a NAT Gateway or Internet Gateway.
-
Cross-account access denied: Verify the resource share is accepted and the Resource Configuration ARN is correct. If the proper permission policy is attached to the resource configuration when the origin account creates the resource share, these permissions are required:
vpc-lattice:AssociateViaAWSService
,vpc-lattice:AssociateViaAWSService-EventsAndStates
,vpc-lattice:CreateServiceNetworkResourceAssociation
,vpc-lattice:GetResourceConfiguration
.