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

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

Only one S3 bucket can be connected to one Uploadcare project.
  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.

Note: AWS S3 storage is available on the Enterprise plan. Contact our sales.

Setting up S3 bucket

Enter your AWS S3 console and configure your S3 bucket:

  1. Open Buckets section.
  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):
    1{
    2"Version": "2008-10-17",
    3"Statement": [
    4 {
    5 "Sid": "AllowUploadcareWriteAccess",
    6 "Effect": "Allow",
    7 "Principal": {
    8 "AWS": "arn:aws:iam::899746369614:user/bucket-consumer"
    9 },
    10 "Action": [
    11 "s3:GetBucketLocation",
    12 "s3:ListBucket",
    13 "s3:PutObject",
    14 "s3:GetObject",
    15 "s3:GetObjectVersion",
    16 "s3:DeleteObject",
    17 "s3:DeleteObjectVersion",
    18 "s3:GetBucketAcl",
    19 "s3:ListMultipartUploadParts",
    20 "s3:ListBucketMultipartUploads"
    21 ],
    22 "Resource": [
    23 "arn:aws:s3:::<bucket>",
    24 "arn:aws:s3:::<bucket>/*"
    25 ]
    26 },
    27 {
    28 "Sid": "AllowUploadcareReadAccess",
    29 "Effect": "Allow",
    30 "Principal": {
    31 "AWS": "arn:aws:iam::899746369614:user/s3reader"
    32 },
    33 "Action": [
    34 "s3:GetBucketLocation",
    35 "s3:ListBucket",
    36 "s3:GetObject",
    37 "s3:GetObjectVersion",
    38 "s3:GetBucketAcl"
    39 ],
    40 "Resource": [
    41 "arn:aws:s3:::<bucket>",
    42 "arn:aws:s3:::<bucket>/*"
    43 ]
    44 }
    45 ]
    46}
  5. Click Edit in the Cross-origin resource sharing (CORS) section.
  6. Add the CORS policy configuration:
    1[
    2 {
    3 "AllowedHeaders": [
    4 "*"
    5 ],
    6 "AllowedMethods": [
    7 "PUT",
    8 "POST"
    9 ],
    10 "AllowedOrigins": [
    11 "*"
    12 ],
    13 "ExposeHeaders": []
    14 }
    15]
    You can specify exact hostnames in the AllowedOrigins section for extra security.
    Learn more about CORS configuration.
  7. Save your Bucket settings and Connect.

Connecting AWS S3 bucket

Connect the S3 bucket to Uploadсare in the following ways:

  • Create a new project.
  • Add the S3 bucket to an existing project without any uploaded files.

Сreate a new project

To connect your own AWS S3 bucket to the new Uploadcare project:

  1. Сreate a new project in the Dashboard.
  2. Select the option Your own AWS S3 bucket.
  3. Add S3 bucket name.
  4. Check that the S3 bucket settings comply with the recommendations given above.

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

Add to an existing project

Add the S3 bucket to an existing project without uploaded files:

  1. Open a Storage settings section.
  2. Go to Connect S3 bucket and click Connect bucket to connect your S3 bucket to Uploadcare project.
  3. Add S3 bucket name.
  4. Click Connect.

Note: Uploadcare only handles files uploaded through our service. We recommend starting with an empty bucket.

Delete files

When you delete files from AWS S3 storage, links to them remain in our Dashboard, but the files themselves are not on the Uploadcare side. You need to delete file entries in the Dashboard or through REST API Delete file method to make these links disappear.