INNER CODE UNIT · Python
process_completed
miztiik/AWS-Demos · how-to-examples/iam-s3-sqs-sns-video-transcoder.py:264
def process_completed(self):
"""
Check the queue and download any completed files from S3 to your
hard drive.
"""
to_fetch = self.check_queue()
for s3_file in to_fetch:
self.download_from_s3(s3_file)
# The boto-specific methods.
def bucket_exists(self, bucket_name):
"""
Returns ``True`` if a bucket exists and you have access to
call ``HeadBucket`` on it, otherwise ``False``.
"""
try:
self.s3.meta.client.head_bucket(Bucket=bucket_name)