(event)
| 5 | const docClient = DynamoDBDocumentClient.from(client); |
| 6 | |
| 7 | export const handler = async (event) => { |
| 8 | await docClient.send( |
| 9 | new PutCommand({ |
| 10 | TableName: process.env.TABLE_NAME, |
| 11 | Item: { |
| 12 | id: Math.random().toString(36).substring(2), |
| 13 | content: JSON.stringify(event), |
| 14 | }, |
| 15 | }) |
| 16 | ); |
| 17 | return { |
| 18 | statusCode: 200, |
| 19 | body: "OK", |
| 20 | }; |
| 21 | }; |