Page updated Nov 12, 2023

Remove files

Amplify iOS v1 is now in Maintenance Mode until May 31st, 2024. This means that we will continue to include updates to ensure compatibility with backend services and security. No new features will be introduced in v1.

Please use the latest version (v2) of Amplify Library for Swift to get started.

If you are currently using v1, follow these instructions to upgrade to v2.

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

Amplify.Storage.remove(key: "myKey") { event in switch event { case let .success(data): print("Completed: Deleted \(data)") case let .failure(storageError): print("Failed: \(storageError.errorDescription). \(storageError.recoverySuggestion)") } }
1Amplify.Storage.remove(key: "myKey") { event in
2 switch event {
3 case let .success(data):
4 print("Completed: Deleted \(data)")
5 case let .failure(storageError):
6 print("Failed: \(storageError.errorDescription). \(storageError.recoverySuggestion)")
7 }