Created
March 27, 2019 20:38
-
-
Save thomasmichaelwallace/21baff2d7f1357be847b8c19bec7f8b3 to your computer and use it in GitHub Desktop.
aws-sdk benchmark: external
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DynamoDB = { | |
DocumentClient() { | |
return { get: params => ({ promise: async () => params }) }; | |
}, | |
}; | |
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 }).promise(); | |
return Item || {}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment