import { DynamoDB } from 'aws-sdk'; import { ref } from './intrinsic'; import cloudformationResources, { MyTable } from './resources'; export default { handler:'create.main', environment: { TABLE_NAME: ref(cloudformationResources, MyTable) }, events: [ { httpApi: 'POST /new'} ] } const DocumentClient = new DynamoDB.DocumentClient(); const main = async (event) => { // ... }