BunnyCDN setup guide for MEGA S4

Set up using object URL

In the MEGA website

  1. Select the bucket with the objects that you want to serve with the CDN.
  2. Right-click the bucket.
  3. Click Settings.
  4. Click Object URL access.
  5. Select Grant object URL access to the bucket.
  6. Click Update.
  7. Open the bucket.
  8. Right-click an object you want to serve with the CDN, and click Manage object URL.
  9. Click Copy.

In the BunnyCDN dashboard

  1. Click CDN on the left-hand panel.
  2. Click + Add Pull Zone.
  3. Enter a name for your pull zone.
  4. In the Origin URL field, paste the object URL and delete the name of the object so that it looks like this https://s3.g.s4.mega.io/[ID]/[BucketName].
  5. Finish the configuration by selecting the rest of the options as you prefer, they will not affect S4.
  6. Click Add Pull Zone.

Now you can use the link https://[PullZoneURL]/[ObjectName]. The object will be displayed or downloaded the same way as in the object URL.

Set up using the S4 API

In the BunnyCDN dashboard

  1. Click CDN on the left-hand panel.
  2. Click + Add Pull Zone.
  3. Enter a name for your pull zone.
  4. In the Origin URL field, enter the endpoint address you want to use and the name of the bucket you want to serve. Example: s3.g.mega.io/[BucketName]
  5. Finish the configuration by selecting the rest of the options as you prefer, they will not affect S4.
  6. Click Add Pull Zone.
  7. Click your pull zone to go to its options.
  8. Click Security then S3 Authentication.
  9. Click to toggle on Enable AWS S3 Authentication.
  10. Enter the following information:
    • AWS Key: Your Access key.
    • AWS Secret: Your Secret key.
    • AWS Region Name: Enter your chosen endpoint address.
  11. Click Save AWS configuration.

Now you can use the link https://[PullZoneURL]/[ObjectName]. The object will be displayed or downloaded the same way as in the object URL.