Skip to content

Commit

Permalink
Remove @aws-sdk/util-utf8-node from worker template (#1326)
Browse files Browse the repository at this point in the history
* Remove @aws-sdk/util-utf8-node

* Update green-flies-draw.md

* pin dep version
DataDog/datadog-lambda-js#442 (comment)
  • Loading branch information
samchungy authored Nov 29, 2023
1 parent eb9a35c commit 2cfc4da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-flies-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'skuba': patch
---

template/lambda-sqs-worker: Remove `@aws-sdk/util-utf8-node` library
3 changes: 1 addition & 2 deletions template/lambda-sqs-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions template/lambda-sqs-worker/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -51,7 +50,7 @@ const smokeTestLambdaFunction = async (): Promise<Status> => {
if (response.FunctionError) {
console.error('Error:', response.FunctionError);
if (response.Payload) {
console.error(toUtf8(response.Payload));
console.error(response.Payload.transformToString());
}
return 'Failed';
}
Expand Down

0 comments on commit 2cfc4da

Please sign in to comment.