use of com.amazonaws.services.lambda.runtime.events.DynamodbEvent.DynamodbStreamRecord in project bender by Nextdoor.
the class DynamodbEventIterator method next.
@Override
public InternalEvent next() {
DynamodbStreamRecord record = this.iterator.next();
String stringKeys = this.serializer.serialize(record.getDynamodb().getKeys());
String stringRecord = this.serializer.serialize(record);
return new DynamodbInternalEvent(record, stringKeys, stringRecord, this.context);
}
use of com.amazonaws.services.lambda.runtime.events.DynamodbEvent.DynamodbStreamRecord in project bender by Nextdoor.
the class DynamodbHandler method handler.
public void handler(DynamodbEvent event, Context context) throws HandlerException {
if (!initialized) {
init(context);
}
this.recordIterator = new DynamodbEventIterator(new LambdaContext(context), event.getRecords());
DynamodbStreamRecord firstRecord = event.getRecords().get(0);
this.source = SourceUtils.getSource(firstRecord.getEventSourceARN(), sources);
super.process(context);
}
Aggregations