aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.81k stars 821 forks source link

amplify init gives AccessDenied error - When trying to clone a repo from another creator #7428

Closed Kevinberg closed 3 years ago

Kevinberg commented 3 years ago

Before opening, please confirm:

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

-

Amplify CLI Version

-

What operating system are you using?

Mac

Amplify Categories

Not applicable

Amplify Commands

init

Describe the bug

I am trying to init an existing project where I used "" amplify init --app https://github.com/Savinvadim1312/NetflixClone.git "" in an empty folder.

Note: It is recommended to run this command from the root of your app directory ? Do you want to use an existing environment? Yes ? Choose the environment you would like to use: dev Using default provider awscloudformation ⠦ Initializing your environment: devCould not initialize 'dev': Access Denied

As this is not working; it does not create an aws export file and I can't run npm start with expo

Any help is highly appreciated!

Expected behavior

It creates the files but it does not connect to my aws amplify account and does not create aws export files.

Reproduction steps

  1. Empty Folder
  2. install all packages
  3. amplify init --app https://github.com/Savinvadim1312/NetflixClone.git

GraphQL schema(s)

```graphql # Put schemas below this line ```

Log output

``` # Put your logs below this line ```

Additional information

No response

yuth commented 3 years ago

It looks like the https://github.com/Savinvadim1312/NetflixClone.git repo has teamproviderinfo.json checked into the repo. So when you try to init the project with environment name dev it is trying to reuse the existing resources. Could you try using a different name for the environment instead of dev and see if that works.

Kevinberg commented 3 years ago

Hi @yuth , Thanks for your response! tried this in this issue:

https://github.com/aws-amplify/amplify-cli/issues/7441

Still the same problem but I will close this issue as the other one is the extended version of the issue

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.