Skip to content

Generate Outputs failing locally and in build #2994

@cubs818

Description

@cubs818

Environment information

System:
  OS: Linux 6.6 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
  CPU: (4) x64 Intel(R) Xeon(R) E-2244G CPU @ 3.80GHz
  Memory: 3.89 GB / 9.71 GB
  Shell: /bin/bash
Binaries:
  Node: 20.19.2 - ~/.nvm/versions/node/v20.19.2/bin/node
  Yarn: undefined - undefined
  npm: 10.8.2 - ~/.nvm/versions/node/v20.19.2/bin/npm
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/auth-construct: 1.8.1
  @aws-amplify/backend: 1.16.1
  @aws-amplify/backend-ai: Not Found
  @aws-amplify/backend-auth: 1.7.1
  @aws-amplify/backend-cli: 1.5.0
  @aws-amplify/backend-data: 1.6.1
  @aws-amplify/backend-deployer: 1.1.20
  @aws-amplify/backend-function: 1.14.1
  @aws-amplify/backend-output-schemas: 1.7.0
  @aws-amplify/backend-output-storage: 1.3.1
  @aws-amplify/backend-secret: 1.4.0
  @aws-amplify/backend-storage: 1.4.1
  @aws-amplify/cli-core: 1.4.1
  @aws-amplify/client-config: 1.8.0
  @aws-amplify/data-construct: 1.16.3
  @aws-amplify/data-schema: 1.21.1
  @aws-amplify/deployed-backend-client: 1.8.0
  @aws-amplify/form-generator: 1.2.4
  @aws-amplify/model-generator: 1.2.0
  @aws-amplify/platform-core: 1.10.0
  @aws-amplify/plugin-types: 1.11.0
  @aws-amplify/sandbox: 1.2.12
  @aws-amplify/schema-generator: 1.4.0
  aws-amplify: 6.15.6
  aws-cdk: 2.1029.2
  aws-cdk-lib: 2.215.0
  typescript: 5.9.2
AWS environment variables:
  AWS_PROFILE = cloud
  AWS_REGION = us-west-2
No CDK environment variables

Describe the bug

I have the frontend and backend split. Working for over a year but I suddenly am failing on the front end build and if I locally run npx ampx generate outputs.

[DEBUG] 2025-09-19T19:32:42.343Z: ZodError: [
{
"code": "invalid_key",
"origin": "record",
"issues": [
{
"expected": "object",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected object, received string"
}
],
"path": [
"AWS::Amplify::Platform"
],
"message": "Invalid key in record"
},
{
"code": "invalid_key",
"origin": "record",
"issues": [
{
"expected": "object",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected object, received string"
}
],
"path": [
"AWS::Amplify::Auth"
],
"message": "Invalid key in record"
},
{
"code": "invalid_key",
"origin": "record",
"issues": [
{
"expected": "object",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected object, received string"
}
],
"path": [
"AWS::Amplify::Function"
],
"message": "Invalid key in record"
}
]
at StackMetadataBackendOutputRetrievalStrategy.fetchBackendOutput (file:///home/cmxeon/_repos/amplify-sm9k/node_modules/@aws-amplify/deployed-backend-client/lib/stack_metadata_output_retrieval_strategy.js:52:72)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DefaultBackendOutputClient.getOutput (file:///home/cmxeon/_repos/amplify-sm9k/node_modules/@aws-amplify/deployed-backend-client/lib/backend_output_client.js:18:24)
at async UnifiedClientConfigGenerator.generateClientConfig (file:///home/cmxeon/_repos/amplify-sm9k/node_modules/@aws-amplify/client-config/lib/unified_client_config_generator.js:25:22)
at async generateClientConfigToFile (file:///home/cmxeon/_repos/amplify-sm9k/node_modules/@aws-amplify/client-config/lib/generate_client_config_to_file.js:7:26)
at async ClientConfigGeneratorAdapter.generateClientConfigToFile (file:///home/cmxeon/_repos/amplify-sm9k/node_modules/@aws-amplify/backend-cli/lib/client-config/client_config_generator_adapter.js:25:34)
at async Object.handler (file:///home/cmxeon/_repos/amplify-sm9k/node_modules/@aws-amplify/backend-cli/lib/commands/generate/outputs/generate_outputs_command.js:37:9)

Reproduction steps

Run ampx generate outputs with the branch and app id

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions