1

I would like to use AWS S3 to store my app's user's files securely.

I am based in the EU (UK), so my bucket's region is EU (Ireland). Based on the Noterious example in the Backand docs, and the snippet provided by the Backand dashboard, this is my custom File Upload action:

function backandCallback(userInput, dbRow, parameters, userProfile) {

  var data = {
    "key" : "<my AWS key ID", 
    "secret" : "<my secret key>", 
    "filename" : parameters.filename, 
    "filedata" : parameters.filedata,         
    "region" : "Ireland",
    "bucket" : "<my bucket name>"
  };
  var response = $http({method:"PUT",url:CONSTS.apiUrl + "/1/file/s3" , 
           data: data, headers: {"Authorization":userProfile.token}});

  return response;
}

When testing the action in the Backand dashboard, I get this error: 417 The remote server returned an error: (500) Internal Server Error.: An error occurred, please try again or contact the administrator. Error details: Maximum number of retry attempts reached : 3.

With an American bucket and region: "US Standard", it works without error. So, similarly to this answer, I think this is because the AWS endpoint isn't correctly set up.

I have tried region: "EU", region: "Ireland", region: "eu-west-1" and similar combinations.

So - Is there any way to configure Backand to use AWS endpoints other than US Standard? (I'd have thought that would have been the whole point of setting the region.)

Community
  • 1
  • 1
StevieP
  • 401
  • 3
  • 16
  • `s3-eu-west-1` perhaps? That's the wrong answer to "region" but then again, "US Standard" is pretty ridiculous... but the regional REST endpoint is `s3-eu-west-1.amazonaws.com` which is why it might be worth trying this. – Michael - sqlbot Apr 16 '16 at 22:00
  • Thanks for the suggestion, @Michael-sqlbot, but that hasn't worked either. I'll get on to the Backand team. – StevieP Apr 18 '16 at 08:24
  • When you find it, please post an answer here, for the benefit of future visitors. Answering your own question is perfectly valid if you genuinely find your own answer to a real question. – Michael - sqlbot Apr 18 '16 at 11:59

1 Answers1

1

We have checked this issues and apparently there is a different in the security method of AWS between east coast (N. Virginia) and newer regions like Ireland. This issue is scheduled for one of the next releases, and I will update here when resolved.

Itay
  • 734
  • 4
  • 5