Open rafaelcorreiapoli opened 6 years ago
Hello! I've set up the project correctly. When I invoke locally the following code
const fetchSomething = () => new Promise((resolve, reject) => { setTimeout(() => { resolve({ some: 'thing', }) }, 1000) }) export const asyncTest = async (event: APIGatewayEvent) => { const x = await fetchSomething() return { statusCode: 200, body: JSON.stringify(x), } }
Nothing is returned.
I've tested using callbacks in this same project and it works as expected
You need to make sure that your serverless project is using node8.10 as its runtime ... async won't work before that.
Hello! I've set up the project correctly. When I invoke locally the following code
Nothing is returned.
I've tested using callbacks in this same project and it works as expected