Error: Invalid S3 bucket name (value: SOURCE_BUCKET) during Dev deploy
See original GitHub issueDescribe the bug getting an error during initial deployment. I am trying to do the Dev approach for the install. Seems it is trying to create a bucket with no name or bad name. Ive installed all re reqs. This is in a Cloud9 IDE. It pass all previous tests up to this point. I have tried to dig into /cdk-textract-client-stack.ts but I cannot see where SOURCE_BUCKET actually gets its value. Your expert insight would be greatly appreciated
error:
Running tests for datastore Test region is us-east-1 /home/ec2-user/.local/lib/python3.7/site-packages/responses/init.py:484: DeprecationWarning: stream argument is deprecated. Use stream parameter in request directly DeprecationWarning, .Error : An error occurred (ConditionalCheckFailedException) when calling the UpdateItem operation: A condition specified in the operation could not be evaluated. A condition specified in the operation could not be evaluated. …response: {‘Items’: [{‘documentId’: ‘b1a54fda-1809-49d7-8f19-0d1688eb65b9’, ‘objectName’: ‘public/samples/Misc/expense.png’, ‘bucketName’: ‘dusstack-sample-s3-bucket’, ‘documentStatus’: ‘IN_PROGRESS’}, {‘documentId’: ‘b1a99fda-1809-49d7-8f19-0d1688eb65b9’, ‘objectName’: ‘public/samples/Misc/expense.png’, ‘bucketName’: ‘dusstack-sample-s3-bucket’, ‘documentStatus’: ‘IN_PROGRESS’}], ‘Count’: 2, ‘ScannedCount’: 2, ‘ConsumedCapacity’: {‘TableName’: ‘DocumentsTestTable’, ‘CapacityUnits’: 1}, ‘ResponseMetadata’: {‘RequestId’: ‘C5M72NYUQUFHHS0ILX3HFC7W4LFLPWXEZGYQZY138HS6KE7ZH8CT’, ‘HTTPStatusCode’: 200, ‘HTTPHeaders’: {‘server’: ‘amazon.com’, ‘x-amzn-requestid’: ‘C5M72NYUQUFHHS0ILX3HFC7W4LFLPWXEZGYQZY138HS6KE7ZH8CT’}, ‘RetryAttempts’: 0}} …A condition specified in the operation could not be evaluated. .
Ran 10 tests in 1.069s
OK
sys:1: ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=(‘0.0.0.0’, 0)>
warning …/…/…/package.json: No license field
$ yarn compile-ts-backend-stack && yarn compile-ts-client-stack
warning …/…/…/package.json: No license field
$ tsc lib/cdk-textract-stack.ts --target es2018 --module commonjs --allowjs true
warning …/…/…/package.json: No license field
$ tsc lib/cdk-textract-client-stack.ts --target es2018 --module commonjs --allowjs true
warning …/…/…/package.json: No license field
$ AWS_REGION=$npm_package_stack_region USER_EMAIL=$npm_package_email cdk bootstrap --toolkit-stack-name DocumentUnderstandingCDKToolkit
/home/ec2-user/environment/document-understanding-solution/source/node_modules/@aws-cdk/aws-s3/lib/bucket.js:750
throw new Error(Invalid S3 bucket name (value: ${bucketName})${os_1.EOL}${errors.join(os_1.EOL)}
);
^
Error: Invalid S3 bucket name (value: SOURCE_BUCKET) Bucket name must only contain lowercase characters and the symbols, period (.) and dash (-) (offset: 0) Bucket name must start and end with a lowercase character or number (offset: 0) Bucket name must start and end with a lowercase character or number (offset: 12) at Function.validateBucketName (/home/ec2-user/environment/document-understanding-solution/source/node_modules/@aws-cdk/aws-s3/lib/bucket.js:750:19) at Function.fromBucketAttributes (/home/ec2-user/environment/document-understanding-solution/source/node_modules/@aws-cdk/aws-s3/lib/bucket.js:673:16) at Function.fromBucketName (/home/ec2-user/environment/document-understanding-solution/source/node_modules/@aws-cdk/aws-s3/lib/bucket.js:654:23) at new CdkTextractStack (/home/ec2-user/environment/document-understanding-solution/source/lib/cdk-textract-stack.js:509:62) at Object.<anonymous> (/home/ec2-user/environment/document-understanding-solution/source/bin/deploy-backend.js:32:1) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions…js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) Subprocess exited with error 1 error Command failed with exit code 1.
To Reproduce run yarn deploy
Expected behavior A clear and concise description of what you expected to happen.
Please complete the following information about the solution:
- Version: [e.g. v1.0.3] v1.0.3
- Region: [e.g. us-east-1] us-east-1
- Was the solution modified from the version published on this repository? negative, just trying to test out initial template
- 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? no but this basically a vanilla aws org/account with nothing in it, lmk if I need to check something
- 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 Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
guys I simply commented out any reference to
cicdBotoLoc
andcicdPDFLoc
because wasnt using the CICD deployment at all. There is also a conditional ternary you will need to comment out or change on line 772 if you go this route.AFA the client stack I would make sure you have all pre reqs, it worked for me after i did. You can get the true pre reqs frrom lines 167-210 in
/document-understanding-solution/deployment/document-understanding-solution.template
In addition to the above change, in line 25 of package.json, I modified the bootstrap to include the cicd flag and was able to get the yarn DUSStack to deploy. Client stack isn’t deploying though.
"bootstrap": "ISCICD=$npm_package_cicd AWS_REGION=$npm_package_stack_region USER_EMAIL=$npm_package_email cdk bootstrap --toolkit-stack-name DocumentUnderstandingCDKToolkit",