Android - Войти в Google AWS Amplify - Ошибка формата шаблона: YAML не правильно - PullRequest
0 голосов
/ 14 мая 2019

Я пытаюсь войти в Google в Android с AWS-усилением. Но после того, как я amplify push, я получаю ошибку

UPDATE_IN_PROGRESS          authcognitoonoffinsure         AWS::CloudFormation::Stack Tue May 14 2019 15:15:43 GMT+0700 (WIB)                                                                      
UPDATE_FAILED               authcognitoonoffinsure         AWS::CloudFormation::Stack Tue May 14 2019 15:15:43 GMT+0700 (WIB) Template format error: YAML not well-formed. (line 492, column 62)   
UPDATE_ROLLBACK_IN_PROGRESS onoff-frey-main-20190227003510 AWS::CloudFormation::Stack Tue May 14 2019 15:15:45 GMT+0700 (WIB) The following resource(s) failed to update: [authcognitoonoffinsure].
⠼ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              authcognitoonoffinsure         AWS::CloudFormation::Stack Tue May 14 2019 15:15:51 GMT+0700 (WIB) 
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS onoff-frey-main-20190227003510 AWS::CloudFormation::Stack Tue May 14 2019 15:15:52 GMT+0700 (WIB) 
UPDATE_IN_PROGRESS                           authcognitoonoffinsure         AWS::CloudFormation::Stack Tue May 14 2019 15:15:54 GMT+0700 (WIB) 
UPDATE_COMPLETE                              authcognitoonoffinsure         AWS::CloudFormation::Stack Tue May 14 2019 15:15:54 GMT+0700 (WIB) 
UPDATE_ROLLBACK_COMPLETE                     onoff-frey-main-20190227003510 AWS::CloudFormation::Stack Tue May 14 2019 15:15:55 GMT+0700 (WIB) 
⠧ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
✖ An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

Затем я проверяю файл YAML, почему UPLOAD_FAILED в строке 492. Это код:

Resource: !If [ShouldNotCreateEnvResources, arn:aws:iam:::role/cognitoonoffinsure_openid_lambda_role, !Join ['',[arn:aws:iam:::role/cognitoonoffinsure_openid_lambda_role, '-', !Ref env]]]

1 Ответ

0 голосов
/ 14 мая 2019

Решено ... Требуется знак '', поэтому:

Предыдущий

Resource: !If [ShouldNotCreateEnvResources, arn:aws:iam:::role/cognitoonoffinsure_openid_lambda_role, !Join ['',[arn:aws:iam:::role/cognitoonoffinsure_openid_lambda_role, '-', !Ref env]]]

После

Resource: !If [ShouldNotCreateEnvResources, 'arn:aws:iam:::role/cognitoonoffinsure_openid_lambda_role', !Join ['',['arn:aws:iam:::role/cognitoonoffinsure_openid_lambda_role', '-', !Ref env]]]
...