I'm picking up development started by another team on a Vue.js app with AWS Amplify. They used Amplify Cli to add Auth to the app.
I've pulled the project down from GitHub. When I run the app, the Auth service is working fine.
I'm now trying to add Storage with amplify add storage
, but am struggling to get the Amplify Cli (which I've had working fine on my own projects) to work with the new project.
I've tried:
amplify configure project
, which fails with the message 'You are not working inside a valid Amplify project. Use 'amplify init' in the root of your app directory to initialize your project, or 'amplify pull' to pull down an existing project.' (but I don't want to init a new project, this is an existing project that I've git pulled)amplify pull --appId myAppIDFromTheAmplifyConsole --envName dev
, which fails with the message 'File at path: '/[thefullpath]/amplify/.config/local-env-info.json' does not exist' (and I can see that that file doesn't exist. The other team have confirmed that the file has never existed.)My questions are:
amplify init
as the first bullet point error message suggests? The auth service is working and I don't want to break the existing cognito user pools that Amplify created. Will amplify init
push or rerun the cloudformation scripts and therefore change the backend?Thanks!
The question without an answer, so I'll answer for future visitors.
You need to run amplify init
after amplify configure
, it will initialize a project and associate your local project with a cloud environment. amplify init
will ask questions and after answering them, /[thefullpath]/amplify/.config/local-env-info.json
file will be created.
local-env-info.json
should be in .gitignore
file, because it contains information about the locally initialized environment.
Note: amplify init
will not push your changes to the cloud