Axiell AWS S3 media plugin

From 3.8.1.3278, an Axiell WebAPI plugin for Amazon Web Services S3 (an object storage service that stores data as objects within buckets) is available that is capable of storing and retrieving media files. The plugin uses the AWS SDK, not the S3 API, so other S3 suppliers implementing that API are not supported.

An appropriate configuration in adlibweb.xml would look similar to the following:

<?xml version="1.0" encoding="UTF-8" ?> <webConfiguration> <globalConfiguration> <databasePath>C:\Data\Projects\model5.0\data</databasePath> <xmltype>grouped</xmltype> <debug>1</debug> <authentication>true</authentication> </globalConfiguration>

<imageServerConfiguration name="awstest"> <defaultImage></defaultImage> <servertype>FileSystem</servertype> <path></path> <cachePath>C:\Data\Projects\model5.0\images\imageCache</cachePath> <ImagePlugin type="Adlib.Aws.Imaging.Plugin.AwsPlugin, Adlib.Aws.Imaging.Plugin"> <AccessKey>BIDUKNDYLDIHIDO8H4HKK</AccessKey> <SecretKey>g930GT92EAevn930KOMSYed92446jiuyaU</SecretKey> <BucketName>aws.plugin.test.bucket</BucketName> <Directory>fullimages</Directory> <Location>eu-central-1</Location> </ImagePlugin> <ignoreScaleVideo>true</ignoreScaleVideo> </imageServerConfiguration> </webConfiguration>

To be able to upload media files you may have to enable that first via an appropriate JSON file for your S3 account under the bucket policy settings, similar to the following:

{ "Version": "2012-10-17", "Statement": [ { "Sid": "UploadAccessStatement", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::93475894329734:user/n.ame@ourdomain.com" }, "Action": [ "s3:PutObject", "s3:PutObjectAcl", "s3:GetObject", "s3:GetObjectAcl" ], "Resource": [ "arn:aws:s3:::aws.plugin.test.bucket/*", "arn:aws:s3:::aws.plugin.test.bucket" ] } ] }

This is the IAM (Identity and Access Management) user that is used to access the S3 bucket from the WebAPI.

If your bucket has sub folders, you can address those too by prefixing the file name with the sub folder name, like so for example:
https://mydomain.com/AWSS3/wwwopac.ashx?command=writecontent&server=ourawsserver&value=subfolder1/myimage.jpg

Per (sub) folder you need a separate image server configuration in adlibweb.xml and read and write access must be enabled for them in the S3 bucket.

Note that S3 file IDs are case-sensitive, so getting the item with id myimage.jpg file will succeed but myimage.JPG will fail with a Not found error.