April 2018
Intermediate to advanced
280 pages
8h 37m
English
A bucket can be deleted only if all the objects inside it are deleted. In other words, only empty buckets can be deleted:
import boto3s3 = boto3.resource('s3')bucket = s3.Bucket('packt-pub')response = bucket.delete()
The preceding example gives you an idea about the Amazon S3 classes and the functions that can be used to manipulate S3 storage. You can now write more complex programs that can interact with the AWS S3 storage. For example, your application may be running on your private cloud (OpenStack) environment and may require access to S3 storage for uploading files such as website content. You can easily uses the preceding S3 classes and functions to build your hybrid cloud application.
Let's move ahead and see how ...