For Kinesis, it seems to be, that AWS organizes its folders on S3 like: "prefix/2019/02/09/13/kinesis-stream-name-2019-02-09-10-02-32-db1db7a9-c484-40d1-b7ec-7651a55e4677"

The date in the path is UTC-time, the date in the file name is the UTC-time of the first received byte in the Kinesis stream for the specific file. This is the default behavior, so it would be nice to implement it in localstack.
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)
                result['%s/%s' % (key.bucket_name, key.key)] = value
            except Exception:
                
                pass
    return result
def get_sample_arn(service, resource):
    return 'arn:aws:%s:%s:%s:%s' % (service, aws_stack.get_region(), TEST_AWS_ACCOUNT_ID, resource)
def send_describe_dynamodb_ttl_request(table_name):
    return send_dynamodb_request('', 'DescribeTimeToLive', json.dumps({'TableName': table_name}))
def send_update_dynamodb_ttl_request(table_name, ttl_status):