Using a Cloud Object Store for Images and Files
Tables that contain Image or File column types use cloud-based file storage to persist and retrieve the image and file content.
By default, this file storage is co-located with the table data source (eg: with Google Drive or Office 365). In the case of database data sources, the default file storage location is the cloud file system used to create the app owner's account.
These default choices can be overridden by explicitly specifying a cloud object store as part of the table definition.
AWS S3 is a popular choice for a cloud object store.
How to configure AWS S3 as a Cloud Object Store
- Create an AWS bucket and give it a name --- eg: "mytestbucket"
- Add an IAM user – eg: "AppSheetS3User". Make sure to record the API access key and access secret for this user.
- Give your S3 bucket a permissions policy like this (change the Id and Sid to some unique value):
How to configure your AppSheet account
Once you have your S3 bucket configured, you are ready to configure your AppSheet account.
- Go to your Account page and the Integrations tab within it.
- Choose the “Stores” sub-pane.
- Click on Add Object Store. It will show an S3 logo. Click on that.
- This brings up a form to fill out. Give your object store a name --- eg: “S3Store”. Carefully choose the AWS Region, and provide the BucketName ("mytestbucket"), Access Key and Access Secret.
This page should now show that your account has one configured Cloud Store.
How to configure an individual table in an app
Once you have added a cloud object store to your account, you can decide to use it for any specific table in any specific app.
- Go to a table definition in the app editor (via the Data -> Tables pane).
- In the properties, look for "Cloud Object Store" and type in the name of the object store that you set up for your account (eg: “S3Store”).
- Save the change
Using apps with cloud object stores
Apps work without any difference in behavior. If your app is used to capture images, you will find that the images are saved to the S3 bucket. The object names in S3 are similar to file path names and use the same protocol. To disambiguate, they are always prefixed with the source name of the table that they belong to.