Spin up the EC2 instance
Find the AMI
- Go to the AWS console > EC2 > AMIs
- Search for
ami-032ee389d7590ba9b (for us-east-1).
- You probably won’t see any results. To the left of the search box, change Owned by me to Private images
- You should now see an AMI named
- With that AMI selected, go to Actions > Launch
Spin up the AMI
- Accept the default network settings for the default VPC, subnet, and auto-assign public IP. This should result in getting a public IP.
- When specifying an IAM role, leave it as None (you’ll create the IAM role later)
- Leave storage at 32 GB. For storage volume type, make sure it’s General Purpose SSD (gp2)
- For the security group, grant yourself access on TCP ports 22, 80, and 443. For the source, use your own IP address rather than the wildcard
- Select an EC2 key pair that you have access to
Elastic IP address
You want to assign yourself an Elastic IP address, which is like a static IP address. Otherwise, your public IP address will change whenever you stop the EC2 instance.
- Go to EC2 > Elastic IPs
- Click Allocate new address
- Click Allocate
- Click on the newly allocated IP address
- Under Actions, select Associate address
- From the Instance drop-down, select your EC2 instance
- Click Associate
Reset the admin password
In order to use the web interface to manage users, you’ll have to first reset the admin password.
- Paste the elastic IP address into your web browser.
- You should see a link that says Click here to access your admin interface. Click on that link.
- You should see an SSL warning, which is a result of using a self-signed certificate. Bypass it by clicking Advanced > Proceed to
- You should see a page with instructions for resetting your admin password
You won’t be able to log into the admin interface until you’ve reset the password via the command line.
- SSH into your EC2 instance
- Reset the admin password:
sudo resetadminpassword <your-password>
- Refresh the web browser, and you should now be able to enter in your admin password
Create IAM policy
At the moment, the EC2 instance doesn’t have any permissions to access S3. It’s also missing other permissions it needs to function normally, like listing KMS keys and writing CloudWatch logs.
- Go to the AWS console > IAM > Policies
- Click Create policy
- Select the JSON tab
- Paste in the following (make sure you replace the EC2 instance ID
i-abcdefg1234567890with your own):
- On the Review policy page, type
SFTPGateway for the Name
- Click Create Policy
Create the IAM role
- Go to the AWS console > IAM > Roles
- Click Create role
- When choosing a service for this role, click EC2 and then Next: Permissions
- On the attach a permissions policy page, look for Filter policies and select Customer managed
- Check the box next to the
SFTPGateway policy you created earlier
- Click Next: Tags
- Click Next: Preview
- Type in
SFTPGatewayRole as the Role name
- Click Create role
Associate the IAM role
- Go to the AWS console > EC2 and select your EC2 instance
- Go to Actions > Instance Settings > Attach/Replace IAM Role
- From the drop down list, select the
SFTPGatewayRole you created earlier
- Click Apply
Where to go from here
Right now, your EC2 instance has the permissions it needs to manage users, and upload files to your default S3 bucket.
Refresh your web browser, and try creating a user.
If you need access to additional S3 buckets, check out our documentation: Restrict S3 access on your IAM policy