aws-lex-web-ui icon indicating copy to clipboard operation
aws-lex-web-ui copied to clipboard

Error while running the script

Open vetrivel-innoppl opened this issue 3 years ago • 6 comments

Hi,

Thanks for your wonderful script. It really gives me the starting point for my vision.

I found this post - https://aws.amazon.com/blogs/machine-learning/deploy-a-web-ui-for-your-chatbot/ and try to follow the same. But, I run into following error.

CodeBuildDeploy CREATE_FAILED Embedded stack arn:aws:cloudformation:us-east-1:602627399523:stack/lex-web-ui-CodeBuildDeploy-5ZU16OE7QQW/1c3192e0-5ce1-11eb-9954-0acfa743837d was not successfully created: The following resource(s) failed to create: [LexWebUiDistribution, S3CleanupLambdaRole, CodeBuildRole]. AWS::CloudFormation::Stack

Could you please help me to resolve it to move forward.

Event log for entire stack is below:

2021-01-23 00:11:51 UTC+0530 lex-web-ui ROLLBACK_COMPLETE - AWS::CloudFormation::Stack 2021-01-23 00:11:50 UTC+0530 Bot DELETE_COMPLETE - AWS::CloudFormation::Stack 2021-01-23 00:11:15 UTC+0530 Bot DELETE_IN_PROGRESS - AWS::CloudFormation::Stack 2021-01-23 00:11:15 UTC+0530 CognitoIdentityPool DELETE_COMPLETE - AWS::CloudFormation::Stack 2021-01-23 00:10:52 UTC+0530 CognitoIdentityPool DELETE_IN_PROGRESS - AWS::CloudFormation::Stack 2021-01-23 00:10:51 UTC+0530 CodeBuildDeploy DELETE_COMPLETE - AWS::CloudFormation::Stack 2021-01-23 00:10:40 UTC+0530 CodeBuildDeploy DELETE_IN_PROGRESS - AWS::CloudFormation::Stack 2021-01-23 00:10:26 UTC+0530 lex-web-ui ROLLBACK_IN_PROGRESS The following resource(s) failed to create: [CodeBuildDeploy]. Rollback requested by user. AWS::CloudFormation::Stack 2021-01-23 00:10:25 UTC+0530 CodeBuildDeploy CREATE_FAILED Embedded stack arn:aws:cloudformation:us-east-1:602627399523:stack/lex-web-ui-CodeBuildDeploy-5ZU16OE7QQW/1c3192e0-5ce1-11eb-9954-0acfa743837d was not successfully created: The following resource(s) failed to create: [LexWebUiDistribution, S3CleanupLambdaRole, CodeBuildRole]. AWS::CloudFormation::Stack 2021-01-23 00:09:08 UTC+0530 CodeBuildDeploy CREATE_IN_PROGRESS Resource creation Initiated AWS::CloudFormation::Stack 2021-01-23 00:09:06 UTC+0530 CodeBuildDeploy CREATE_IN_PROGRESS - AWS::CloudFormation::Stack 2021-01-23 00:09:02 UTC+0530 CognitoIdentityPool CREATE_COMPLETE - AWS::CloudFormation::Stack 2021-01-23 00:08:15 UTC+0530 CognitoIdentityPool CREATE_IN_PROGRESS Resource creation Initiated AWS::CloudFormation::Stack 2021-01-23 00:08:14 UTC+0530 CognitoIdentityPool CREATE_IN_PROGRESS - AWS::CloudFormation::Stack 2021-01-23 00:08:10 UTC+0530 Bot CREATE_COMPLETE - AWS::CloudFormation::Stack 2021-01-23 00:07:23 UTC+0530 Bot CREATE_IN_PROGRESS Resource creation Initiated AWS::CloudFormation::Stack 2021-01-23 00:07:22 UTC+0530 Bot CREATE_IN_PROGRESS - AWS::CloudFormation::Stack 2021-01-23 00:07:15 UTC+0530 lex-web-ui CREATE_IN_PROGRESS User Initiated AWS::CloudFormation::Stack

vetrivel-innoppl avatar Jan 25 '21 12:01 vetrivel-innoppl

First check is to see if the credentials for the AWS account you are installing in will allow you to create IAM roles? The failure seems to indicate that CloudFormation could not create the IAM roles for S3CleanupLambdaRole and CodeBuildRole. Usually this is due to the Role/Policies assigned to your user and that you are not privileged enough to perform operations to create these roles.

bobpskier avatar Jan 25 '21 18:01 bobpskier

not privileged enough to perform operations

Thanks for your reply. I am running it as a root user. So, I don't think it will create any role permission issue. Is there anything else, that I need to check to debug the issue?

vetrivel-innoppl avatar Jan 27 '21 10:01 vetrivel-innoppl

@bobpskier

I tried to create roles and I can able to create it manually without any issues. https://www.screencast.com/t/gv6TdA9yC

Is there any other things that I need to do?

Thanks

vetrivel-innoppl avatar Jan 27 '21 11:01 vetrivel-innoppl

One place where there might be some additional logging is in the nested stack. The master template will spin up a nested stack that has the name "CodeBuildDeploy" as part of the stack name. This is the stack that is creating the CodeBuildRole and is the stack that is failing. If you toggle the View nested setting in CloudFormation you should see this stack. Open this stack up and click on the Events tab. Next Filter the events for CodeBuildRole. I'm hoping the Status reason for the failure provides additional detail. I'd look here first to see what might be causing the failure on this specific resource.

bobpskier avatar Jan 28 '21 01:01 bobpskier

I tryed it, but faccing the same problem. Even in the nested stack, i don't see any information about it. Any other things that I need to check?

vetrivel-innoppl avatar Feb 02 '21 12:02 vetrivel-innoppl

Also, I tried with the new AWS account as well, but facing the same problem. Is ther any other way for me to run it without any issues.

vetrivel-innoppl avatar Feb 09 '21 12:02 vetrivel-innoppl