Help with S3 storage and CDN

Hi @shwackd,

First of all don’t worry you are in the best place to find help :wink:

Did you set your CDN_URL in the configuration of the plugin you’re using ?

Here the configuration:

./config/plugins.js

module.exports = ({ env }) => ({
  // ...
  upload: {
    provider: 'aws-s3-plus-cdn',
    providerOptions: {
      accessKeyId: env('AWS_ACCESS_KEY_ID'),
      secretAccessKey: env('AWS_ACCESS_SECRET'),
      region: env('AWS_REGION'),
      params: {
        Bucket: env('AWS_BUCKET'),
      },
      cdnUrl: env("CDN_URL"), // Optional CDN URL - include protofol and trailing forward slash, e.g. 'https://assets.example.com/'
    },
  },
  // ...
}); 

As said in the plugin’s note:

Strapi will use the configured S3 bucket for upload and delete operations, but writes the CDN url (if configured) into the database record.

N.B: Don’t worry about the impostor syndrome you are the best! :wink:

2 Likes