It appears lambdas are not triggered from items being pushed to SQS if [SendMessageBatch](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessageBatch.html) is used instead of [SendMessage](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html)
return map_all_s3_objects().values()
def download_s3_object(s3, bucket, path):
    with tempfile.SpooledTemporaryFile() as tmpfile:
        s3.Bucket(bucket).download_fileobj(path, tmpfile)
        tmpfile.seek(0)
        result = tmpfile.read()
        try:
            result = to_str(result)
        except Exception:
            pass
        return result
def map_all_s3_objects(to_json=True, buckets=None):
    s3_client = aws_stack.get_s3_client()
    result = {}
    buckets = [s3_client.Bucket(b) for b in buckets] if buckets else s3_client.buckets.all()
    for bucket in buckets:
        for key in bucket.objects.all():
            value = download_s3_object(s3_client, key.bucket_name, key.key)
            try:
                if to_json:
                    value = json.loads(value)
                key = '%s%s%s' % (key.bucket_name, '' if key.key.startswith('/') else '/', key.key)
                result[key] = value
            except Exception:
                
                pass
    return result
def get_sample_arn(service, resource):