aws-amplify / aws-amplify/amplify-cli
Amplify Pull is creating backend despite selecting "No" to "Are you planning on modifying this backend?"
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Before opening, please confirm:
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-js/issues?q=is%3Aissue+) and [discussions](https://github.com/aws-amplify/amplify-js/discussions).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-js/blob/main/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
### JavaScript Framework
React
### Amplify APIs
Not applicable
### Amplify Categories
hosting
### Environment information
```
# Put output below this line
System:
OS: macOS 11.6
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Memory: 1.71 GB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.22.1 - ~/.nvm/versions/node/v12.22.1/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 6.14.12 - ~/.nvm/versions/node/v12.22.1/bin/npm
Watchman: 2021.06.07.00 - /usr/local/bin/watchman
Browsers:
Chrome: 98.0.4758.102
Firefox: 97.0.1
Safari: 15.0
npmPackages:
@ampproject/toolbox-optimizer: undefined ()
@aws-amplify/ui-react: ^2.5.0 => 2.5.0
@aws-amplify/ui-react-internal: undefined ()
@aws-amplify/ui-react-legacy: undefined ()
@babel/core: undefined ()
@fortawesome/fontawesome-svg-core: ^1.2.35 => 1.2.35
@fortawesome/free-brands-svg-icons: ^5.15.3 => 5.15.3
@fortawesome/free-solid-svg-icons: ^5.15.3 => 5.15.3
@fortawesome/react-fontawesome: ^0.1.14 => 0.1.14
@material-ui/core: ^4.12.2 => 4.12.2
@material-ui/icons: ^4.11.2 => 4.11.2
@material-ui/lab: ^4.0.0-alpha.60 => 4.0.0-alpha.60
@mdi/js: ^6.1.95 => 6.1.95
@mdi/react: ^1.5.0 => 1.5.0
amphtml-validator: undefined ()
arg: undefined ()
async-retry: undefined ()
async-sema: undefined ()
aws-amplify: ^3.4.0 => 3.4.3
axios: ^0.21.1 => 0.21.4 (0.21.1)
babel-plugin-transform-remove-console: ^6.9.4 => 6.9.4
bfj: undefined ()
bootstrap: ^4.4.1 => 4.6.0
braintree-web: ^3.76.4 => 3.85.2
cacache: undefined ()
cache-loader: undefined ()
ci-info: undefined ()
comment-json: undefined ()
compression: undefined ()
conf: undefined ()
content-type: undefined ()
cookie: undefined ()
css-loader: undefined ()
debug: undefined ()
devalue: undefined ()
escape-string-regexp: undefined ()
file-loader: undefined ()
find-cache-dir: undefined ()
find-up: undefined ()
firebase: ^9.1.1 => 9.6.6
firebase/analytics: undefined ()
firebase/app: undefined ()
firebase/app-check: undefined ()
firebase/auth: undefined ()
firebase/auth/cordova: undefined ()
firebase/auth/react-native: undefined ()
firebase/compat: undefined ()
firebase/compat/analytics: undefined ()
firebase/compat/app: undefined ()
firebase/compat/app-check: undefined ()
firebase/compat/auth: undefined ()
firebase/compat/database: undefined ()
firebase/compat/firestore: undefined ()
firebase/compat/functions: undefined ()
firebase/compat/messaging: undefined ()
firebase/compat/performance: undefined ()
firebase/compat/remote-config: undefined ()
firebase/compat/storage: undefined ()
firebase/database: undefined ()
firebase/firestore: undefined ()
firebase/firestore/lite: undefined ()
firebase/functions: undefined ()
firebase/messaging: undefined ()
firebase/messaging/sw: undefined ()
firebase/performance: undefined ()
firebase/remote-config: undefined ()
firebase/storage: undefined ()
formik: ^2.2.7 => 2.2.7
fresh: undefined ()
gzip-size: undefined ()
http-proxy: undefined ()
ignore-loader: undefined ()
imagemin-mozjpeg: ^9.0.0 => 9.0.0
imagemin-optipng: ^8.0.0 => 8.0.0
is-animated: undefined ()
is-docker: undefined ()
is-wsl: undefined ()
json5: undefined ()
jsonwebtoken: undefined ()
loader-utils: undefined ()
lodash.curry: undefined ()
lru-cache: undefined ()
mobx: ^6.3.0 => 6.3.0
mobx-react: ^7.1.0 => 7.1.0
moment-timezone: ^0.5.33 => 0.5.33
nanoid: undefined ()
neo-async: undefined ()
next: 10.0.7 => 10.0.7
next-optimized-images: ^2.6.2 => 2.6.2
ora: undefined ()
paypal-checkout: ^4.0.328 => 4.0.328
postcss-flexbugs-fixes: undefined ()
postcss-loader: undefined ()
postcss-preset-env: undefined ()
postcss-scss: undefined ()
react: 17.0.1 => 17.0.1 (17.0.2)
react-bootstrap: ^1.5.2 => 1.5.2
react-bootstrap/AbstractNav: undefined ()
react-bootstrap/AbstractNavItem: undefined ()
react-bootstrap/Accordion: undefined ()
react-bootstrap/AccordionCollapse: undefined ()
react-bootstrap/AccordionContext: undefined ()
react-bootstrap/AccordionToggle: undefined ()
react-bootstrap/Alert: undefined ()
react-bootstrap/Badge: undefined ()
react-bootstrap/BootstrapModalManager: undefined ()
react-bootstrap/Breadcrumb: undefined ()
react-bootstrap/BreadcrumbItem: undefined ()
react-bootstrap/Button: undefined ()
react-bootstrap/ButtonGroup: undefined ()
react-bootstrap/ButtonToolbar: undefined ()
react-bootstrap/Card: undefined ()
react-bootstrap/CardColumns: undefined ()
react-bootstrap/CardContext: undefined ()
react-bootstrap/CardDeck: undefined ()
react-bootstrap/CardGroup: undefined ()
react-bootstrap/CardImg: undefined ()
react-bootstrap/Carousel: undefined ()
react-bootstrap/CarouselCaption: undefined ()
react-bootstrap/CarouselItem: undefined ()
react-bootstrap/CloseButton: undefined ()
react-bootstrap/Col: undefined ()
react-bootstrap/Collapse: undefined ()
react-bootstrap/Container: undefined ()
react-bootstrap/Dropdown: undefined ()
react-bootstrap/DropdownButton: undefined ()
react-bootstrap/DropdownItem: undefined ()
react-bootstrap/DropdownMenu: undefined ()
react-bootstrap/DropdownToggle: undefined ()
react-bootstrap/ElementChildren: undefined ()
react-bootstrap/Fade: undefined ()
react-bootstrap/Feedback: undefined ()
react-bootstrap/Figure: undefined ()
react-bootstrap/FigureCaption: undefined ()
react-bootstrap/FigureImage: undefined ()
react-bootstrap/Form: undefined ()
react-bootstrap/FormCheck: undefined ()
react-bootstrap/FormCheckInput: undefined ()
react-bootstrap/FormCheckLabel: undefined ()
react-bootstrap/FormContext: undefined ()
react-bootstrap/FormControl: undefined ()
react-bootstrap/FormFile: undefined ()
react-bootstrap/FormFileInput: undefined ()
react-bootstrap/FormFileLabel: undefined ()
react-bootstrap/FormGroup: undefined ()
react-bootstrap/FormLabel: undefined ()
react-bootstrap/FormText: undefined ()
react-bootstrap/Image: undefined ()
react-bootstrap/InputGroup: undefined ()
react-bootstrap/Jumbotron: undefined ()
react-bootstrap/ListGroup: undefined ()
react-bootstrap/ListGroupItem: undefined ()
react-bootstrap/Media: undefined ()
react-bootstrap/Modal: undefined ()
react-bootstrap/ModalBody: undefined ()
react-bootstrap/ModalContext: undefined ()
react-bootstrap/ModalDialog: undefined ()
react-bootstrap/ModalFooter: undefined ()
react-bootstrap/ModalHeader: undefined ()
react-bootstrap/ModalTitle: undefined ()
react-bootstrap/Nav: undefined ()
react-bootstrap/NavContext: undefined ()
react-bootstrap/NavDropdown: undefined ()
react-bootstrap/NavItem: undefined ()
react-bootstrap/NavLink: undefined ()
react-bootstrap/Navbar: undefined ()
react-bootstrap/NavbarBrand: undefined ()
react-bootstrap/NavbarCollapse: undefined ()
react-bootstrap/NavbarContext: undefined ()
react-bootstrap/NavbarToggle: undefined ()
react-bootstrap/Overlay: undefined ()
react-bootstrap/OverlayTrigger: undefined ()
react-bootstrap/PageItem: undefined ()
react-bootstrap/Pagination: undefined ()
react-bootstrap/Popover: undefined ()
react-bootstrap/PopoverContent: undefined ()
react-bootstrap/PopoverTitle: undefined ()
react-bootstrap/ProgressBar: undefined ()
react-bootstrap/ResponsiveEmbed: undefined ()
react-bootstrap/Row: undefined ()
react-bootstrap/SafeAnchor: undefined ()
react-bootstrap/SelectableContext: undefined ()
react-bootstrap/Spinner: undefined ()
react-bootstrap/SplitButton: undefined ()
react-bootstrap/Switch: undefined ()
react-bootstrap/Tab: undefined ()
react-bootstrap/TabContainer: undefined ()
react-bootstrap/TabContent: undefined ()
react-bootstrap/TabContext: undefined ()
react-bootstrap/TabPane: undefined ()
react-bootstrap/Table: undefined ()
react-bootstrap/Tabs: undefined ()
react-bootstrap/ThemeProvider: undefined ()
react-bootstrap/Toast: undefined ()
react-bootstrap/ToastBody: undefined ()
react-bootstrap/ToastContext: undefined ()
react-bootstrap/ToastHeader: undefined ()
react-bootstrap/ToggleButton: undefined ()
react-bootstrap/ToggleButtonGroup: undefined ()
react-bootstrap/Tooltip: undefined ()
react-bootstrap/createChainedFunction: undefined ()
react-bootstrap/createWithBsPrefix: undefined ()
react-bootstrap/divWithClassName: undefined ()
react-bootstrap/helpers: undefined ()
react-bootstrap/transitionEndListener: undefined ()
react-bootstrap/triggerBrowserReflow: undefined ()
react-bootstrap/types: undefined ()
react-bootstrap/usePopperMarginModifiers: undefined ()
react-bootstrap/useWrappedRefWithWarning: undefined ()
react-dom: 17.0.1 => 17.0.1
react-infinite-scroll-component: ^6.1.0 => 6.1.0
react-lines-ellipsis: ^0.15.0 => 0.15.0
react-responsive-carousel: ^3.2.19 => 3.2.19
react-slick: ^0.28.1 => 0.28.1
react-virtualized: ^9.22.3 => 9.22.3
recast: undefined ()
resolve-url-loader: undefined ()
sass: ^1.32.12 => 1.32.12
sass-loader: undefined ()
schema-utils: undefined ()
semver: undefined ()
send: undefined ()
slick-carousel: ^1.8.1 => 1.8.1
source-map: undefined ()
string-hash: undefined ()
strip-ansi: undefined ()
terser: undefined ()
text-table: undefined ()
thread-loader: undefined ()
unistore: undefined ()
web-vitals: undefined ()
webpack: undefined ()
webpack-sources: undefined ()
xss: ^1.0.10 => 1.0.10
yup: ^0.32.9 => 0.32.9
npmGlobalPackages:
@aws-amplify/cli: 7.6.21
npm: 6.14.12
```
### Describe the bug
Per the Amplify Docs here (https://docs.amplify.aws/cli/teams/multi-frontend/) as of Feb 21, 2022:
> Use the `amplify pull` command to share the same Amplify backend across multiple frontends (e.g, a React and Android app). Users have an option to pull the entire backend definition (infrastructure templates and metadata) or only the metadata (e.g. the `aws-exports.js` or `amplifyconfiguration.json` file) required to connect to the backend. If you’re building a mobile and web app in separate repositories, the recommended workflow is to keep the backend definition (the amplify folder) in only one of the repositories and pull the metadata (the `aws-exports.js` or `amplifyconfiguration.json` file) in the second repository to connect to the same backend.
For over a year and a half I've pulled our backend using the above instructions, however, recently when pulling the backend the action has been creating an `amplify` folder containing `cli.json` and `team-provider-info.json` files.
Further, when attempting to deploy the standalone frontend to Amplify, it is failing on backend build (because it's attempting to create the backend - which I don't want). To resolve the issue, I must manually delete the `amplify` folder from the project.
### Expected behavior
An `amplify` folder should not be generated on `amplify pull` if answering "No" to the question: `Do you plan on modifying this backend?`.
### Reproduction steps
1. Run `amplify pull` from a standalone frontend project
2. Select `AWS Profile` when prompted: `Select the authentication method you want to use:`
3. Select profile when prompted: `Please choose the profile you want to use`
4. Select app when prompted: `Which app are you working on?`
5. Select `dev` when prompted: `Pick a backend environment`
6. Select `Visual Studio Code` when prompted: `Choose your default editor`
7. Select `javascript` when prompted: `Choose the type of app that you're building`
8. Select `react` when prompted: `What javascript framework are you using?`
9. `Source directory path`: `src`
10. `Distribution directory path`: `build`
11. `Build command`: ``npm run-script build`
12. `Start commaned`: `npm run-script start`
Note - at this stage, I'm receiving a `* Failed to sync UI components` error (<- this is also new)
13. Answer `No` to `Are you planning on modifying this backend?`
On completing the above:
`Added backend environment config object to your project.`
### Code Snippet
_No response_
### Log output
```
// Put your logs below this line
```
### aws-exports.js
_No response_
### Manual configuration
_No response_
### Additional configuration
_No response_
### Mobile Device
_No response_
### Mobile Operating System
_No response_
### Mobile Browser
_No response_
### Mobile Browser Version
_No response_
### Additional information and screenshots
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.