aws-solutions / document-understanding-solution

Example of integrating & using Amazon Textract, Amazon Comprehend, Amazon Comprehend Medical, Amazon Kendra to automate the processing of documents for use cases such as enterprise search and discovery, control and compliance, and general business process workflow.

Home Page:https://aws.amazon.com/solutions/implementations/document-understanding-solution/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CICD Deployment failure

dcapatin opened this issue · comments

Describe the bug
CICD Deployment failure

To Reproduce
Follow CICD Deployment failure

Expected behavior
Deployment succeeds.

Please complete the following information about the solution:

  • Version: [e.g. v1.0.0] v1.0.3
  • Region: [e.g. us-east-1]us-east-1
  • Was the solution modified from the version published on this repository? No
  • If the answer to the previous question was yes, are the changes available on GitHub?
  • Have you checked your service quotas for the sevices this solution uses? N/A
  • Were there any errors in the CloudWatch Logs? No

Screenshots
If applicable, add screenshots to help explain your problem (please DO NOT include sensitive information).

Additional context
I did all the steps from CICD Deploy section
it fails when reaching
aws cloudformation create-stack --stack-name DocumentUnderstandingSolutionCICD --template-url...

  1. It complains it cannot find an S3 bucket when creating the CICDHelper Lambda
    This seems to be caused by
    https://github.com/awslabs/document-understanding-solution/blob/main/deployment/document-understanding-solution.template#L263
    I don't see the reason to join bucket name with AWS:Region. (bucket name should be enough)

  2. After fixing the bucket problem, it complains about missing the S3 Key:
    https://github.com/awslabs/document-understanding-solution/blob/main/deployment/document-understanding-solution.template#L271
    There is no such file in the repo. I guess it supposed to be an archive (Zipped) with the files from here:
    https://github.com/awslabs/document-understanding-solution/tree/main/deployment/document-understanding-cicd

  3. CloudFormation did not receive a response from your Custom Resource.
    After fixing 1&2, I've reached this error: "CloudFormation did not receive a response from your Custom Resource.Please check your logs for requestId..."
    CW Logs ? I don't have any useful CW logs. Any idea?

Hi @dcapatin, Please follow the steps listed in CICD deploy as is. Changing the bucket name might cause failures. I was not able to replicate the error on my side during the CICD deploy.

If you are trying the dev deploy and it gives the error for invalid S3_BUCKET, please refer to the solution mentioned under this issue: #205

Hope this helps!

  1. I've followed exactly the steps listed in the CICD deploy. I am surprised to see you haven't experienced at least the missing key since the zip file is not part of the repo.

  2. I was able to make it work but not using CICD deploy nor dev deploy.
    Instead, I've started from
    https://aws.amazon.com/solutions/implementations/document-understanding-solution/ and Pressed 'Launch in the AWS Console' button

@dcapatin

  1. If you see in this file: https://github.com/awslabs/document-understanding-solution/blob/22c91dd5669653695b67a5b4d0177467bda1732e/deployment/build-s3-dist.sh#L82 , you will see that the .zip file is created during the deployment. Happy to help you debug this issue further.

Now I see where this gets created
but I don't have npm installed nor is this mentioned in pre-requisites.
Did I miss something?

@dcapatin It appears we have missed adding npm as a explicit dependency since the Amazon linux instances (used by the AWS Solutions) have npm already installed in them. We will work on adding it as an explicit dependency in the README. Thanks!

commented

@dcapatin hope the resolution provided above, has helped close the issue. We have release v1.0.10 and I encourage you to try it out. If you still face an issue, please reopen or create a new ticket.