-
Notifications
You must be signed in to change notification settings - Fork 820
Closed
Description
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
22.16
Amplify CLI Version
14.1.2
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Describe the bug
When I run amplify publish, I get this error/output:
✔ Zipping artifacts completed.
✖ Deployment failed! Please report an issue on the Amplify Console GitHub issue tracker at https://github.com/aws-amplify/amplify-console/issues.
🛑 identity.expiration.getTime is not a function
This error only happens on @aws-amplify/cli version 14.1.x. Downgrading to 14.0.x works without this error.
In my scenario, there have not been any backend changes when I tried to publish, only frontend changes. It's a Amplify Gen 1 v5 project.
Expected behavior
It should work without an issue like in Amplify CLI 14.0
Reproduction steps
- Install Amplify CLI
npm i -g @aws-amplify/cli - Init Amplify Gen 1 project
amplify init - Configure AWS credentials accordinlgy
- Add hosting
amplify hosting add - Cannot even publish because the error already appeared at this step:
🛑 identity.expiration.getTime is not a function
Project Identifier
No response
Log output
# Put your logs below this line
2025-10-22T12:07:21.532Z|info : amplify add hosting
2025-10-22T12:07:21.568Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2025-10-22T12:09:45.501Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["[REDACTED]"])
2025-10-22T12:09:45.502Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"region":"eu-central-1","role_arn":"[REDACTED]","source_profile":"[REDACTED]"}])
2025-10-22T12:09:45.502Z|info : amplify-provider-awscloudformation.system-config-manager.getCacheFilePath(["/home/codespace/.amplify/awscloudformation"])
2025-10-22T12:09:45.555Z|error : identity.expiration.getTime is not a function
UnknownFault: identity.expiration.getTime is not a function
2025-10-22T12:12:39.831Z|info : amplify diagnose core {"send-report":true,"yes":false}
2025-10-22T12:12:39.869Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
Additional information
I got the error on an existing project but to find out if it was reproducible, I also got that error before I could even try amplify publish in a completely fresh project (see reproduction steps above).
Before submitting, please confirm:
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- I have removed any sensitive information from my code snippets and submission.
Metadata
Metadata
Assignees
Labels
No labels