AWS S3 Credentials

To use the S3 connector, we need to create a User with the appropriate permissions. This guide will show you how to create credentials with the minimal permissions you need to access a bucket.

Get Bucket name and region

  1. Login to your AWS account
  2. Go to S3
  3. Find the bucket you want
  4. Get the name of the bucket and it's region

Create Policy

  1. Go to Identity and Access Management (IAM)
  2. On the left hand menu, select Policies under Access management
  3. Click Create policy in the top right hand corner
  4. In the Policy editor header, click JSON
  5. Set the content with the following. Make sure to replace {your-bucket-name} with the name of your bucket.
  6. {
        "Version": "2012-10-17",
        "Statement": [
            {
            "Effect": "Allow",
            "Action": [
                    "s3:GetObject",
                    "s3:ListBucket"
            ],
            "Resource": [
                    "arn:aws:s3:::{your-bucket-name}/*",
                    "arn:aws:s3:::{your-bucket-name}"
            ]
            }
        ]
    }
    
  7. Click Next
  8. Give the policy a name like "Ragie bucket access" or whatever you like
  9. Click Create policy

Create user

  1. Go to Identity and Access Management (IAM)
  2. On the left hand menu, select Users under Access management
  3. Click Create user in the top right hand corner
  4. Give the user any name you like and click Next in the bottom right
  5. Under Permissions options select Attach policies directly
  6. In the Permissions policies search below, search for the policy you added above. In my case I called it "Ragie bucket access" so I search for that - without the quotes.
  7. Select the policy in the list below and click Next
  8. Click Create user in the bottom right

Get Credentials

  1. Go to Identity and Access Management (IAM)
  2. On the left hand menu, select Users under Access management
  3. Select the user you created above
  4. Find and select the Security credentials tab
  5. Click Create access key
  6. Select Other for the use-case and click Next
  7. Click Create access key
  8. Copy the Access key and Secret access key somewhere. This is very important.

That's it. You now have the

  • Access key
  • Secret access key
  • Region