Deleting a file in an  S3 bucket

Finally, you can delete a file in a bucket by simply invoking the DeleteObject() function, as follows:

IAmazonS3 s3Client = new AmazonS3Client();
DeleteObjectRequest request = new DeleteObjectRequest()
{
BucketName = "packt-pub",
Key = "myfile"
};

s3Client.DeleteObject(request);

By now, you must have an idea of using the AWS SDK for accessing the S3 services on the Windows platform. Let's see how we can do the same operations using the Python programming language on Unix platforms. Note that the Python examples can also be performed on a Windows system.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.39.252