AWS S3 storage

Uploadcare allows you to upload files directly to your AWS S3 storage.

You may want to choose this option when you:

  • Implement custom file workflows that are integrated deeply into your system.
  • Follow company storage policies pointing at specific buckets.

How it works

  1. Files are uploaded to the AWS S3 storage directly.
  2. Files will be served from your storage or a third-party CDN, and image processing operations can be applied to them.

Only one S3 bucket can be connected to one Uploadcare project.

Connecting AWS S3 bucket

You need an Amazon Web Services account with creating a new or selecting an existing bucket in S3 bucket management.

Contact our support to connect the AWS S3 storage. After connecting, you can manage your AWS S3 storage settings in the Dashboard.

When creating a project, select the AWS S3 storage that you will use as the main one.

Setting up S3 bucket

Select a storage settings in the Dashboard, go to "Connect S3 bucket" and click "Connect bucket" to connect your S3 bucket to Uploadcare project.

  1. Enter your AWS S3 console and go to Buckets.
  2. Open an existing bucket or create a new one. Use DNS-compliant lowercase bucket names such as johnsbucket1.
  3. Check Block public access settings if you need to give public access to copied files (all checkboxes are checked by default).
  4. Go to the Permissions tab on your bucket's properties pane and add the following settings to your Bucket Policy (where replace <bucket> with the name of your AWS S3 bucket):
    {
    "Version": "2008-10-17",
    "Statement": [
        {
            "Sid": "AllowUploadcareWriteAccess",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam:::user/bucket-consumer"
            },
            "Action": [
                "s3:GetBucketLocation",
                "s3:ListBucket",
                "s3:PutObject",
                "s3:GetObject",
                "s3:GetObjectVersion",
                "s3:DeleteObject",
                "s3:DeleteObjectVersion",
                "s3:GetBucketAcl",
                "s3:ListMultipartUploadParts",
                "s3:ListBucketMultipartUploads"
            ],
            "Resource": [
                "arn:aws:s3:::<bucket>",
                "arn:aws:s3:::<bucket>/*"
            ]
        },
        {
            "Sid": "AllowUploadcareReadAccess",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam:::user/s3reader"
            },
            "Action": [
                "s3:GetBucketLocation",
                "s3:ListBucket",
                "s3:GetObject",
                "s3:GetObjectVersion",
                "s3:GetBucketAcl"
            ],
            "Resource": [
                "arn:aws:s3:::<bucket>",
                "arn:aws:s3:::<bucket>/*"
            ]
        }
      ]
    }
  5. Configure CORS policy:
    [
     {
         "AllowedHeaders": [
             "*"
         ],
         "AllowedMethods": [
             "PUT",
             "POST"
         ],
         "AllowedOrigins": [
             "*"
         ],
         "ExposeHeaders": []
     }
    ]
  6. Save your Bucket settings and Connect.

Uploadcare will run tests to ensure it can connect and upload the files to the bucket.

When deleting files, remove them from your AWS S3 storage and the list of files in the Dashboard.