def get_all_objects_in_bucket(<EOL>aws_bucket_name,<EOL>s3_client=None,<EOL>max_keys=<NUM_LIT:1000><EOL>):
logger.debug("<STR_LIT>")<EOL>if not s3_client:<EOL><INDENT>s3_client, s3_resource = get_s3_client()<EOL><DEDENT>obj_dict = {}<EOL>paginator = s3_client.get_paginator('<STR_LIT>')<EOL>page_iterator = paginator.paginate(Bucket=aws_bucket_name)<EOL>for page in page_iterator:<EOL><INDENT>key_list = page.get('<STR_LIT>', [])<EOL>logger.debug("<STR_LIT>".format(len(key_list)))<EOL>for obj in key_list:<EOL><INDENT>obj_dict[obj.get('<STR_LIT>')] = obj<EOL><DEDENT><DEDENT>return obj_dict<EOL>
Little utility method that handles pagination and returns
all objects in given bucket.