serverless-spy
Version:
CDK-based library for writing elegant integration tests on AWS serverless architecture and an additional web console to monitor events in real time.
12 lines (11 loc) • 452 B
JavaScript
import { normalizeProvider } from "@smithy/util-middleware";
export const resolveCustomEndpointsConfig = (input) => {
const { endpoint, urlParser } = input;
return {
...input,
tls: input.tls ?? true,
endpoint: normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint),
isCustomEndpoint: true,
useDualstackEndpoint: normalizeProvider(input.useDualstackEndpoint ?? false),
};
};