Sponsored by Share911 - Get help, faster
This is a sample project that shows how to create an image uploader using Amazon S3, Meteor, and the slingshot package. Make sure to follow the AWS IAM Setup below before running the sample project.
- Navigate to IAM home https://console.aws.amazon.com/iam/home
- Navigate to Users -> Create New Users
- Specify username
- Make sure generate access key is checked
- Show user security credentials and add to
settings.json
asAWSAccessKeyId
andAWSSecretAccessKey
- Navigate to Policies -> Create New Policy
- Select “Create Your Own Policy”
- Give it a name, description
- Paste the text from This File into
Policy Document
making sure to replace (2 occurences) with the name of your bucket you will create in step 4) - Select your newly created policy (you may need to filter for it) and choose “Policy Actions” -> “Attach” and attach your user you created in step 2)
- Navigate to s3 home https://console.aws.amazon.com/s3/home
- Create a bucket with a name (which you used in step 3) and select “US Standard” Region 1. Note that the region can be different, but requires additional setup with slingshot to work
- Select the bucket and then click the
Properties
tab in the top right - Click “Permissions” to open the dropdown
1. Click
Add/Edit CORS configuration
and paste in the following Cors Configuration 2. ClickEdit Bucket policy
and paste in this Bucket Policy making sure to replace<awsaccountid>
with your account id (found in Account Settings),<iamusername>
with your iam user in part 2), and<bucketname>
you created above - Add your bucket name to settings.json using the
S3Bucket
key - You should be good to go!