Support AMPLIFY_SKIP_APP_ID_MISMATCH_CHECK in pull command
Basic info
- How did you install the Amplify CLI?: It's automatically installed on Amplify preview build.
- Node.js version: 18
- Amplify CLI version: Tried all v12.13.1 ~ latest
- Used OS: We haven't customize OS for build
- Any manual changes added? : No
Overview
On Nov 14, 2024 (in v12.13.1) , amplify-cli added AMPLIFY_SKIP_APP_ID_MISMATCH_CHECK to allow projects using multi apps to avoid AppId mismatch error.
Reproducive setup details: https://github.com/aws-amplify/amplify-cli/issues/13973#issuecomment-2416805163 Announcement for the fix: https://github.com/aws-amplify/amplify-cli/issues/13973#issuecomment-2476444414
It only fixed init command so when amplify pull having the same check is executed in the pipeline, it fails with the same error.
Ask
Could you add the same fix for pull?
Previous fix:https://github.com/aws-amplify/amplify-cli/blob/a007ec73a201477e3c236f3e674d278dc85f1534/packages/amplify-cli/src/commands/init.ts#L37 Code which needs the same fix: https://github.com/aws-amplify/amplify-cli/blob/a007ec73a201477e3c236f3e674d278dc85f1534/packages/amplify-cli/src/commands/pull.ts#L41
Expected behavior
amplify pull for app using different app backend does not fail by AppId mismatch.
Reproduction steps
- Set up app in the step of https://github.com/aws-amplify/amplify-cli/issues/13973#issuecomment-2416805163
- Execute
amplify pullin the CI
Project Identifier
No response
Log output
...
2025-06-30T15:52:23.444Z [WARNING]: Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
2025-06-30T15:52:23.466Z [INFO]: ✅
2025-06-30T15:52:24.060Z [INFO]: ## Running amplify pull to generate aws-exports.js file for frontend
2025-06-30T15:52:25.919Z [INFO]: 🛑 Amplify appId mismatch.
2025-06-30T15:52:25.923Z [INFO]: Resolution: You are currently working in the amplify project with Id d2857w28z4f4mt
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
2025-06-30T15:52:25.970Z [INFO]:
...
Additional information
No response
Before submitting, please confirm:
- [x] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [x] I have removed any sensitive information from my code snippets and submission.