ios - Generating a signed URL for AWS S3 -


i'm trying create signed url aws s3, want url file in bucket, don't want use upload/download.

i've tried afnetworking, following steps on amazons documentation , using aws ios sdk.

so far have this:

awsstaticcredentialsprovider *credentialsprovider = [awsstaticcredentialsprovider        credentialswithaccesskey:@"access key" secretkey:@"secret key"]; awsserviceconfiguration *configuration = [awsserviceconfiguration    configurationwithregion:awsregionuswest2  credentialsprovider:credentialsprovider];  [awsservicemanager defaultservicemanager].defaultserviceconfiguration = configuration; awss3presignedurlbuilder * urlbuilder  = [[awss3presignedurlbuilder alloc]       initwithconfiguration:configuration];  awss3getpresignedurlrequest *presignedurlrequest = [awss3getpresignedurlrequest new]; presignedurlrequest.bucket = @"bucket-name"; presignedurlrequest.key = @"/filename"; presignedurlrequest.httpmethod = awshttpmethodget; presignedurlrequest.expires = [nsdate datewithtimeintervalsincenow:3600];   nsurl *presignedurl = [urlbuilder getpresignedurl:presignedurlrequest];  nslog(@"%@", presignedurl); 

i'm getting lot of errors code being depreciated, more importantly know method getpresignedurl returns type (awstask *), question how turn awstask signed url?

also don't plan on leaving keys in code temporary testing.

if me find how presignedurl that'd great help. thanks

have tried s3backgroundtransfer-sample? should started.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -