Deleting file from S3 bucket in iOS app (Swift)

Question:

I am writing an iOS app in Swift, and am using Amazon S3 to store files. I was wondering if anyone knows how I can programmatically delete files in my S3 bucket on command (instead of setting a delete policy in the bucket lifecycle).

Thanks in advance

Answer:

Your code to delete a file from S3 bucket should look something like this:

Thanks,
Rohan

Leave a Reply