Create FTP User for External Provider
Access to the Admin AWS account is required to create FTP users.
Prerequisites
- Clone the
infrastructurerepository and ensure your setup is configured for running Terraform scripts. - Request the following information to the provider:
- IT Contact (name, email address and phone number). Note: we'll share the account details with this person
- Public IP addresses used to access Pair Team's SFTP site. Note: This is required to whitelist them
Step 1 - Create the Automated Infrastructure
Open the projects/aws/prod project within the infrastructure repository.
Add the user and IP addresses to the FTP users list in Terraform. Assuming the provider is some_provider and the IP address is 1.2.3.4, edit the sftp_users variable in the terraform.auto.tfvars file:
sftp_users = [
...
{
user = "some_provider"
ips = ["1.2.3.4"]
}
]
Review and apply the Terraform changes:
terraform apply
Step 2 - Create Password
Generate a random password for the user using the following command:
openssl rand -base64 20 | tr -dc 'a-zA-Z0-9\$'
Open the AWS console, sign in to the Prod account, and navigate to the Secrets Manager service. Ensure you're in the us-west-2 region.
Locate the secret named SFTP/some_provider and click on it. Click Retrieve secret value, then click Edit.
Add a new Key/Value pair called Password and paste the password you generated in the previous step.
Save the changes.
Step 3 - Create Basic Directory Structure
Open the S3 bucket that acts as the FTP server.
Create a new directory called some_provider/, and within it, create two subdirectories named IN/ and OUT/.