S3 Destination

CREATE IAM USER ROLE ON AWS

The recommended way to allow Blitline to write to your S3 Bucket is to set up an IAM credential for Blitline and enter the access key and secret into the Blitline web console.

Steps for creating an IAM policy are beyond the scope of this document, but you can find more information here https://docs.aws.amazon.com/AmazonS3/latest/userguide/user-policies.html

The policy you would want to set on AWS is as follows:

❗️

Make sure to replace "YOUR_BUCKET_NAME!!" in the policy below with your actual Bucket name you are using to put your output files into.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:GetObjectAcl",
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::YOUR_BUCKET_NAME!!/*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketLocation"
            ],
            "Resource": [
                "arn:aws:s3:::YOUR_BUCKET_NAME!!"
            ]
        }
    ]
}

When creating your new IAM user, be sure to record the Access Key and Secret

When creating your new IAM user, be sure to record the **Access Key** and **Secret**When creating your new IAM user, be sure to record the **Access Key** and **Secret**

When creating your new IAM user, be sure to record the Access Key and Secret




UPDATE BLITLINE.COM

Then you can enter your IAM credentials in your Blitline.com account

  • Log in to Blitline.com
  • Click on the Configuration Tab
  • Enter you Key and Secret
  • Press Update



PUSHING TO YOUR S3 BUCKET

Once you have set up your S3 Destination permissions, you can start using the "s3_destination" tag in your JSON and we use the credentials created above for pushing your s3 files.

In your Blitline job, you will need to add an “s3_destination”. This “s3_destination” needs to have the following children:

  • bucket (Your S3 bucket to push to)
  • key (The S3 key for the image that you wish Blitline to write to)
  • headers (Optional headers you wish to have added to your S3 item)

📘

Here is an example of a Blitline job that will push to your bucket:

{
  "application_id": "YOUR_APP_ID",
  "src": "http://www.google.com/logos/2011/houdini11-hp.jpg",
  "postback_url": "YOUR_WEBSITE_URL",
  "functions": [
    {
      "name": "blur",
      "save": {
        "image_identifier": "YOUR_IMAGE_IDENTIFIER",
        "s3_destination": {
          "bucket": "YOUR_BUCKET_NAME",
          "key": "key value to save image as"
        }
      }
    }
  ]
}

Did this page help you?