Appendix H: Customizing the Solution - Media2Cloud

Appendix H: Customizing the Solution

By default, the solution creates three Amazon S3 buckets: one that stores your uploaded files, one that stores the proxy file and the analysis results, and one that stores the static web assets. If you already have an Amazon S3 bucket where you store your original content, you can modify the AWS CloudFormation template to use your own bucket.

  1. Download the source code from our GitHub repository.

  2. Open the project with your IDE or text editor.

  3. Open deployment/media2cloud-bucket-stack.template.

  4. Under Mappings, UserDefined, Bucket, change the Ingest field to your bucket name.

    UserDefined: Bucket: Ingest: "<your-ingest-bucket>"
  5. Optionally, to use your own Amazon S3 bucket for storing proxies and analysis results, change the Proxy field to your bucket name. Ensure the proxy bucket is different from your Ingest bucket.

  6. Save the template and follow the README instructions to build your package.


Bucket Region

If you specify your own ingest (and/or proxy) buckets, ensure the bucket(s) are in the same AWS Region as the region where the solution is deployed to avoid cross-region data transfer costs.

Bucket CORS Settings

If you decide to use your own ingest (and/or proxy) bucket, the solution updates your bucket’s CORS settings to allow the web interface to perform cross origin GET/POST requests. The following example shows the CORS settings:

<?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns=""> <CORSRule> <AllowedOrigin>https://<cf-id></AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <AllowedMethod>PUT</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedMethod>HEAD</AllowedMethod> <AllowedMethod>DELETE</AllowedMethod> <MaxAgeSeconds>3000</MaxAgeSeconds> <ExposeHeader>Content-Length</ExposeHeader> <ExposeHeader>ETag</ExposeHeader> <ExposeHeader>x-amz-meta-uuid</ExposeHeader> <ExposeHeader>x-amz-meta-md5</ExposeHeader> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration>