I have a setup where there is a node.js application that writes to a kinesis stream using putRecords for two items. The kinesis stream feeds a Lambda function that is configured with an eventSourceMapping with a batch size of 1. However, when I debug what the Records Kinesis feeds the lambda for an invocation, I see that the lambda is processing two records. Both of these records are on the same shard and have a sequence number which is pretty close.

The interesting thing is that if I switch the node.js published to use putRecord instead of putRecords, the kinesis records have a slightly farther apart sequence number and the lambda is fed the records individually.

The java code to configure the event source mapping
```
        AWSLambdaAsync lambdaClient = AWSResourceFactory.getLambdaClient();
        CreateEventSourceMappingRequest request = new CreateEventSourceMappingRequest();
        request.setEventSourceArn(kinesisArn);
        request.setFunctionName(functionName);
        request.setEnabled(true);
        request.setStartingPosition(EventSourcePosition.TRIM_HORIZON);
        request.setBatchSize(1);
        lambdaClient.createEventSourceMapping(request);
```

The localstack lambda output that shows multiple records being read at a time:

```
{
	"Records": [{
		"eventID": "shardId-000000000000:49593014281924840790139112603493819506073986345293840386",
		"eventSourceARN": "arn:aws:kinesis:us-east-1:000000000000:stream/MyStream",
		"kinesis": {
			"partitionKey": "ed0f756b97234f4fae9e3d1a886b8fbc",
			"data": "myData1",
			"sequenceNumber": "49593014281924840790139112603493819506073986345293840386"
		}
	}, {
		"eventID": "shardId-000000000000:49593014281924840790139112603495028431893600974468546562",
		"eventSourceARN": "arn:aws:kinesis:us-east-1:000000000000:stream/MyStream",
		"kinesis": {
			"partitionKey": "abee63a9299385699d65e89a290a9065",
			"data": "myData2",
			"sequenceNumber": "49593014281924840790139112603495028431893600974468546562"
		}
	}]
}
```

'payload': {'S': str(data)}
        }
        aws_stack.create_dynamodb_table(table_name, partition_key='id')
        dynamodb.put_item(TableName=table_name, Item=item)
        return ''
    if re.match(r'^https?://.+', config.LAMBDA_FALLBACK_URL):
        response = safe_requests.post(config.LAMBDA_FALLBACK_URL, data)
        return response.content
    raise ClientError('Unexpected value for LAMBDA_FALLBACK_URL: %s' % config.LAMBDA_FALLBACK_URL)
def get_lambda_policy(function):
    iam_client = aws_stack.connect_to_service('iam')
    policies = iam_client.list_policies(Scope='Local', MaxItems=500)['Policies']
    docs = []
    for p in policies:
        
        versions = iam_client.list_policy_versions(PolicyArn=p['Arn'])['Versions']
        default_version = [v for v in versions if v.get('IsDefaultVersion')]
        versions = default_version or versions
        doc = versions[0]['Document']
        doc = doc if isinstance(doc, dict) else json.loads(doc)
        if not isinstance(doc['Statement'], list):
            doc['Statement'] = [doc['Statement']]
        for stmt in doc['Statement']:
            stmt['Principal'] = stmt.get('Principal') or {'AWS': TEST_AWS_ACCOUNT_ID}
        doc['PolicyArn'] = p['Arn']
        doc['Id'] = 'default'
        docs.append(doc)
    policy = [d for d in docs if d['Statement'][0]['Resource'] == func_arn(function)]
    return (policy or [None])[0]
def not_found_error(ref=None, msg=None):