Page updated Nov 12, 2023

Remove files

Delete an object uploaded to S3 by using Amplify.Storage.remove and specify the key:

let removedKey = try await Amplify.Storage.remove(key: "myKey") print("Deleted \(removedKey)")
1let removedKey = try await Amplify.Storage.remove(key: "myKey")
2print("Deleted \(removedKey)")