我不确定自己做了什么(删除了node_modules
,然后重新安装了吗?),但是我曾经为我的AWS Amplify(v0.1.42)项目配置了auth,现在它已经消失了。
我的.amplifyrc
配置正确:
{
"providers": {
"awscloudformation": {
"AuthRoleName": "xxx",
"UnauthRoleArn": "arn:aws:iam::xxx:role/xxx",
"AuthRoleArn": "arn:aws:iam::xxx:role/xxx",
"Region": "us-east-1",
"DeploymentBucketName": "xxx",
"UnauthRoleName": "xxx",
"StackName": "xxx",
"StackId": "arn:aws:cloudformation:us-east-1:xxx:stack/xxx/xxx"
}
}
}
我有一个现有的amplify/
目录,其中auth
是backend
和#current-cloud-backend
的一部分。我也有一个生成的src/aws-exports.js
:
// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.
const awsmobile = {
"aws_project_region": "us-east-1",
"aws_cognito_identity_pool_id": "us-east-1:xxx",
"aws_cognito_region": "us-east-1",
"aws_user_pools_id": "us-east-1_xxx",
"aws_user_pools_web_client_id": "xxx"
};
export default awsmobile;
所有信息都是正确的,但是当我尝试执行ampl cli命令时,它的行为就像我是一个全新用户。如何获得放大cli以在项目中使用现有配置?
这令人沮丧,因为我真的负担不起从头开始创建所有内容。