UNPKG

cdk-ssm-secure-iam-access-key

Version:

Creates an IAM Access Key for a provided IAM User and stores the result in an SSM SecureString Parameter

13 lines (12 loc) 546 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getUpdatedSystemClockOffset = void 0; const isClockSkewed_1 = require("./isClockSkewed"); const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { const clockTimeInMs = Date.parse(clockTime); if ((0, isClockSkewed_1.isClockSkewed)(clockTimeInMs, currentSystemClockOffset)) { return clockTimeInMs - Date.now(); } return currentSystemClockOffset; }; exports.getUpdatedSystemClockOffset = getUpdatedSystemClockOffset;