diff --git a/.changeset/green-flies-draw.md b/.changeset/green-flies-draw.md new file mode 100644 index 000000000..f8a921677 --- /dev/null +++ b/.changeset/green-flies-draw.md @@ -0,0 +1,5 @@ +--- +'skuba': patch +--- + +template/lambda-sqs-worker: Remove `@aws-sdk/util-utf8-node` library diff --git a/template/lambda-sqs-worker/package.json b/template/lambda-sqs-worker/package.json index 7a8be2846..413cb7945 100644 --- a/template/lambda-sqs-worker/package.json +++ b/template/lambda-sqs-worker/package.json @@ -17,9 +17,8 @@ "@aws-sdk/client-codedeploy": "^3.363.0", "@aws-sdk/client-lambda": "^3.363.0", "@aws-sdk/client-sns": "^3.363.0", - "@aws-sdk/util-utf8-node": "^3.259.0", "@seek/logger": "^6.0.0", - "datadog-lambda-js": "^7.0.0", + "datadog-lambda-js": "~7.100.0", "dd-trace": "^4.0.0", "skuba-dive": "^2.0.0", "zod": "^3.19.1" diff --git a/template/lambda-sqs-worker/src/hooks.ts b/template/lambda-sqs-worker/src/hooks.ts index a80a361a6..40c95cf2d 100644 --- a/template/lambda-sqs-worker/src/hooks.ts +++ b/template/lambda-sqs-worker/src/hooks.ts @@ -7,7 +7,6 @@ import { PutLifecycleEventHookExecutionStatusCommand, } from '@aws-sdk/client-codedeploy'; import { InvokeCommand, LambdaClient } from '@aws-sdk/client-lambda'; -import { toUtf8 } from '@aws-sdk/util-utf8-node'; const codeDeploy = new CodeDeployClient({ apiVersion: '2014-10-06', @@ -51,7 +50,7 @@ const smokeTestLambdaFunction = async (): Promise => { if (response.FunctionError) { console.error('Error:', response.FunctionError); if (response.Payload) { - console.error(toUtf8(response.Payload)); + console.error(response.Payload.transformToString()); } return 'Failed'; }