S3 Attachment Service in KFS
By default, the local filesystem is used for attachments; however, it is possible to use an AWS S3 bucket instead.
To leverage an S3 bucket for attachments:
- Create or update the spring_profiles_active environment variable so its value includes attachments-s3 (if there are multiple active Profiles, they should be comma-separated). This will (de-)active the appropriate Spring beans.
- Supply the AWS credentials in a fashion supported by the AWS SDK's DefaultAWSCredentialsProviderChain.
- Set the following properties to correspond to your AWS S3 configuration:
Property Description
kfs.attachments.s3.bucketName
Name of the S3 bucket in which to store attachments. Must be accessible with the provided credentials.
NOTE: The directory structure of the attachments is stripped out; the S3 attachment service expects the objects to be in the root of the bucket. This will need to be accommodated in your migration process. We used an intermediary staging bucket with a lambda that is triggered on object create to remove the directory structure and move the file to the final bucket.
Comments
0 comments
Please sign in to leave a comment.