code: def get_s3_bucket_keys(api_client, bucket_name, bucket, check_encryption, check_acls):
      
      bucket['keys'] = []
      keys = handle_truncated_response(api_client.list_objects, {'Bucket': bucket_name}, ['Contents'])
      bucket['keys_count'] = len(keys['Contents'])
      key_count = 0
      update_status(key_count, bucket['keys_count'], 'keys')
      for key in keys['Contents']:
          key_count += 1
          key['name'] = key.pop('Key')
          key['LastModified'] = str(key['LastModified'])
          if check_encryption:
              try:
                  # The encryption configuration is only accessible via an HTTP header, only returned when requesting one object at a time...
                  k = api_client.get_object(Bucket = bucket_name, Key = key['name'])
                  key['ServerSideEncryption'] = k['ServerSideEncryption'] if 'ServerSideEncryption' in k else None
                  key['SSEKMSKeyId'] = k['SSEKMSKeyId'] if 'SSEKMSKeyId' in k else None
              except Exception as e:
                  printException(e)
                  continue
          if check_acls:
              try:
                  key['grantees'] = get_s3_acls(api_client, bucket_name, bucket, key_name = key['name'])
              except Exception as e:
                  continue
          # Save it
          bucket['keys'].append(key)
          update_status(key_count, bucket['keys_count'], 'keys')
docs: Get key-specific information (server-side encryption, acls, etc...)
  
      :param api_client:
      :param bucket_name:
      :param bucket:
      :param check_encryption:
      :param check_acls:
      :return: