Closed krtallc closed 1 month ago
Question, did you recently integrate a more complex service into your build?
You can increase the build timeout threshold in the amplify control console
We had this problem when we first integrated an opensearch cluster into our build. the build timed out but going to the cloud formation console we could see that the cloud formation stacks did finish ultimately once the initial cluster was up the jobs would go back to being fast again but complex changes to the cluster would still drag a bit.
We are currently considering two solutions moving to a split front end backend project style so that we can give the backend the time it needs complete and speedup front end deploys.
Alternatively we are exploring breaking out big ticket items like cognito and opensearch and some analytical things cross account to a central account then making these resources available cross account refereces to the smaller serverless projects.
Hey @krtallc, could you provide us the App-id, region and name of the branch?
@dataminion and @ykethan and team, greetings! I appreciate your response.
@dataminion - I had not integrated any complex services. At a high level it is a static 3 page webpage with option of selecting an appointment schedule to receive a calendar invite with appointment slot selected for the services provided.
Even with _BUILD_TIMEOUT set to 120 timeout happened. I am glad to see the cloud formation stacks finished.
@ykethan - I deleted all the created deployments and started working on a local cli test build manually. So I recreated a new build which failed again. Here are the details: Region: us-east-1 All apps / krtallc_20240831 / main / Deployments Deployments Deployment 1 Failed Started at
9/4/2024, 7:26 PM Build duration
30 minutes 18 seconds Domain
https://main.d360tpbeqlbhhk.amplifyapp.com Repository
krtallc_20240831:main Last commit
Auto-build Name of the branch is main
Hey, thank you for your patience. On diving into the logs did notice the streamlit run streamlit_app.py
created a server with addresses which timed out. Amplify hosting currently does not support running a long running process such as server. Currently Amplify deploys you build artifacts to CloudFront.
For example in a nextJS App
frontend:
phases:
preBuild:
commands:
- npm ci --cache .npm --prefer-offline
build:
commands:
- npm run build
artifacts:
baseDirectory: .next
files:
- '**/*'
The application is build and the artifact is then deployed to the CDN. refer to this documentation.
While i am not familiar with streamlit, i was able to find a aws-sample app that may help with your use case
@krtallc 👋 , as stated previously the Amplify builds have failed due to timing out after 30 minutes (the default timeout limit). However, we do support a maximum build timeout of 2 hours. For deploying Streamlit based Python apps, we recommend reducing the number of long running commands executed during the build or optimize the build process to ensure faster execution as this can help prevent timeout issues.
Closing the thread since the root cause has been identified for the build failures.
Environment information
Describe the bug
Build
More than 1 hour Build timed out
Here is the amplify.yml:
Here is deploy log:
There is no additional information that led to build time out error. The environment variable _BUILD_TIMEOUT is set to 120 and still same result. Unsure of what the issue could be? Background - application code is python with streamlit framework, 99% static content with a scheduling module which is real time dynamic.
Don't know how to proceed, any help would be greatly appreciated.
Reproduction steps
The amplisy.yml is attached above, The Repository is krtallc:main
environment variable _BUILD_TIMEOUT is set to 120