aws-amplify / aws-amplify/amplify-cli

Conditionally suppress legacy awsconfiguration.json file from Android and Swift projects

Open
#11,352 0 comments 1 reaction 0 assignees View on GitHub
feature-request p3 platform
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### Is this feature request related to a new or existing Amplify category?

_No response_

### Is this related to another service?

_No response_

### Describe the feature you'd like to request

CLI currently generates TWO files for Android and iOS:
* **amplify**configuration.json
* **aws**configuration.json

That’s because the V1 Java & ObjectiveC SDKs used **aws**configuration.json, and only the Amplify libraries understood how to use **amplify**configuration.json. Some applications used a mix of Amplify library and V1 SDKs, and required both files.

The V2 Amplify libraries do not use the **aws**configuration.json file--instead, they configure the underlying Swift or Kotlin SDK at runtime by passing configuration values derived from **amplify**configuration.json.

However, the CLI continues to generate **aws**configuration.json, which causes customer confusion since **amplify**configuration.json needs to be added to app projects in Xcode. The file names are similar enough that it's not always clear for customers what needs to be done.

This desired behavior is: Suppress the creation of **aws**configuration.json if both of the following conditions apply:
1. Project can be reliably determined to be for Swift or Android
1. Project can be reliably determined to be for Amplify V2 (that is, using the Kotlin or Swift SDKs, not the older V1 SDKs)

As a corollary to above:
1. Do NOT suppress creation of **aws**configuration.json if we can't tell for sure that it's not needed
2. Do NOT affect creation of **amplify**configuration.json

### Describe the solution you'd like

Suppress the creation of **aws**configuration.json if both of the following conditions apply:
1. Project can be reliably determined to be for Swift or Android
1. Project can be reliably determined to be for Amplify V2 (that is, using the Kotlin or Swift SDKs, not the older V1 SDKs)

As a corollary to above:
1. Do NOT suppress creation of **aws**configuration.json if we can't tell for sure that it's not needed
2. Do NOT affect creation of **amplify**configuration.json

### Describe alternatives you've considered

Alternatives:

* Do nothing
* Write a per-platform tool to remove awsconfiguration.json

### Additional context

_No response_

### Is this something that you'd be interested in working on?

- [ ] 👋 I may be able to implement this feature request

### Would this feature include a breaking change?

- [X] ⚠️ This feature might incur a breaking change

Contributor guide

Open the contributing guide

Research direction

The issue does not identify files, tests, or entry points. Start by tracing the CLI paths that generate awsconfiguration.json for Android and Swift, then verify detection of Amplify V2 versus legacy SDK usage and preserve both files whenever the project cannot be classified safely.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin, swift, typescript
Domain
cli, mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.