This is a guide on how to setup a secure cloud-based SFTP transfer server. It uses EC2 attached to an elastic Public IP, then stores the files in a standard S3 bucket.
- Terraform install guide
- AWS CLI setup
-
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install
- Login to AWS console.
- Click username in top right corner
- Click "Security credentials"
- Scroll down to "Access Keys"
- Create access key - CLI - Next
- Copy - **AWS Access Key ID:** `AKIA...` & **AWS Secret Access Key:** `wJalr...`
# paste in Access Key and Secret Access Key when prompted
aws configure-
aws sts get-caller-identity
-
git clone https://github.com/RylanConrad/apk-capture.git
- Navigate to apk-capture/terraform/variables.tf
- Paste in the vendors public key
variable "transfer_public_key" {
description = "transferuser public key"
type = string
default = "<PASTE_VENDORS_KEY_HERE>"
}cd apk-capture/terraform
# Install the necessary terraform providers
terraform init
# Build for real
terraform applyTo securely send us your APK:
# From the workstation you gave us the public key from.
sftp transferuser@44.205.201.65