---
title: "About amplify_outputs.json"
section: "reference"
platforms: ["android", "angular", "flutter", "javascript", "nextjs", "react", "react-native", "swift", "vue"]
gen: 2
last-updated: "2025-03-31T16:55:30.000Z"
url: "https://docs.amplify.aws/react/reference/amplify_outputs/"
---

export async function getStaticPaths() {
  return getCustomStaticPath(meta.platforms);
}

export async function getStaticProps() {
  return {
    props: {
      meta,
    }
  };
}

In Amplify Gen 2, the CLI will generate an `amplify_outputs.json` file with your backend's outputs such as your Data endpoint and Auth metadata. This file -- also known as the "client configuration file" -- is used to configure the client libraries in order to interact with your backend resources. Locally, this file is created while using `ampx sandbox`. In Amplify's CI/CD, this is created automatically for you based on the current Amplify app ID and git branch.

You can also manually create this file for a specified Amplify app ID and branch, or an AWS CloudFormation stack name with [`ampx generate outputs`](/[platform]/reference/cli-commands#npx-ampx-generate-outputs).

<!-- Platform: react-native -->
<Callout>

**Note:** if you are using Expo EAS build, you will need to force commit the `amplify_outputs.json` file to local git repository before running `eas build` command. This is because the `amplify_outputs.json` file is excluded in the default `.gitignore`, and the `eas build` command will not include untracked files in the build. <b>When build completes you must remove the `amplifyconfiguration.json` file from the git repository and never commit and push it to the remote repository</b>.

</Callout>
<!-- /Platform -->

## Extending Amplify outputs file

The `amplify_outputs.json` file is not just a static artifact; it is designed to be extendable to suit the evolving needs of your application. By leveraging the `addOutput` method from your `backend`, you can programmatically add configurations. This is particularly useful for customizing outputs that are not directly exposed through the Amplify constructs or for dynamically adjusting your app's configuration in response to changes in your backend strategy.

> **Warning:** Overriding Amplify-managed configurations on `amplify_outputs.json` is not supported.

One common scenario where extending the configuration becomes handy is when you need to add custom outputs or extend existing configurations without manual file edits.

Consider a scenario where you want to add output parameters in your `amplify_outputs.json` that specify an S3 bucket and its region that your application will use for storing files.

```ts title="amplify/backend.ts"
import { defineBackend } from "@aws-amplify/backend";
import { auth } from "./auth/resource";
import { data } from "./data/resource";

const backend = defineBackend({
  auth, 
  data, 
});

backend.addOutput({
  storage: {
    aws_region: "us-east-1",
    bucket_name: "my-externally-managed-bucket",
  },
});
```

In your frontend end application, you can configure Amplify as follows:

```ts title="src/index.ts"
import { Amplify } from "aws-amplify";
import outputs from "@/amplify_outputs.json";

Amplify.configure(outputs);
```

### Custom configuration

In addition to extending existing configurations, you can also add custom output parameters to your `amplify_outputs.json`. This is useful for surfacing arbitrary outputs, values from custom CDK resources, or any other information that might be necessary for your application's logic or configuration.

```ts title="amplify/backend.ts"
import { defineBackend } from "@aws-amplify/backend";
import { auth } from "./auth/resource";
import { data } from "./data/resource";

const backend = defineBackend({
  auth, 
  data, 
});

backend.addOutput({
  custom: {
    api_id: "restAPIId",
    api_endpoint: "https://api.example.com",
    api_name: "restApiName",
  },
});
```

In your frontend application, you can access these custom configurations as follows:

```ts title="src/index.ts"
import { Amplify } from "aws-amplify";
import { parseAmplifyConfig } from "aws-amplify/utils";
import outputs from "@/amplify_outputs.json";

const amplifyConfig = parseAmplifyConfig(outputs);

Amplify.configure({
  ...amplifyConfig,
  API: {
    REST: {
      [outputs.custom.api_name]: {
        endpoint: outputs.custom.api_endpoint,
        region: "us-east-1",
      },
    },
  },
});
```

## Schema reference

The Amplify outputs file is defined using a JSON schema. You can find this schema in the [`aws-amplify/amplify-backend` repository](https://github.com/aws-amplify/amplify-backend/blob/main/packages/client-config/src/client-config-schema/schema_v1.json).

<pre><code tabIndex="0" style={{ maxWidth: "100%", overflowX: "scroll" }}>
{JSON.stringify(schema, null, 2)}
</code></pre>
