Skip to content

Instantly share code, notes, and snippets.

@thomasmichaelwallace
Created March 27, 2019 20:49
Show Gist options
  • Save thomasmichaelwallace/dbb25bd9a6fe25b168f3e8efaff3c5b7 to your computer and use it in GitHub Desktop.
Save thomasmichaelwallace/dbb25bd9a6fe25b168f3e8efaff3c5b7 to your computer and use it in GitHub Desktop.
aws-sdk benchmark: v3
import { DynamoDB } from '@aws-sdk/client-dynamodb-v2-node';
const ddb = new DynamoDB.DocumentClient({ region: 'eu-west-1' });
export async function handleV2(event) { // eslint-disable-line import/prefer-default-export
const { TableName, Key } = event;
const { Item } = await ddb.get({ TableName, Key });
return Item || {};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment