You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

AWS Amplify部署网站返回HTTP 404错误排查求助

AWS Amplify部署后HTTP 404错误问题

使用AWS Amplify部署网站时,构建和部署流程均显示成功,但访问网站时返回HTTP 404页面未找到错误。

已执行操作与观察结果

  • Amplify构建流程无报错完成;
  • 部署流程显示成功;
  • 访问网站时出现HTTP 404错误;
  • 确认构建流程包含标准静态404页面;
  • 日志中仅存在静态404页面处理记录(├ ○ /404 1.89 kB 111 kB),无其他相关报错;
  • 已检查DNS配置,确认正常。

疑问

该问题是否与应用路由配置或域名DNS未完成解析有关?

寻求帮助方向

  • AWS Amplify控制台中可能导致该问题的配置错误;
  • 部署流程中未正确发布或关联构建到对应端点的可能问题;
  • 可能遗漏的日志或错误信息。

日志片段

... (之前的构建和部署日志)
├ ○ /404 1.89 kB 111 kB
... (后续日志)

package.json

{
      "name": "olmo",
      "version": "0.1.0",
      "private": true,
      "scripts": {
        "dev": "next dev",
        "build": "next build",
        "start": "next start",
        "lint": "next lint",
        "eslint:fix": "npx eslint \"src/**/*.{js,tsx,jsx,ts}\" --fix",
        "lint:filenames": "find src -type f ! -name '*.js' ! -name '*.jsx' ! -name '*.ts' ! -name '*.tsx' ! -name '*.json' ! -name '*.md' ! -name '*.css' -exec echo 'Invalid file extension found:' '{}' ';",
        "prepare": "husky"
      },
      "husky": {
        "hooks": {
          "pre-commit": "npm run lint:filenames && npm run lint"
        }
      },
      "eslintConfig": {
        "extends": [
          "react-app"
        ]
      },
      "dependencies": {
        "@aws-amplify/adapter-nextjs": "^1.0.27",
        "@next/font": "13.2.4",
        "aws-amplify": "^6.0.27",
        "bing-translate-api": "^4.0.1",
        "dotenv": "^16.4.5",
        "formik": "^2.4.5",
        "isotope-layout": "^3.0.6",
        "openai": "^4.33.0",
        "react": "18.2.0",
        "react-countup": "^6.4.2",
        "react-dom": "18.2.0",
        "react-select": "^5.8.0",
        "react-slick": "^0.29.0",
        "react-visibility-sensor": "^5.1.1",
        "slick-carousel": "^1.8.1",
        "uuid": "^9.0.1",
        "wowjs": "^1.1.3",
        "yup": "^1.4.0"
      },
      "devDependencies": {
        "@typescript-eslint/eslint-plugin": "^7.5.0",
        "@typescript-eslint/parser": "^7.5.0",
        "eslint": "^8.57.0",
        "eslint-config-next": "^14.1.4",
        "eslint-plugin-jsx-a11y": "^6.8.0",
        "eslint-plugin-react": "^7.34.1",
        "eslint-plugin-react-hooks": "^4.6.0",
        "husky": "^9.0.11",
        "next": "^14.1.4",
        "prettier-eslint": "^16.3.0",
        "prettier-eslint-cli": "^8.0.1"
      }
}

amplify.yml

version: 0.3
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: .next
    files:
      - "**/*"
  cache:
    paths:
      - node_modules/**/*

访问截图

无法加载网站

内容的提问来源于stack exchange,提问作者Luke

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.26 05:00:57