Custom S3 Buckets
Purple uses AWS to store contents for all apps by default. The default storage location is in Europe (eu-west-1) and is distributed by AWS Cloudfront as it's CDN.
There may be reasons why you would want to manage your storage yourselves:
- Your consumers are located in different parts of the world. To reduce latencies it may be beneficial to have your S3 storage in a different region
- You want to keep track of the costs for the content delivery
- Your internal or external policies require you to manage the storage yourself
- Creation of Amazon Polly TTS (Text-to-Speech) files, used in the app for the readmode.
Purple supports this by allowing you to configure the storage for your team.
There are only a handful parameters you need to provide. The module will setup an
- S3 bucket
- AWS Cloudfront distribution
- Lambda@Edge with Tachyon for dynamic image resizing
- and optionally an AWS ACM certificate for the Cloudfront distribution, if you want to use a custom CDN domain.
The following example sets up a bucket in eu-central-1 and configures cdn.example.com as the Cloudfront domain.
Once this configuration was applied using Terraform, you can configure the custom bucket in the Purple Manager like this:
Bucket Access Key
Bucket Secret Key
Bucket Base Directory
module.purple_files.cloudfront_distribution_domain_name or value of cloudfront_domain
Cloudfront Access Key
If the setup of the custom S3 bucket should be done by sprylab, the following information is needed:
- AWS Console login with admin/root privileges