Search Unity

Get direct link to asset bundle using Amazon Storage

Discussion in 'Formats & External Tools' started by novaVision, May 22, 2018.

  1. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    Hi,

    I use Amazon services in a project (S3 for asset bundles). I don't wish to make bundle file public, that's why wish to use CognitoIdentity to access storage using Amazon API. Everything seems great, but to download asset bundle the way I used to do need to get direct link to the file.
    Amazon got this option - GetPreSignedUrl method in .NET, but it doesn't exists in Unity SDK. There are several issues in GitHub about it, but it seems so much outdated that nobody cares about it, and no reason to expect some fix from Amazon.

    I wish to know, is there any other solution to get secured direct link?
    The worst scenario is to download the file using standard Amazon API methods to byte[] and load it using AssetBundle class, but... that will cause many problems and doesn't seems good way to implement.

    Thanks upfront.
     
  2. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    I've been recently researching a similar issue. I looked into Firebase and I'm liking what they offer. You can upload your AssetBundle to their Storage. They have a Firebase Storage SDK for Unity. Note that the solutions work mainly for Android and iOS, but there are some workarounds to get it working on Desktop. There is additional setup required to get this to work, which I didn't follow through on. I ultimately decided that for my project, I don't need any security, so I decided to host a page and place the assetbundles there instead (this most likely won't work for your security case).
     
  3. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    @aer0ace thanks for reply, but I will stay in Amazon for several other reasons. We use other services there, not only S3 storage, so need to figure out solution as it is.
     
  4. nastashonok

    nastashonok

    Joined:
    Aug 25, 2018
    Posts:
    5
    Hello! Have you found a solution for working with S3?