diff --git a/lambda/package-lock.json b/lambda/package-lock.json index ddac02a..2c66931 100644 --- a/lambda/package-lock.json +++ b/lambda/package-lock.json @@ -9,8 +9,8 @@ "version": "1.0.0", "hasInstallScript": true, "dependencies": { - "@aws-lambda-powertools/logger": "1.18.1", - "@aws-lambda-powertools/tracer": "1.18.1", + "@aws-lambda-powertools/logger": "2.0.2", + "@aws-lambda-powertools/tracer": "2.0.2", "@aws-sdk/client-dynamodb": "3.525.0", "@aws-sdk/client-s3": "3.525.0", "@aws-sdk/client-sesv2": "3.525.0", @@ -167,16 +167,16 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-lambda-powertools/commons": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.18.1.tgz", - "integrity": "sha512-gFRgQ2GJDghKvf+fXvT0kQVftgOT05W+hCa7RkfZj6HSjVAO+9DZZeJL3JK1HcsLAjWRj7W9ra0/MqB3Abf+PQ==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-2.0.2.tgz", + "integrity": "sha512-5fHXZwol2LVb+UGwNPHVIZfeAgztyLaAABNvVlDqzrkpwlbfEAEBRxQN9I/vgm4NNJC7+hZHqk0ca+R4JHZBGQ==" }, "node_modules/@aws-lambda-powertools/logger": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-1.18.1.tgz", - "integrity": "sha512-GsSMqaFXCSz+llSOn2CVNMoN+j/jNsS6JP2Opy9myU0tvg7PeuU3+rN24vKyibUwpxM466IzWFBSJkYdm0bqVw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-2.0.2.tgz", + "integrity": "sha512-VzwVI2N8HVy7T8xAAKwoZjV/iKHYauFpFPCsM5rRaQ9s6j4dNrwGNmCcv+iLLopRCsXJHoSzBUQ+nBBI/eZ4sA==", "dependencies": { - "@aws-lambda-powertools/commons": "^1.18.1", + "@aws-lambda-powertools/commons": "^2.0.2", "lodash.merge": "^4.6.2" }, "peerDependencies": { @@ -189,11 +189,11 @@ } }, "node_modules/@aws-lambda-powertools/tracer": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-1.18.1.tgz", - "integrity": "sha512-bMLBtdEFNmLUR9RJvBULR6XJD0XopUhhS1mlpeQlm2BCPIN3gLbqAlJK8dMXyAw8GCpLpHaziCo2+7a/AIh7lA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-2.0.2.tgz", + "integrity": "sha512-qLUXsMK/KJ7ctUx62hr8irargqvF5o4TY9IkUNFTTC9DTP5905ulgogxtH9fJP6hvvX7KCFzoJmvibROXAxFOw==", "dependencies": { - "@aws-lambda-powertools/commons": "^1.18.1", + "@aws-lambda-powertools/commons": "^2.0.2", "aws-xray-sdk-core": "^3.5.3" }, "peerDependencies": { diff --git a/lambda/package.json b/lambda/package.json index e9583d9..bfd909c 100644 --- a/lambda/package.json +++ b/lambda/package.json @@ -2,8 +2,8 @@ "name": "share-lambda", "version": "1.0.0", "dependencies": { - "@aws-lambda-powertools/logger": "1.18.1", - "@aws-lambda-powertools/tracer": "1.18.1", + "@aws-lambda-powertools/logger": "2.0.2", + "@aws-lambda-powertools/tracer": "2.0.2", "@aws-sdk/client-dynamodb": "3.525.0", "@aws-sdk/client-s3": "3.525.0", "@aws-sdk/client-sesv2": "3.525.0", diff --git a/lambda/src/functions/addShare.ts b/lambda/src/functions/addShare.ts index a35d642..0c7140f 100644 --- a/lambda/src/functions/addShare.ts +++ b/lambda/src/functions/addShare.ts @@ -8,8 +8,8 @@ import {DateTime} from "luxon"; import {BadRequest, InternalServerError, UnprocessableEntity} from "http-errors" import middy from "@middy/core"; -import {captureLambdaHandler} from "@aws-lambda-powertools/tracer"; -import {injectLambdaContext} from "@aws-lambda-powertools/logger"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; import httpJsonBodyParserMiddleware from '@middy/http-json-body-parser' import httpResponseSerializerMiddleware from '@middy/http-response-serializer' import validatorMiddleware from '@middy/validator' diff --git a/lambda/src/functions/completeUpload.ts b/lambda/src/functions/completeUpload.ts index 2e63601..8eead25 100644 --- a/lambda/src/functions/completeUpload.ts +++ b/lambda/src/functions/completeUpload.ts @@ -3,8 +3,8 @@ import {DynamoDBClient, GetItemCommand, PutItemCommand} from "@aws-sdk/client-dy import {uploadService} from "../services/UploadService"; import {SendBulkEmailCommand, SESv2Client} from "@aws-sdk/client-sesv2"; import {tracer} from "../services/Tracer"; -import {captureLambdaHandler} from "@aws-lambda-powertools/tracer"; -import {injectLambdaContext} from "@aws-lambda-powertools/logger"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; import {logger} from "../services/Logger"; import {DateTime} from "luxon"; diff --git a/lambda/src/functions/deleteShare.ts b/lambda/src/functions/deleteShare.ts index 9949d2d..a23b332 100644 --- a/lambda/src/functions/deleteShare.ts +++ b/lambda/src/functions/deleteShare.ts @@ -1,8 +1,8 @@ import {APIGatewayProxyEventV2WithJWTAuthorizer, APIGatewayProxyResultV2} from "aws-lambda"; import {DynamoDBClient, DeleteItemCommand} from "@aws-sdk/client-dynamodb"; import {tracer} from "../services/Tracer"; -import {captureLambdaHandler} from "@aws-lambda-powertools/tracer"; -import {injectLambdaContext} from "@aws-lambda-powertools/logger"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; import {logger} from "../services/Logger"; import middy from "@middy/core"; diff --git a/lambda/src/functions/forwardShare.ts b/lambda/src/functions/forwardShare.ts index 46d5958..dc329a5 100644 --- a/lambda/src/functions/forwardShare.ts +++ b/lambda/src/functions/forwardShare.ts @@ -4,7 +4,8 @@ import { } from "aws-lambda"; import {DynamoDBClient, GetItemCommand} from "@aws-sdk/client-dynamodb"; import {CloudFrontRequestHandler} from "aws-lambda/trigger/cloudfront-request"; -import {injectLambdaContext, Logger} from "@aws-lambda-powertools/logger"; +import {Logger} from "@aws-lambda-powertools/logger"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; import middy from "@middy/core"; import {DateTime} from "luxon"; import {response404, response500} from "../types/edgeResponses"; diff --git a/lambda/src/functions/fullfillShareRequest.ts b/lambda/src/functions/fullfillShareRequest.ts index 2aa1a0b..c25fca4 100644 --- a/lambda/src/functions/fullfillShareRequest.ts +++ b/lambda/src/functions/fullfillShareRequest.ts @@ -1,9 +1,9 @@ import {APIGatewayProxyEventV2WithJWTAuthorizer, APIGatewayProxyResultV2} from "aws-lambda"; import {DynamoDBClient, GetItemCommand, PutItemCommand} from "@aws-sdk/client-dynamodb"; import {uploadService} from "../services/UploadService"; -import {captureLambdaHandler} from "@aws-lambda-powertools/tracer"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; import {tracer} from "../services/Tracer"; -import {injectLambdaContext} from "@aws-lambda-powertools/logger"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; import {logger} from "../services/Logger"; import {DateTime} from "luxon"; import {BadRequest, NotFound} from "http-errors"; diff --git a/lambda/src/functions/listShares.ts b/lambda/src/functions/listShares.ts index 214cf06..d7b04d3 100644 --- a/lambda/src/functions/listShares.ts +++ b/lambda/src/functions/listShares.ts @@ -3,9 +3,9 @@ import { DynamoDBClient, QueryCommand } from "@aws-sdk/client-dynamodb"; -import {captureLambdaHandler} from "@aws-lambda-powertools/tracer"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; import {tracer} from "../services/Tracer"; -import {injectLambdaContext} from "@aws-lambda-powertools/logger"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; import {logger} from "../services/Logger"; import {DateTime} from "luxon"; diff --git a/lambda/src/functions/onShareDeletion.ts b/lambda/src/functions/onShareDeletion.ts index e38dbca..3592a5d 100644 --- a/lambda/src/functions/onShareDeletion.ts +++ b/lambda/src/functions/onShareDeletion.ts @@ -4,9 +4,9 @@ import { } from "aws-lambda"; import {DeleteObjectCommand, S3Client} from "@aws-sdk/client-s3"; import middy from "@middy/core"; -import {captureLambdaHandler} from "@aws-lambda-powertools/tracer"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; import {tracer} from "../services/Tracer"; -import {injectLambdaContext} from "@aws-lambda-powertools/logger"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; import {logger} from "../services/Logger"; import errorLogger from "@middy/error-logger"; diff --git a/lambda/src/functions/parseLog.ts b/lambda/src/functions/parseLog.ts index 2997550..0c9feb5 100644 --- a/lambda/src/functions/parseLog.ts +++ b/lambda/src/functions/parseLog.ts @@ -8,9 +8,9 @@ import CloudFrontParser from 'cloudfront-log-parser' import LogSubmittedEvent from "../types/LogSubmittedEvent"; import {ClickData, ClickDataMap} from "../types/ClickData"; import middy from "@middy/core"; -import {captureLambdaHandler} from "@aws-lambda-powertools/tracer"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; import {tracer} from "../services/Tracer"; -import {injectLambdaContext} from "@aws-lambda-powertools/logger"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; import {logger} from "../services/Logger"; import errorLogger from "@middy/error-logger"; diff --git a/lambda/src/functions/submitLogAnalysis.ts b/lambda/src/functions/submitLogAnalysis.ts index 8c3ea6a..db02e58 100644 --- a/lambda/src/functions/submitLogAnalysis.ts +++ b/lambda/src/functions/submitLogAnalysis.ts @@ -4,10 +4,10 @@ import { } from "aws-lambda"; import LogSubmittedEvent from "../types/LogSubmittedEvent"; import middy from "@middy/core"; -import {captureLambdaHandler} from "@aws-lambda-powertools/tracer"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; import {tracer} from "../services/Tracer"; import {SFNClient, StartExecutionCommand} from "@aws-sdk/client-sfn"; -import {injectLambdaContext} from "@aws-lambda-powertools/logger"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; import {logger} from "../services/Logger"; import errorLogger from "@middy/error-logger";