Update to swift 5.6, apple swift crypto
Amazon AWS S3 convenience
Create a bucket with your bucket name and region
let bucket = AWSBucket(name: “”, region: “”)
Crete a request for a particular action using one of the method listed below
Sign the request with your AWSAccount
let awsAccount = AWSAccount(serviceName: “s3”, region: “”, accessKeyID: “”, secretAccessKey: “”)
request.sign(for: awsAccount)
Do whatever it is you do to use a URLRequest
Create a URLRequest for a particular object name, including the leading /.
URLRequest
/
guard var request:URLRequest = bucket.requestToGETObjectNamed(“”) else …
Instantiate an S3PutComponents instance with the bucket, object name and data
S3PutComponents
Add optional properties, like an acl, mimetype or server side encryption
Use the .request property to get a URLRequest
.request
AWSBucket
guard var request:URLRequest = bucket.requestToDELETEObjectNamed("my object name ") else ...
Please make feature requests or pull requests as needed
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
SwiftAWSS3
Amazon AWS S3 convenience
Common
Create a bucket with your bucket name and region
let bucket = AWSBucket(name: “”, region: “”)
Crete a request for a particular action using one of the method listed below
Sign the request with your AWSAccount
let awsAccount = AWSAccount(serviceName: “s3”, region: “”, accessKeyID: “”, secretAccessKey: “”)
request.sign(for: awsAccount)
Do whatever it is you do to use a URLRequest
GET
Create a
URLRequestfor a particular object name, including the leading/.guard var request:URLRequest = bucket.requestToGETObjectNamed(“”) else …
PUT
Instantiate an
S3PutComponentsinstance with the bucket, object name and dataAdd optional properties, like an acl, mimetype or server side encryption
Use the
.requestproperty to get aURLRequestDELETE
AWSBucketinstance, create a request to delete an object.In development
Please make feature requests or pull requests as needed