Why values are not inserted into DynamoDB unless calling `.promise()`?
问题 I have some simple async code in a lambda, fetching some data and then inserting that into DynamoDB. With this code, everything works as expected: const AWS = require('aws-sdk'); const docClient = new AWS.DynamoDB.DocumentClient({ region: 'eu-west-1', apiVersion: 'latest' }); function fetchSomething() { return new Promise((resolve) => { setTimeout(() => { resolve({ foo: 'Foo', bar: 'Bar' }); }, 2000); }) } exports.handler = async (event) => { try { const data = await fetchSomething(); const