diff --git a/packages/aws-serverless/src/sdk.ts b/packages/aws-serverless/src/sdk.ts index b7ac8927813c..5b0100ae4460 100644 --- a/packages/aws-serverless/src/sdk.ts +++ b/packages/aws-serverless/src/sdk.ts @@ -108,7 +108,7 @@ function enhanceScopeWithEnvironmentData(scope: Scope, context: Context, startTi }); } -function setupTimeoutWatning(context: Context, options: WrapperOptions): NodeJS.Timeout | undefined { +function setupTimeoutWarning(context: Context, options: WrapperOptions): NodeJS.Timeout | undefined { // In seconds. You cannot go any more granular than this in AWS Lambda. const configuredTimeout = Math.ceil(tryGetRemainingTimeInMillis(context) / 1000); const configuredTimeoutMinutes = Math.floor(configuredTimeout / 60); @@ -220,7 +220,7 @@ export function wrapHandler( return async (event: TEvent, context: Context) => { context.callbackWaitsForEmptyEventLoop = options.callbackWaitsForEmptyEventLoop; - timeoutWarningTimer = setupTimeoutWatning(context, options); + timeoutWarningTimer = setupTimeoutWarning(context, options); async function processResult(): Promise { const scope = getCurrentScope(); @@ -272,7 +272,7 @@ function wrapStreamingHandler( ): Promise => { context.callbackWaitsForEmptyEventLoop = options.callbackWaitsForEmptyEventLoop; - timeoutWarningTimer = setupTimeoutWatning(context, options); + timeoutWarningTimer = setupTimeoutWarning(context, options); async function processStreamingResult(): Promise { const scope = getCurrentScope();