Skip to content

Commit 37b59f9

Browse files
authored
fix(lib-dynamodb): remove log filter overrides (#7009)
1 parent 25da945 commit 37b59f9

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

Diff for: lib/lib-dynamodb/src/baseCommand/DynamoDBDocumentClientCommand.ts

-27
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ export abstract class DynamoDBDocumentClientCommand<
3636

3737
public abstract middlewareStack: MiddlewareStack<Input | BaseInput, Output | BaseOutput>;
3838

39-
private static defaultLogFilterOverrides = {
40-
overrideInputFilterSensitiveLog(...args: any[]) {},
41-
overrideOutputFilterSensitiveLog(...args: any[]) {},
42-
};
43-
4439
protected addMarshallingMiddleware(configuration: DynamoDBDocumentClientResolvedConfig): void {
4540
const { marshallOptions = {}, unmarshallOptions = {} } = configuration.translateConfig || {};
4641

@@ -54,13 +49,6 @@ export abstract class DynamoDBDocumentClientCommand<
5449
): Promise<InitializeHandlerOutput<Output | BaseOutput>> => {
5550
setFeature(context, "DDB_MAPPER", "d");
5651
args.input = marshallInput(args.input, this.inputKeyNodes, marshallOptions);
57-
context.dynamoDbDocumentClientOptions =
58-
context.dynamoDbDocumentClientOptions || DynamoDBDocumentClientCommand.defaultLogFilterOverrides;
59-
60-
const input = args.input;
61-
context.dynamoDbDocumentClientOptions.overrideInputFilterSensitiveLog = () => {
62-
return context.inputFilterSensitiveLog?.(input);
63-
};
6452
return next(args);
6553
},
6654
{
@@ -76,21 +64,6 @@ export abstract class DynamoDBDocumentClientCommand<
7664
args: DeserializeHandlerArguments<Input | BaseInput>
7765
): Promise<DeserializeHandlerOutput<Output | BaseOutput>> => {
7866
const deserialized = await next(args);
79-
80-
/**
81-
* The original filter function is based on the shape of the
82-
* base DynamoDB type, whereas the returned output will be
83-
* unmarshalled. Therefore the filter log needs to be modified
84-
* to act on the original output structure.
85-
*/
86-
const output = deserialized.output;
87-
context.dynamoDbDocumentClientOptions =
88-
context.dynamoDbDocumentClientOptions || DynamoDBDocumentClientCommand.defaultLogFilterOverrides;
89-
90-
context.dynamoDbDocumentClientOptions.overrideOutputFilterSensitiveLog = () => {
91-
return context.outputFilterSensitiveLog?.(output);
92-
};
93-
9467
deserialized.output = unmarshallOutput(deserialized.output, this.outputKeyNodes, unmarshallOptions);
9568
return deserialized;
9669
},

0 commit comments

Comments
 (0)