Introduction
The S3 integration is an extension of the file integration. Instead of placing a file on the LIM, it allows for the file to be uploaded to a customer specific filestore on the S3 amazon filestore. You will need to arrange for S3 filestore access before using S3 integrations, and S3 integrations can only be used to upload files to your own dedicated S3 bucket, not the shared fs-filestore-eu bucket folder which may have been set up for you. To have your own dedicated bucket set up to use with S3 storage integrations (as well as MyServices), please contact support.
The integration also provides the option to set if the file will have public or private access settings attached to it. The S3 integration does not require a LIM selection.
Note: We recommend against storing sensitive information in an s3 bucket.
- Access key ID: AWS Access Key ID as provided by Granicus support on setting up of the file store
- Secret access key: AWS Secret Access Key as provided by Granicus support on setting up of the file store
- Destination bucket: Bucket name eg council-firmstep-bucket. This will usually be 'apps-councilname'.
- File Path: Destination file path and file name (You need to define and path of the folder that the file will be stored followed by the file name.)
Eg /demo/@af:base64({upload1:1}!)
The example above, uses the base64 feature, which allows you to obtain the file name from a specific uploaded file. In the example the file will be stored in the demo folder located in the root of the bucket and file name will be taken from the first file uploaded in the field with the dataname "upload1".
- Permission: File access permission - the integration provides the option to set the file permission with one of the following values:
Amazon S3 supports a set of predefined grants, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. The following table lists the set of canned ACLs and the associated predefined grants.
Permission Access ControlCanned ACL | Applies to | Permissions added to ACL |
---|
private | Bucket and object | Owner gets FULL_CONTROL . No one else has access rights (default). |
public-read | Bucket and object | Owner gets FULL_CONTROL . The AllUsers group gets READ access. |
public-read-write | Bucket and object | Owner gets FULL_CONTROL . The AllUsers group gets READ and WRITE access. Note: Granting this on a bucket is not recommended. |
aws-exec-read | Bucket and object | Owner gets FULL_CONTROL . Amazon EC2 gets READ access to GET an Amazon Machine Image (AMI) bundle from Amazon S3. |
authenticated-read | Bucket and object | Owner gets FULL_CONTROL . The AuthenticatedUsers group gets READ access. |
bucket-owner-read | Object | Object owner gets FULL_CONTROL . Bucket owner gets READ access. If you specify this canned ACL when creating a bucket, Amazon S3 ignores it. |
bucket-owner-full-control | Object | Both the object owner and the bucket owner get FULL_CONTROL over the object. If you specify this canned ACL when creating a bucket, Amazon S3 ignores it. |
log-delivery-write | Bucket | The LogDelivery group gets WRITE and READ_ACP permissions on the bucket. |
Note: You can specify only one of these canned ACLs in your request.
- Content: in the example above, we are using the base64 feature, which allows us to get the file content from a specific uploaded file. The content will be taken from the first file uploaded in the field with dataname "upload1". This field can contain any other value such a string or whatever.
Note: Currently the submission integrations will only run with integrations V2 if they are set to pre-submission
Returning the link to an upload file in your form
If you wish to use the link to a particular file which has been uploaded to your S3 bucket, you are able to generate the URL in a field within the same form. The token for this field can then be used. You will need four fields in total for this to work:
- Upload field
- Text field containing the URL of the bucket. The default value of this field will be the whole URL apart from the upload (e.g. https://apps-support-test.s3.amazonaws.com/reportit/custphoto/ ).
- Text field containing the name of the image uploaded. The default value of this field has to be {(dataname of the upload field):display} e.g. {upload1:display}.
- Text field which adds the previous two fields together. This field can be tokenised to provide the link to the image. You can add the previous two together by setting the default value as {field1}+{field2}.
You can see an example below:
Note: There is no pre-defined limit to an S3 upload, however, form upload fields are limited to 10MB.
Further useful reading:
top of page