AWS S3 IAM Configuration

Let's create all necessary configurations for user "di-test" and existing S3 bucket named "di-test-bucket".

  1. Login into AWS Console - https://console.aws.amazon.com/

  2. Go to user's creation at Identity and Access Management (IAM) -> Users -> Add users

  3. Fill "di-test" as a User name

  4. Choose Attach policies directly and Create policy

  5. Choose JSON and paste following JSON data

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "s3:GetBucketLocation"
                    "s3:GetObjectAttributes",
                    "s3:PutObject",
                    "s3:GetObject",
                    "s3:ListBucket",
                    "iam:SimulatePrincipalPolicy"
                ],
                "Resource": [
                    "arn:aws:s3:::{bucket}/*",
                    "arn:aws:s3:::{bucket}",
                    "arn:aws:iam::{account_id}:user/{user_name}"
                ]
            }
        ]
    }
  6. Replace {bucket} with bucket name - di-test-bucket, {account_id} with account id without dashes which can be copied from navigation menu and {user_name} with di-test

  7. Give it a name di-test-policy and save.

  8. Again on the user's creation page search for di-test-policy, refresh the page and select that policy

  9. Click on di-test user and choose Security credentials

  10. Choose Create access key

  11. Choose Third-party service

  12. Click create access key and copy Access key and Secret access key

Now you have everything which is needed for proper storage configuration in Deep image.

Create storage with name "di-storage", bucket "di-test", and access and secret keys you copied.

You can use it on two ways:

  • as a source and/or target folder using Cloud processing in web application

  • with Rest API and specifying img_url as storage://di-storage/file.jpg

Last updated