Module:Integration With Amazon S3
This module provides an attachment method that stores the attachments in the Amazon S3 object storage service. It can be used as an alternative for the core attachment method which by default stores the files in the Openbravo server itself.
It is possible to add, update and remove attachments by handling them as objects stored in Amazon S3.
The configuration for the integration with Amazon S3 is done in the same way as it is done for any attachment method: through the Attachment Configuration window. This configuration is done at Client level.
To configure this new attachment method, the Files stored in Amazon S3 object storage platform option must be selected as the attachment method and the active checkbox must be checked off.
When selecting this option, the following fields will be displayed to be populated:
- Region: The identifier of the region that will be used to determine both the Amazon service endpoint and signing region. See here for the complete list of Amazon Web Services regions and endpoints.
- Bucket: Amazon S3 stores data as objects within resources called buckets. It is possible to write, read and delete objects within a bucket. This is the name of the bucket where the attachments will be stored. Visit here to know more about bucket restriction and limitations.
- Is EC2 Instance: Indicates whether the application is running on an Amazon EC2 instance. This determines the way of retrieving the Amazon Web Services credentials required to connect with Amazon S3.
If the previous field is checked, the credentials will be retrieved from the instance profile credentials associated to the IAM role for the EC2 instance. If this check is not selected, the following two fields will be displayed in order to allow specifying the Access Key. Access Keys are used to sign programmatic requests to Amazon Web Services and consist of an Access Key ID and a Secret Access Key.
- AWS Access ID Key: the Access Key ID.
- AWS Secret Access Key: the Secret Access Key.
Besides, there is a process that allows to verify if the current configuration is correct. This process can be launched by clicking on the Verify Configuration button.
This module provides a process that allows to migrate the attachments generated with the core attachment method (files stored in Openbravo server) to Amazon S3.
The process is named Amazon S3 Migration Process and it can be scheduled as a background process to be executed in hours of less usage of the application (for example, during the night). It requires to have the Amazon S3 attachment method configured as the active attachment method of the Client.
In addition, this process allows to configure some particular settings when selecting it in the Process Request window:
- Migration Process Batch Size: allows to define the number of attachments that can be uploaded in a single execution of the Amazon S3 migration process. If not defined, 1000 will be taken as default.
- Migration Max. Time: one the process detects that its execution is lasting more than the amount of time specified here (in minutes), then it will stop.