Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-43752

S3 repository does not work for non-US repositories

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.9, 2.3.10, 2.3.11, 2.4.6, 2.4.7, 2.4.8, 2.5.2, 2.5.3, 2.5.4, 2.6, 2.6.1, 2.6.6, 2.7.4, 2.8.2
    • 2.9
    • Repositories
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_29_STABLE
    • MDL-43752-master
    • Hide

      Required: Have a valid S3 account.

      For new repositories after patch:
      1) Edit S3 Repository settings (via Site administration / ► Plugins / ► Repositories / ► Manage repositories) and set Access Key, Secret Key and Endpoint.
      2) Add new file/folder to course or frontpage
      3) Select Amazon S3 repository
      4) Confirm you can access folders and files in S3 and that no error is thrown.

      For current repositories after patch:
      1) Add new file/folder to course or frontpage
      2) Select Amazon S3 repository
      3) Confirm you can access folders and files in S3 and that no error is thrown.
      4) Visit Amazon S3 settings in 'Site administration / ► Plugins / ► Repositories / ► Manage repositories' and confirm Endpoint is correct.

      Show
      Required: Have a valid S3 account. For new repositories after patch: 1) Edit S3 Repository settings (via Site administration / ► Plugins / ► Repositories / ► Manage repositories) and set Access Key, Secret Key and Endpoint. 2) Add new file/folder to course or frontpage 3) Select Amazon S3 repository 4) Confirm you can access folders and files in S3 and that no error is thrown. For current repositories after patch: 1) Add new file/folder to course or frontpage 2) Select Amazon S3 repository 3) Confirm you can access folders and files in S3 and that no error is thrown. 4) Visit Amazon S3 settings in 'Site administration / ► Plugins / ► Repositories / ► Manage repositories' and confirm Endpoint is correct.

    Description

      The S3 repository has lines of code in it hard coded for US repositories - specifically repository/s3/S3.php lines 52, 76 and 1697. They contain the text s3.amazonaws.com. That is the default location for US hosted S3 repositories, but for European repositories the endpoint is s3-eu-west-1.amazonaws.com. The S3 configuration should include a preference for the endpoint rather than have it hard coded. The impact of this is that you can see a list of buckets, but then get a JSON parser error when you try to drill down further.

      Attachments

        Issue Links

          Activity

            People

              danbennett Dan Bennett
              millmore Martin Millmore
              Jetha Chan Jetha Chan
              David Monllaó David Monllaó
              Rajesh Taneja Rajesh Taneja
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/May/15