From a2c5b1b27733dcdbabbe51af42168abc8aa9ad5a Mon Sep 17 00:00:00 2001 From: Ganey Date: Wed, 6 Jan 2021 13:05:41 +0000 Subject: [PATCH] Update billing to nearest ms AWS has updated billing to the nearest 1ms instead of 100ms as per https://aws.amazon.com/about-aws/whats-new/2020/12/aws-lambda-changes-duration-billing-granularity-from-100ms-to-1ms/ --- src/lambda/LambdaFunction.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lambda/LambdaFunction.js b/src/lambda/LambdaFunction.js index 5ffba9859..2d94dcb08 100644 --- a/src/lambda/LambdaFunction.js +++ b/src/lambda/LambdaFunction.js @@ -209,11 +209,9 @@ export default class LambdaFunction { return this.#executionTimeEnded - this.#executionTimeStarted } - // rounds up to the nearest 100 ms + // round up to the nearest ms _billedExecutionTimeInMillis() { - return ( - ceil((this.#executionTimeEnded - this.#executionTimeStarted) / 100) * 100 - ) + return ceil(this.#executionTimeEnded - this.#executionTimeStarted) } // extractArtifact, loosely based on: