aws-amplify / aws-amplify/docs
[Content Issue]: Looking for the schema/spec for amplifyconfiguration.json
- Dominant language
- MDX
- Stars
- 506
- Forks
- 1.1k
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
**Describe the content issue**:
As a user, I'd like to know where I can find the `amplifyconfiguration.json` schema. In other words, it would be very helpful to know all of the possible key/value (and nested key/value) pairs that this file exposes to the Amplify.configure({}) function, by default.
**After some digging:** I was able to find this: https://github.com/aws-amplify/amplify-js/blob/a6a413caeec3570800168b8cc7cf976d7d765706/packages/core/src/parseAWSExports.ts#L33
It would appear this is where the magic happens, but this is a whole heck of a lot for a developer to go through, just to know what the config schema is for defining the config that the amplify library expects to consume, by default.
**The existing documentation makes it impossible to infer the shape or schema of the JSON configuration file:** https://docs.amplify.aws/vue/tools/libraries/configure-categories/
### Use case
As an AWS Amplify user, I'd like to use CDK in place of the `amplify cli`-generated categories. I'd like to export and write my CDK outputs in an identical format to the `amplifyconfiguration.json` schema, so that configuration of my Amplify libraries is seamless/transparent to Amplify. Stated differently, I could just call `Amplify.configure()` without needing to manually configure each of the subcategories by pulling their values out of a custome-generated CDK output json file.
**URL page where content issue is**:
Uncertain which page it would belong in.
### Other Notes
GitHub Co-Pilot and I had a nice chat about this. See screenshot 👇

I told it to consume `amplify-js/packages/core/src/parseAWSExports.ts` and reverse-engineer the JSON schema for the config file.
This is what I got back:
```
{
"aws_project_region": "string",
"aws_appsync_apiKey": "string",
"aws_appsync_authenticationType": "string",
"aws_appsync_graphqlEndpoint": "string",
"aws_appsync_region": "string",
"aws_bots_config": "array",
"aws_cognito_identity_pool_id": "string",
"aws_cognito_sign_up_verification_method": "string",
"aws_cognito_mfa_configuration": "string",
"aws_cognito_mfa_types": ["string"],
"aws_cognito_password_protection_settings": {
"passwordPolicyMinLength": "number",
"passwordPolicyCharacters": ["string"]
},
"aws_cognito_verification_mechanisms": ["string"],
"aws_cognito_signup_attributes": ["string"],
"aws_cognito_social_providers": ["string"],
"aws_cognito_username_attributes": ["string"],
"aws_mandatory_sign_in": "string",
"aws_mobile_analytics_app_id": "string",
"aws_mobile_analytics_app_region": "string",
"aws_user_files_s3_bucket": "string",
"aws_user_files_s3_bucket_region": "string",
"aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing": "boolean",
"aws_user_pools_id": "string",
"aws_user_pools_web_client_id": "string",
"geo": {
"amazon_location_service": {
"search_indices": ["string"],
"region": "string"
}
},
"oauth": {
"domain": "string",
"scope": ["string"],
"redirectSignIn": "string",
"redirectSignOut": "string",
"responseType": "string"
},
"predictions": {
"convert": {
"speechGenerator": {
"defaults": {
"VoiceId": "string"
}
}
}
},
"aws_cloud_logic_custom": [
{
"name": "string",
"endpoint": "string",
"region": "string",
"service": "string"
}
],
"Notifications": {
"InAppMessaging": {
"AWSPinpoint": {
"appId": "string",
"region": "string"
}
},
"Push": {
"AWSPinpoint": {
"appId": "string",
"region": "string"
}
}
},
"modelIntrospection": "boolean"
}
```
Contributor guide
Assessment
This issue has not been assessed yet.