Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated Apr 29, 2024

Remove files

Amplify Android v1 is deprecated as of June 1st, 2024. No new features or bug fixes will be added. Dependencies may become outdated and potentially introduce compatibility issues.

Please use the latest version (v2) of Amplify Library for Android to get started. Refer to the upgrade guide for instructions on upgrading your application to the latest version.

Amplify libraries should be used for all new cloud connected applications. If you are currently using the AWS Mobile SDK for Android, you can access the documentation here.

To delete an object uploaded to S3, use Amplify.Storage.remove and specify the key:

Amplify.Storage.remove(
"myUploadedFileName.txt",
result -> Log.i("MyAmplifyApp", "Successfully removed: " + result.getKey()),
error -> Log.e("MyAmplifyApp", "Remove failure", error)
);
Amplify.Storage.remove("myUploadedFileName.txt",
{ Log.i("MyAmplifyApp", "Successfully removed: ${it.key}") },
{ Log.e("MyAmplifyApp", "Remove failure", it) }
)
try {
val result = Amplify.Storage.remove("myUploadedFileName.txt")
Log.i("MyAmplifyApp", "Successfully removed: ${result.key}")
} catch (error: StorageException) {
Log.e("MyAmplifyApp", "Remove failure", error)
}
RxAmplify.Storage.remove("myUploadedFileName.txt")
.subscribe(
result -> Log.i("MyAmplifyApp", "Successfully removed: " + result.getKey()),
error -> Log.e("MyAmplifyApp", "Remove failure", error)
);