NOTE: If you do not want to give Blitline permission to your buckets, please see Using S3 Signed Urls
It is VERY important that you set your AWS Canonical ID on your Blitline.com account if you are going to let Blitline push images to your bucket. You can set the Canonical ID by logging in to Blitline.com, and locating it on the logged in homepage.
Without the Canonical ID, we cannot make YOU the owner of the image. Even though it is in your bucket, Blitline will still be the owner of the object and you will not be able to do anything to it (such as rename, or re-permission) and your only option will be to copy it somewhere, thus making you the owner of the copy. SO, make sure you set the Canonical ID!
First, make sure you are logged in to the AWS web console. Then navigate to https://console.aws.amazon.com/iam/home?#security_credential
On this screen you will click the Account Identifiers section.
Copy and paste this into the Blitline.com homepage Canonical ID section, and click the Update button.
Please make sure you have already set your Canonical ID before proceeding.
You will need to give Blitline permission to write to your S3 buckets.
You can do this through the AWS web console:
This permission policy above allows Blitline to write to your bucket.
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 a full example of a Blitline job which pushes the results to an S3 object.
Blitline uses file extensions to guess what file types are desired for output. Sometimes, though, these extensions do no exist or are not easily discernable from the key. To accomodate this, we have an additional modifier to the “s3_destination” that allows you to set the output filetype without using an extension.
“force_type” : “pdf” (or jpg, png, webp, etc)
You can tell Blitline that it should save the file as this type before pushing to your destination.
By default (without Canonical ID set), Blitline sets two headers on uploaded files
By default (with Canonical ID set), Blitline sets two headers on uploaded files:
“x-amz-grant-read” makes it publicly readable.
“x-amz-grant-full-control” sets the owner to the canonical id owner
To set your S3 objects to be private by default, set the header:
Which will remove any read permissions from the object.
Adding your own headers
If you want to add your own header (for example to remove the public permissions as talked about above), you can add a “headers” JSON field to the s3_destination. This will add to or overwrite the existing default headers (so, for example, you can set the ‘x-amz-grant-read’ to not be public readable)