I want to use single lambda for backing up of many tables.
Therefore, I want to distinguish s3 prefixes so I could easily restore only necessary tables.
Now I'm doing following
let eventSourceArn = event.Records[0].eventSourceARN;
let tableName = eventSourceArn.substring(
eventSourceArn.indexOf('table/') + 6,
eventSourceArn.indexOf('stream/') - 1
);
let config = {
S3Bucket: bucket,
S3Region: 'eu-west-1',
S3Prefix: tableName
};
Inside my lambda, but it looks as a hack. It would be nice to have such function bundled into backup-er.
I want to use single lambda for backing up of many tables.
Therefore, I want to distinguish s3 prefixes so I could easily restore only necessary tables.
Now I'm doing following
Inside my lambda, but it looks as a hack. It would be nice to have such function bundled into backup-er.