This error was introduced today in the @aws-sdk/client-s3@3.624.0release.
' TypeError: identity.expiration.getTime is not a function\n' +
' at /home/runner/work/aio-e2e-tests/aio-e2e-tests/.repos/aio-lib-web/node_modules/@smithy/core/dist-cjs/index.js:272:154\n' +
' at /home/runner/work/aio-e2e-tests/aio-e2e-tests/.repos/aio-lib-web/node_modules/@smithy/core/dist-cjs/index.js:317:9\n' +
' at /home/runner/work/aio-e2e-tests/aio-e2e-tests/.repos/aio-lib-web/node_modules/@smithy/core/dist-cjs/index.js:82:17\n' +
' at /home/runner/work/aio-e2e-tests/aio-e2e-tests/.repos/aio-lib-web/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:138:14\n' +
' at /home/runner/work/aio-e2e-tests/aio-e2e-tests/.repos/aio-lib-web/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:34:22\n' +
' at RemoteStorage.folderExists (/home/runner/work/aio-e2e-tests/aio-e2e-tests/.repos/aio-lib-web/lib/remote-storage.js:91:27)\n' +
' at deployWeb (/home/runner/work/aio-e2e-tests/aio-e2e-tests/.repos/aio-lib-web/src/deploy-web.js:36:18)\n' +
' at Object.<anonymous> (/home/runner/work/aio-e2e-tests/aio-e2e-tests/.repos/aio-lib-web/e2e/e2e.js:86:13)\n' +
'\n' +
Repro
in folder e2e, fill in the .env with the right credentials (see .env.sample)
in the root of the repo, run npm run e2e
Interim Fix
Pin @aws-sdk/client-s3 to v3.623.0.
Final Fix
wherever we have credentials.expiration, convert it to a Date object:
new Date(credentials.expiration). The credentials.expiration value is an ISO-8601 string
Description
This error was introduced today in the
@aws-sdk/client-s3@3.624.0
release.Repro
e2e
, fill in the.env
with the right credentials (see .env.sample)npm run e2e
Interim Fix
@aws-sdk/client-s3
tov3.623.0
.Final Fix
new Date(credentials.expiration)
. Thecredentials.expiration
value is an ISO-8601 string^