Open ymsrk opened 2 years ago
Hi @ymsrk 👋🏽 thanks for raising this issue. We are tracking this bug for prioritization. We will update this issue once we have more information
We have added this bug to our backlog for prioritization and the team is investigating a solution for this.
I am facing the exact issue
We are experiencing the same issue. The workaround not always works for us with doing the push locally.
This is an issue I'm having as well. Is there a way to manually refresh the token?
Nightwatch test are not finishing due timeout as well https://github.com/aws-amplify/amplify-hosting/issues/3204
Hi @austinamorusoyardstick 👋🏽 the 60 minute timeout is a hard limit at this time. Unfortunately there is no workaround for this but the team is aware of this limitation and are tracking this in our product backlog. We apologize for this inconvenience.
facing same issue
facing the same issue
@hloriii I am also facing same issue, I am using ISR and have around 25000 pages, my build takes more than hour, and i am getting same issue,
ExpiredToken: The provided token has expired. at Request.extractError (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/services/s3.js:711:35) at Request.callListeners (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/sequential_executor.js:106:20) at Request.emit (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
@ymsrk your issue resolved ? if yes how ?
@gauravsapkal1 Let me tell you how we are getting around this problem. In my project, I limit the number of pages I create to around 25,000 so as not to exceed the 60 minute timeout. I would originally like to create more than 30,000 pages, but I accept the constraint. I hope this problem will be solved in the future.
@ymsrk Thanks for comment, I also creating around 25000 pages but now I will limit them upto 10,000.
@hloriii if we increase build time in environment variables "_BUILD_TIMEOUT" more than hour will it refresh token after an hour?
@hloriii if we increase build time in environment variables "_BUILD_TIMEOUT" more than hour will it refresh token after an hour?
I can say from experience it will not refresh the token.
@localsecurity-emily yes I also thinking that it will not work, but I create case at aws they replied this @hloriii can you look into this
That works up to one hour until the token expires. A timeout value will cut off the build if you want to make it last like less than 30 minutes max. When set to two hours, the token expiry is simply before that and fails on that. If that issues was not around, it would cut off build time at two hours and then stop.
@roelvandenbrand yes I tried its not working by increasing build time, @hloriii can you confirm that increase in _BUILD_TIMEOUT will refresh token or not.
Hi everyone, thank you so much for your continued patience and apologies for the delayed response on this thread.
The ExpiredToken: The security token included in the request is expired
exception can occur in the following scenarios:
Unfortunately, we do not have a way to increase the token expiration to more than an hour because this limitation is enforced by IAM on the role chaining duration: https://repost.aws/knowledge-center/iam-role-chaining-limit
When a backend build is initiated, Amplify Hosting’s build session role assumes your Amplify app’s IAM service role to deploy/update backend resources in your AWS account using temporary security credentials.
When a frontend build for a Web_Dynamic
(Next.js 11) app (Classic SSR provider) is initiated, Amplify Hosting's build session role assumes your Amplify app's IAM service role to deploy/update backend resources in your AWS account using temporary security credentials.
Note: Updating the _BUILD_TIMEOUT
Amplify environment variable to > 60 minutes will not refresh the security token.
@Jay2113 We are having this is when trying to create new environment is created.
Is there any guidance on scenarios where there isn't an update happening but a create, and the create is timing out?
For us the main issue is the SearchStack taking close to 25 minutes to create, is there to tell it to skip that stack on the first build, or import an existing domain? We could maybe iterate and send a second build out manually, if we were able to somehow keep it from trying to deploy everything the first time around.
Even though that would suck, I would settle for any workaround as we try to figure out and move thing into CDK. We are completely stuck at the moment, our devs are completely blocked.
Thanks in advance.
I believe our team has hit this issue as well. A developer on our team is attempting to create a new Amplify environment from our existing one, and the creation timed out. I suspect this is happening because we have a relatively complex GraphQL schema based on the advice above. Is there a potential workaround for this? @djorgji were you able to find a solution to this?
@Jay2113 if you have any suggestions I'd be very grateful to hear, thanks very much for your time!
Before opening, please confirm:
App Id
d13pw8k8p2rhkg
Region
ap-northeast-1
Amplify Hosting feature
Build settings
Describe the bug
I am trying to deploy my nextjs app on aws through CodeCommit repository. But the build is failing and giving me below pasted message.
"ExpiredToken: The security token included in the request is expired"
Expected behavior
No exceptions, automatic token refresh if operation takes long.
Reproduction steps
Build Settings
Additional information