Set up AWS S3 file storage integration
AWS S3 file storage is a cloud-based object storage REST service. It lets you use data as is without scalability restrictions.
AWS S3 (Simple Storage Service) is a data transfer protocol developed by Amazon. Learn more: official vendor documentation.
Creatio officially supports and guarantees compatibility with AWS S3 only. Other third-party storage solutions marketed as "S3-compatible" or "S3-like" may function with Creatio, however, such integrations are not certified or guaranteed by Creatio. Use of non-AWS S3-compatible services is at the customer’s sole discretion.
If you want to develop functionality that will create, download, delete or do any other operations with files that are stored in external file storage, then use FileAPI for that. Learn more: API for file management (developer documentation)
If you use Creatio in the cloud, contact Creatio support to integrate an AWS S3 file storage.
To integrate an AWS S3 file storage to Creatio on-site:
- Setup in AWS S3. Read more >>>
- Setup in Creatio. Read more >>>
Setup in AWS S3
-
Create an AWS account.
-
Enable Creatio to access the storage. To do this, generate a "ServiceUrl" parameter.
-
Enable authorized requests to the storage. To do this, generate the "AccessKey" and "SecretKey" parameters.
-
Create "ObjectBucketName" and "RecycleBucketName" buckets that have unique names.
- "ObjectBucketName" is a bucket for storing files. The files are stored indefinitely.
- "RecycleBucketName" is a bucket for storing deleted files. They are kept for database backups. Working with the buckets is based on the soft deletion principle: a file deleted from the "ObjectBucketName" bucket is moved to the "RecycleBucketName" bucket. The storage time for deleted files is controlled by the bucket settings of the service. For example, a file can be stored in the bucket for 90 days, then deleted automatically. In Creatio, the storage time for deleted files is the same as the storage time for database backups.
Learn more: official vendor documentation.
Setup in Creatio
To save new files uploaded to the Attachments detail or email attachments in the AWS S3 storage rather than the database, make the following adjustments on the Creatio side:
-
Set up a connection to the AWS S3 storage. To do this, add an AWS S3 storage connection string to the
connectionStringparameter of the ConnectionStrings.config configuration file:<connectionStrings>
...
<add name="s3Connection" connectionString="ServiceUrl=SOME_SERVICE_URL; AccessKey=SOME_ACCESS_KEY; SecretKey=SOME_SECRET_KEY; ObjectBucketName=SOME_OBJECT_BUCKET_NAME; RecycleBucketName=SOME_RECYCLE_BUCKET_NAME;" />
</connectionStrings>where
ServiceUrlis the endpoint for accessing the AWS S3 storage.AccessKeyis the account access key for making an authorized request to the AWS S3 storage.SecretKeyis the account key for making an authorized request to the AWS S3 storage.ObjectBucketNameis the name of the bucket for storing files.RecycleBucketNameis the name of the bucket for storing deleted files. They are kept for database backups.
-
Enable the "UseBaseEntityFileDeleteListener" additional feature to ensure that connected files are also moved to "RecycleBucketName" correctly when a section record is deleted. To do this, change the status of the "UseBaseEntityFileDeleteListener" additional feature. Instructions: Change the status of an additional feature for all users (developer documentation).
-
Set the AWS S3 storage as the active file storage. To do this, open the "Active File Content Storage" ("ActiveFileContentStorage" code) system setting. Select "S3 storage" in the Default value field.
As a result, all files added to Creatio after connecting the AWS S3 storage will be uploaded there. Files previously added to Creatio will remain in the original storage. You can migrate previously added files from Creatio database to the "ObjectBucketName" bucket in the AWS S3 file storage and vice versa. Instructions: Migrate files between database and external file storages.
See also
Migrate files between database and external file storages
Set up Azure Blob file storage integration
Manage an existing additional feature (developer documentation)