Skip to content

AWS Setup

Erik Hetzner edited this page Apr 2, 2018 · 3 revisions

Setting up AWS is never easy. To make it a little easier, we provide a rake task that will:

  1. Create a new S3 bucket
  2. Create a new IAM user that has access only to the bucket created in step (1)
  3. Set up the appropriate CORS restrictions on the bucket
  4. Output configuration suitable for appending to your .env file

This rake task can be run as rake s3:create_bucket. If, when running bin/setup, you do not have a configuring S3 setup in your .env.development file, this rake task will be run automatically and the configuration appended to your .env.development file.

The only hard thing here is that for the rake task to work, you will need to provide it with an access key that has sufficient permissions to create a new S3 bucket and IAM user.

The simplest way to do this is to create a new root access key. This is not a best practice, but you can delete the key after you use it to create the new IAM user.

You will need an active AWS account to get started. Visit https://aws.amazon.com/ to get started.

To get started, click on you account name dropdown and select “My Security Credentials”

Screenshot of Security Credentials

Click on “Continue to Security Credentials”

Screenshot of Security Credentials confirmation

Expand the “Access keys”

Screenshot of Your Security Credentials

Click “Create New Access Key”

Screenshot of Create new access key

Click “Show Access Key”

Screenshot of Show access key

Use the displayed access key to answer the prompts when running bin/setup or rake s3:create_bucket

Screenshot of Access key display

Delete the access key.

Screenshot of delete key

Clone this wiki locally