AWS Amplify`configure`没有选项

时间:2018-10-14 14:43:34

标签: expo aws-amplify

我一直在关注本教程:https://blog.expo.io/how-to-build-cloud-powered-mobile-apps-with-expo-aws-amplify-2fddc898f9a2这些步骤与我之前在Amplify自己的文档中遵循的步骤极为相似。但是我一开始就停下来了。

当我运行amplify configure时,它会提示我提供后端提供程序,但那里没有任何可用的选项。然后,我必须按ctrl-C才能离开。因此整个日志如下所示:

    amplify configure  
   ? Select the backend providers. 

   Done in 2.29s.

运行amplify init时遇到非常相似的问题。因此,结果是我什至在开始之前就完全被AWS Amplify淹没了。任何人都知道为什么我在菜单提示中没有任何选项,或者如何解决它们?

2 个答案:

答案 0 :(得分:0)

尝试按Enter键,然后等待。 您可能需要按不止一次。 当提示您输入accessKeyId时,请按Escape键,然后从 网站。

    C:\Users\xxxx>amplify configure
    Follow these steps to set up access to your AWS account:

    Sign in to your AWS administrator account:
    https://console.aws.amazon.com/
    Press Enter to continue

        Specify the AWS Region
        ? region:  us-east-1
        Specify the username of the new IAM user:
        ? user name:  newusername
        Complete the user creation using the AWS console
        https://console.aws.amazon.com/iam/home?region=us-east-1#/users$new?step=final&accessKey&userNames=newusername&permissionType=policies&policies=arn:aws:iam::aws:policy%2FAdministratorAccess
        Press Enter to continue

Press Enter to continue

Enter the access key of the newly created user:
? accessKeyId:  **************
? secretAccessKey:  **********************
This would update/create the AWS Profile in your local machine
? Profile Name:  type-name

Successfully set up the new user.

答案 1 :(得分:0)

我自己遇到了这个问题。解决方法是使用以下yarn命令重新安装amplify cli:

  

yarn global add @aws-amplify/cli

希望有帮助!

  

来源:   https://github.com/aws-amplify/amplify-cli/issues/2410#issuecomment-535236409

相关问题