Grant your EC2 instance access to all S3 buckets
How to attach a Managed policy in IAM
This wiki article applies to users prior to version 1.003 that used the CloudFormation template, and need to get access to custom S3 buckets.
The CloudFormation template tailored permissions down to the single default S3 bucket that gets generated with SFTPGateway. However, if you want to create custom S3 buckets, you need to open up permissions in IAM. The easiest way to do this is to attach a managed policy to your existing role.
Locate the role for your EC2 instance
- Within CloudFormation, select your stack and click on the Resources tab.
- Look for a resource of named
S3WritableRole
, and click on the Physical ID link. - This should open up a new tab with the IAM role
Using the CloudFormation resources tab is a quick and easy way to navigate through the AWS console.
Attach a managed policy
- On the IAM role page, click
Attach policy
- In the Search box, type
S3
- Check the box next to
AmazonS3FullAccess
- Click
Attach policy
- On the IAM role page, the
AmazonS3FullAccess
policy should appear on the list of policies
At the point, your EC2 instance should have the permissions to create and write to any bucket in your account.