lambda-live-debugger
Version:
Debug Lambda functions locally like it is running in the cloud
33 lines (32 loc) • 1.26 kB
JavaScript
import { getFlexibleChecksumsPlugin } from "@aws-sdk/middleware-flexible-checksums";
import { getS3ExpiresMiddlewarePlugin } from "@aws-sdk/middleware-sdk-s3";
import { getSsecPlugin } from "@aws-sdk/middleware-ssec";
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetObject$ } from "../schemas/schemas_0";
export { $Command };
export class GetObjectCommand extends $Command
.classBuilder()
.ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" },
})
.m(function (Command, cs, config, o) {
return [
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
getFlexibleChecksumsPlugin(config, {
requestChecksumRequired: false,
requestValidationModeMember: 'ChecksumMode',
'responseAlgorithms': ['CRC64NVME', 'CRC32', 'CRC32C', 'SHA256', 'SHA1'],
}),
getSsecPlugin(config),
getS3ExpiresMiddlewarePlugin(config),
];
})
.s("AmazonS3", "GetObject", {})
.n("S3Client", "GetObjectCommand")
.sc(GetObject$)
.build() {
}