Use AWS SDK
For advanced use cases where Amplify does not provide the functionality, you can retrieve the escape hatch to access the AWSS3 instance.
Add the following imports:
1import AWSS3StoragePlugin // Imports the Amplify plugin interface2import AWSS3 // Imports the AWSS3 client escape hatch
Then retrieve the escape hatch with this code
1func getEscapeHatch() {2 do {3 let plugin = try Amplify.Storage.getPlugin(for: "awsS3StoragePlugin") as! AWSS3StoragePlugin4 let awsS3 = plugin.getEscapeHatch()5 } catch {6 print("Get escape hatch failed with error - \(error)")7 }8}