We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a52e19 commit 0a74352Copy full SHA for 0a74352
1 file changed
lambdas/upsert-letter/src/index.ts
@@ -1,12 +1,13 @@
1
// Replace me with the actual code for your Lambda function
2
-import { Handler } from "aws-lambda";
+import { SQSEvent, SQSHandler } from "aws-lambda";
3
+import pino from "pino";
4
-const handler: Handler = async (event) => {
5
- console.log("Received event:", event);
6
- return {
7
- statusCode: 200,
8
- body: "Event logged",
9
- };
+const log = pino();
+
+export const handler: SQSHandler = async (event: SQSEvent) => {
+ for (const record of event.Records) {
+ log.info({ description: "Received event", message: record.body });
10
+ }
11
};
12
13
export default handler;
0 commit comments