I want to activate a static Elastic IP address for my AWS Transfer Family SFTP or FTPS server.
Resolution
To activate an Elastic IP address for your Transfer Family SFTP or FTPS server, use either the Transfer Family console or the AWS Command Line Interface (AWS CLI).
Note: This configuration doesn't apply to FTP activated servers.
Use the Transfer Family console
To use the Transfer Family console to activate an Elastic IP address for your server, see Change the endpoint type for your server.
Use the AWS CLI
If you receive errors when you run AWS CLI commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.
Complete the following steps:
Note: Replace server-id with your Transfer Family server ID and SubnetIds, VpcId, and AddressAllocationIds with your subnet, VPC, and address allocation IDs.
-
Run the stop-sever command to stop the server:
$ aws transfer stop-server --server-id s-1234567890abcdef
-
Run the server-offline command to confirm that the server is offline:
$ aws transfer wait server-offline --server-id s-1234567890abcdef
Note: If the server is offline, then the server-offline command automatically closes.
-
Run the update-server command to update the server endpoint type to a VPC:
$ aws transfer update-server --server-id s-1234567890abcdef --endpoint-type VPC --endpoint-details SubnetIds=subnet-123abc,VpcId=vpc-123abc
-
Run the update-server command to associate the VPC endpoint to an Elastic IP address:
$ aws transfer update-server --server-id s-1234567890abcdef --endpoint-type VPC --endpoint-details AddressAllocationIds=eipalloc-123456abcdef,SubnetIds=subnet-123abc,VpcId=vpc-123abc
-
Run the start-server command to start the server:
$ aws transfer start-server --server-id s-1234567890abcdef
To use the Boto3 AWS SDK to update the server endpoint type, see Updating the server EndpointType using the API.
Related information
How can I enable Elastic IP addresses on my AWS Transfer Family SFTP-enabled server endpoint?