Amplify-cli: How to clone an Amplify project from a git repo and generate aws-exports.js without push (Typescript/javascript/react)

Created on 18 Dec 2018  路  1Comment  路  Source: aws-amplify/amplify-cli

* Which Category is your question related to? *
Core

* What AWS Services are you utilizing? *
API (AppSync), Storage, Auth

* Provide additional details e.g. code snippets *
I'm using the new multienv package but I believe this issue is unrelated

  1. Create an Amplify javascript project and publish it
  2. Push the app to github (aws-exports.js is in .gitignore -- is this correct?)
  3. Clone the app from github
  4. ??? Not sure how to reinitialize the app. I ran amplify status and it looks good, however, my code does not execute because aws-exports.js doesn't exist. Do I need to run amplify publish -- that seems odd if I'm just cloning it?

Also, I understand why aws-exports might belong in .gitignore, but this complicated CI/CD... is there a simple CI/CD strategy for grabbing aws-exports?

question

Most helpful comment

There's a team provider info file that's not in the gitignore, and that file contains the environments.
After you cloned your repo to another computer, run amplify init, you will be prompted to select an environment, just select the existing environment, then the information of the aws cloud resources will be retrieved and the aws-exports.js file will be generated.

>All comments

There's a team provider info file that's not in the gitignore, and that file contains the environments.
After you cloned your repo to another computer, run amplify init, you will be prompted to select an environment, just select the existing environment, then the information of the aws cloud resources will be retrieved and the aws-exports.js file will be generated.

Was this page helpful?
0 / 5 - 0 ratings